VainF / Diff-Pruning

[NeurIPS 2023] Structural Pruning for Diffusion Models
Apache License 2.0
153 stars 10 forks source link

LDM Pruning code #7

Open JinyangMarkLiu opened 6 months ago

JinyangMarkLiu commented 6 months ago

Hi, thank you for sharing the amazing and inspiring pruning work! We have a question related to the pruning code for LDM.We are confused why in the prune_ldm.py line 120 the sampled latent is further encoded with the encoder and then feed into the model for calculating the loss at time t. Shouldn't it just be the sampled latent without encoding? Thanks!

VainF commented 6 months ago

Hello @JinyangMarkLiu, we used ImageNet images for pruning. I don't remember why this script generated samples for importance estimation. I guess I modified the original code for exploration. Let me check the code version.