Closed wangherr closed 1 year ago
Have you solved this problem yet? I think the reason for this error is that vae's optimizer does a "step" before the SGM loss back propagation, which causes the gradient of SGM loss to be modified. The solution is to detach the gradient of the eps or adjust the position of the "step" of the vae optimizer to after the backpropagation of the SGM loss. I am not sure how the author ran the code, it may be related to the Pytorch version.
Have you solved this problem yet? I think the reason for this error is that vae's optimizer does a "step" before the SGM loss back propagation, which causes the gradient of SGM loss to be modified. The solution is to detach the gradient of the eps or adjust the position of the "step" of the vae optimizer to after the backpropagation of the SGM loss. I am not sure how the author ran the code, it may be related to the Pytorch version.
I forget how to solve it. Maybe the environment is the key. About diffusion models and latent diffusion models, there are more easier code you could try.
I have the same issue. Do you remember how to solve it ?
my env :
Python 3.9.12 torch 1.8.0+cu111 torchvision 0.9.0+cu111
commond:
wrong:
my env: