diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

What's the difference between PNDM and plms

Open dingjingzhen opened this issue 2 years ago • 2 comments

What's the difference between PNDM and plms,plms for CompVis/stable-diffusion-v1-4-origin

dingjingzhen avatar Oct 24 '22 08:10 dingjingzhen

Good question!

The short answer:

They are the same!

The long answer:

PNDM was suggested by the PNDM paper (Pseudo Numerical Methods for Diffusion Models on Manifolds) with PNDM standing for Pseudo Numerical Methods for Diffusion Models . The algorithm for PNDMs is defined concisely in Algorithm 2 where you can see that the first loop is called PRK and the second loop is called PLMS. So one can state the PLMS is a submethod/sub-scheduler of the PNDM scheduler. BTW PLMS stands for pseudo-linear multi-step.

Now practically the CompVis PLMS sampler is identical to the diffusers PNDM scheduler if you set config.skip_prk_steps=True which is done in the original diffusers CompVis/stable-diffusion-v1-4 repo: https://huggingface.co/CompVis/stable-diffusion-v1-4/blob/main/scheduler/scheduler_config.json#L8

patrickvonplaten avatar Oct 26 '22 12:10 patrickvonplaten

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Nov 23 '22 15:11 github-actions[bot]