Skip to content

Fix DDIM for eta>0 and a cpu generator - #1215

Closed
anton-l wants to merge 3 commits into
mainfrom
fix-ddim-cpu-generator
Closed

Fix DDIM for eta>0 and a cpu generator#1215
anton-l wants to merge 3 commits into
mainfrom
fix-ddim-cpu-generator

Conversation

@anton-l

Copy link
Copy Markdown
Member

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

@HuggingFaceDocBuilder

Copy link
Copy Markdown

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]

@anton-lanton-lNov 9, 2022

Copy link
Copy Markdown
MemberAuthor

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-surajNovember 9, 2022 12:17
@HuggingFaceDocBuilder

Copy link
Copy Markdown

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

@patil-surajpatil-suraj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment threadsrc/diffusers/schedulers/scheduling_ddim.py Outdated
@pcuenca

Copy link
Copy Markdown
Member

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

@anton-l

Copy link
Copy Markdown
MemberAuthor

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

Co-authored-by: Suraj Patil <surajp815@gmail.com>
@anton-l

Copy link
Copy Markdown
MemberAuthor

Superseded by #1222

@anton-lanton-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 freeto 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.

4 participants

@anton-l@HuggingFaceDocBuilder@pcuenca@patil-suraj