PaddlePaddle / PaddleHub

Awesome pre-trained models toolkit based on PaddlePaddle. (400+ models including Image, Text, Audio, Video and Cross-Modal with Easy Inference & Serving)【安全加固,暂停交互,请耐心等待】
https://www.paddlepaddle.org.cn/hub
Apache License 2.0
12.74k stars 2.07k forks source link

disco_diffusion_clip_rn50.reverse_diffusion-2069714227 Output()之后进度条不动 #2201

Open TimeToBed opened 1 year ago

TimeToBed commented 1 year ago

paddlepaddle 以及paddlehub版本满足要求 终端: UserWarning: Setuptools is replacing distutils. warnings.warn("Setuptools is replacing distutils.")

W0204 12:21:43.541858 19944 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 8.6, Driver API Version: 11.6, Runtime API Version: 11.6 W0204 12:21:43.552976 19944 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4. disco_diffusion_clip_rn101.reverse_diffusion-828390671 环境安装都没有问题,但是进度条不动并且自动退出 disco_diffusion_clip_rn50.reverse_diffusion - INFO - creating artwork... disco_diffusion_clip_rn50.reverse_diffusion-2069714227 Output() 0%| | 0/250 [00:00<?, ?it/s]

TimeToBed commented 1 year ago

经过debug后,发现在UNetModel中进行forward时会卡住,具体原因未知: 代码: 类class UNetModel(nn.Layer) 函数 forward for module in self.input_blocks: h = module(h, emb) #此处出现卡死自动退出 hs.append(h)

rainyfly commented 1 year ago

请问你调用的代码或者命令是啥呢

TimeToBed commented 1 year ago

我是直接调用的API(和demo里一样)

module = hub.Module(name="disco_diffusion_clip_rn101") text_prompts = ["A beautiful painting of a singular lighthouse..."] da = module.generate_image(text_prompts=text_prompts, output_dir='./outcome/',width_height=[512,512])

在运行 module.generate_image 时会出现上述问题

rainyfly commented 1 year ago

一时我也不好判定是不是啥环境问题导致的,这个模型所耗费的显存非常大,一般显存可能带不动,这边建议可以直接在aistudio上用免费显卡进行尝试,我刚刚上了这个项目测了下,发现这个模型在aistudio上还是能跑的。 https://aistudio.baidu.com/aistudio/projectdetail/4444984?channelType=0&channel=0

TimeToBed commented 1 year ago

好的感谢,我去试一下