diffusers
diffusers copied to clipboard
train_unconditional.py fails on call to evaluate()
Describe the bug
On the first attempt to call evaluate()
in the train_loop() function, the DDPMPipeline fails due to an incompatible output form the model.
This raises an AttributeError: 'dict' object has no attribute 'shape'
Reproduction
Currently encountered when running the collab notebook unaltered.
Logs
Logs included in bug description.
System Info
Google Collab Notebook found at https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb
Hi @jdk514! This is related to a bugfix that will be included in tomorrow's release: https://github.com/huggingface/diffusers/pull/570
Until then, please replace !pip install diffusers[training]=0.3.0
in the top cell with !pip install git+https://github.com/huggingface/diffusers.git#egg=diffusers[training]
to use the latest version with the fix
@anton-l @jdk514 did any of you manage to run it with:
!pip install git+https://github.com/huggingface/diffusers.git
It now shows this to me:
AttributeError: 'ImagePipelineOutput' object has no attribute 'sample'
@anton-l @jdk514 did any of you manage to run it with:
!pip install git+https://github.com/huggingface/diffusers.git
It now shows this to me:
AttributeError: 'ImagePipelineOutput' object has no attribute 'sample'
In evaluate function, this worked for me:
I changed .sample
to .images
Hi, I replaced !pip install diffusers[training]=0.3.0 with !pip install git+https://github.com/huggingface/diffusers.git, but I'm getting the following error:
It is the original notebook , I did not modify anything more than the line I mentioned.
It is worth mentioning that a few days ago I did the same procedure and it did not throw me this error.
I'm going to help myself :), after some thought I realized that omitting the second argument tensor_format="pt" works fine.
I was afraid something would go wrong but it works fine, the training was successful and the generated images are consistent.
@LuisGalvezCarrasco indeed, tensor_format
has been deprecated in the latest version :)
Updated the training notebook to diffusers==0.5.1
: https://colab.research.google.com/github/huggingface/notebooks/blob/main/diffusers/training_example.ipynb