sjtuplayer / anomalydiffusion

[AAAI 2024] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model
MIT License
114 stars 14 forks source link

您好,想问一个代码问题 #22

Open SorryMaker666 opened 4 months ago

SorryMaker666 commented 4 months ago

我对您如何实现spatial anomaly embedding和adaptive attention re-weighting部分很感兴趣,看了您的main.py脚本,发现里面没有这部分内容,随后又看了txt2img-1p4B-finetune-encoder+embedding.yaml的配置脚本,请问关于上面两个方法的实现是在ldm.models.diffusion.ddpm.LatentDiffusion中吗,具体是在哪一部分,还是在其他脚本中呢?

sjtuplayer commented 4 months ago

你好,spatial anomaly embedding在ldm\modules\embedding_manager2.py中,adaptive attention re-weighting在ldm\models\diffusion\ddim.py中的ddim_sampling

SorryMaker666 commented 4 months ago

谢谢!!!

SorryMaker666 commented 4 months ago

你好,想问一下2080Ti能跑动这个代码吗