CompVis / latent-diffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
11.42k stars 1.49k forks source link

TypeError: expected Tensor as element 0 in argument 0, but got DiagonalGaussianDistribution #364

Open yanjin340121 opened 4 months ago

yanjin340121 commented 4 months ago

TypeError: expected Tensor as element 0 in argument 0, but got DiagonalGaussianDistribution File "/home/yj/projects/07-diffusion/latent-diffusion-main/ldm/models/diffusion/ddpm.py", line 850, in encode_first_stage o = torch.stack(output_list, axis=-1) When I try to use the super-resolution inference model, the above error occurs because when using autoencoder-kl, the DiagonalGaussianDistribution class data will be returned, resulting in the inability to concat. Has anyone encountered a similar situation? image image

jianliang90 commented 1 month ago

I have the same problem doing superresolution, did you find soulution?