castorini / daam

Diffusion attentive attribution maps for interpreting Stable Diffusion.
MIT License
689 stars 63 forks source link

Report a mistake(maybe) #44

Closed SDaoer closed 1 year ago

SDaoer commented 1 year ago

Thanks for your code. I am following your work, and I found a piece of confusing code that might be a mistake. It is in the file hook.py lines 103 and 104: up_names = ['up'] * len(model.up_blocks) down_names = ['down'] * len(model.up_blocks) Shouldn't it probably be: down_names = ['down'] * len(model.down_blocks)

daemon commented 1 year ago

Ah yeah, that's more robust for models without the same number of upsampling and downsampling blocks. I'll fix that soon.