Skip to content

Conversation

@willdalh
Copy link
Contributor

@willdalh willdalh commented Jan 16, 2023

Fixes #1918.

Loading DDPMs in a PNDMPipeline (shown in the code below) will produce noisy results as the scheduler is not a PNDMScheduler.

from diffusers import PNDMPipeline
model_id = "google/ddpm-cifar10-32"
pndm = PNDMPipeline.from_pretrained(model_id)
images = pndm(num_inference_steps=50, batch_size=3).images

image

Changing the scheduler after creating the pipeline will give the expected results.

from diffusers import PNDMPipeline, PNDMScheduler
model_id = "google/ddpm-cifar10-32"
pndm = PNDMPipeline.from_pretrained(model_id)
pndm.scheduler = PNDMScheduler.from_config(pndm.scheduler.config)
images = pndm(num_inference_steps=50, batch_size=3).images

image

The fix is similar to #1932, where the scheduler is manually set in the constructor of the pipeline.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jan 16, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Thanks!

@patrickvonplaten patrickvonplaten merged commit b2ea8a8 into huggingface:main Jan 16, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
* pndmpipeline uses pndmscheduler

* formatted pipeline_pndm
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.

issue with DDIM scheduler for google/ddpm-celebahq-256 example

3 participants