fastai/diffusion-nbs

How to get pred_original_sample when using PNDMScheduler

dzlab opened this issue · 1 comments

dzlab commented

@johnowhitaker in the Stable Diffusion Deep Dive.ipynb notebook, section The UNET and CFG.

You get latents_x0 because the scheduler exposes pred_original_sample

    latents_x0 = scheduler.step(noise_pred, t, latents).pred_original_sample # Using the scheduler (Diffusers 0.4 and above)

How to get this pred_original_sample when using PNDMScheduler? As this scheduler does not expose this value.

I edited some schedulers to expose that a while back, I'll see how easy it is to do the same for PNDMScheduler, but that could take a while :)