question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

train_unconditional.py fails on call to evaluate()

See original GitHub issue

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’

image

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
anton-lcommented, Oct 17, 2022

@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

1reaction
omer-dorcommented, Oct 7, 2022

@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 image

to .images

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to train on custom dataset? · Issue #2 - GitHub
The error I get is this: D:\pro_gan_pytorch-examples\implementation>python generate.py Traceback (most recent call last): File "generate.py" ...
Read more >
Failed to evaluate transaction: Error: You've asked to invoke a ...
This is an AdminContract smart contract that inherits CommonContract and has a single function getLastPatientId() it generally returns the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found