ashawkey / stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Apache License 2.0
8.05k stars 713 forks source link

AttributeError: 'DiagonalGaussianDistribution' object has no attribute 'latent_dist' #39

Closed fanweiya closed 1 year ago

fanweiya commented 1 year ago
ou have run `huggingface-cli login`.
[INFO] loading stable diffusion...
[INFO] loaded stable diffusion!
[INFO] Trainer: df | 2022-10-13_13-00-38 | cuda | fp16 | trial_dog
[INFO] #parameters: 12249015
[INFO] Loading latest checkpoint ...
[WARN] No checkpoint found, model randomly initialized.
==> Start Training trial_dog Epoch 1, lr=0.010000 ...
  0% 0/100 [00:00<?, ?it/s]Traceback (most recent call last):
  File "main.py", line 153, in <module>
    trainer.train(train_loader, valid_loader, max_epoch)
  File "/data/GAN/stable-dreamfusion/nerf/utils.py", line 458, in train
    self.train_one_epoch(train_loader)
  File "/data/GAN/stable-dreamfusion/nerf/utils.py", line 678, in train_one_epoch
    pred_rgbs, pred_ws, loss = self.train_step(data)
  File "/data/GAN/stable-dreamfusion/nerf/utils.py", line 358, in train_step
    loss = self.guidance.train_step(text_z, pred_rgb)
  File "/data/GAN/stable-dreamfusion/nerf/sd.py", line 79, in train_step
    latents = self.encode_imgs(pred_rgb_512)
  File "/data/GAN/stable-dreamfusion/nerf/sd.py", line 153, in encode_imgs
    posterior = self.vae.encode(imgs).latent_dist
AttributeError: 'DiagonalGaussianDistribution' object has no attribute 'latent_dist'
  0% 0/100 [00:00<?, ?it/s]
bennyguo commented 1 year ago

Your diffusers package is too old. Update diffusers to the latest version (0.4.1) would solve the issue.

fanweiya commented 1 year ago

thanks

Your diffusers package is too old. Update diffusers to the latest version (0.4.1) would solve the issue.