horseee / DeepCache

[CVPR 2024] DeepCache: Accelerating Diffusion Models for Free
https://horseee.github.io/Diffusion_DeepCache/
Apache License 2.0
767 stars 36 forks source link

LDM experiment #44

Closed xiaoxiaodadada closed 2 months ago

xiaoxiaodadada commented 4 months ago

When will the code for the LDM experiment be updated? Thanks

horseee commented 4 months ago

Hi, you can use this command to generate images in LDM:

torchrun --nproc_per_node 8 sample_ddp_deepcache.py --replicate_interval 5 --nonuniform --pow 1.4 --center 110
xiaoxiaodadada commented 4 months ago

thank you

xiaoxiaodadada commented 4 months ago

我所运行的是ldm无条件生成的模型,在采样的时候会出现 Traceback (most recent call last): File "sample_ddp_deepcache.py", line 196, in main() File "sample_ddp_deepcache.py", line 120, in main uc = model.get_learned_conditioning( File "/data1/zhuyifan/latent-diffusion-main/ldm/models/diffusion/ddpm_cache.py", line 558, in get_learned_conditioning c = self.cond_stage_model(c) TypeError: 'NoneType' object is not callable 这种错误,请问可以帮我提出解决思路吗,谢谢

horseee commented 3 months ago

这份代码目前只支持复现论文中所提及的条件生成(LDM-4-G on ImageNet)。如果要做无条件生成的话,需要相应的修改LDM中无条件生成的采样脚本以及模型推理代码。

xiaoxiaodadada commented 3 months ago

好的谢谢