Skip to content

Conversation

@anton-l
Copy link
Member

@anton-l anton-l commented Nov 9, 2022

Follow-up to #1189
Allows DDIM to still be used with a cpu generator and eta>0 in DDIMPipeline

@HuggingFaceDocBuilder
Copy link

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Comment on lines +86 to +89
generator = torch.manual_seed(0)
# set eta > 0 to test the variance noise generation
image = ddim(generator=generator, eta=1.0, num_inference_steps=2, output_type="numpy").images
image_slice = image[0, -3:, -3:, -1]
Copy link
Member Author

@anton-l anton-l Nov 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tests fails with a device mismatch without the proposed change

@anton-l anton-l requested review from patil-suraj, patrickvonplaten and pcuenca and removed request for patil-suraj November 9, 2022 12:17
@anton-l anton-l requested a review from patil-suraj November 9, 2022 12:18
@HuggingFaceDocBuilder
Copy link

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@pcuenca
Copy link
Member

pcuenca commented Nov 9, 2022

MPS tests fail, do you want me to take a look?

@anton-l
Copy link
Member Author

anton-l commented Nov 9, 2022

@pcuenca yeah, I think those accumulated over the past two days 😅

@anton-l
Copy link
Member Author

anton-l commented Nov 9, 2022

Superseded by #1222

@anton-l anton-l closed this Nov 9, 2022
@anton-l anton-l deleted the fix-ddim-cpu-generator branch November 17, 2022 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants