Skip to content

Commit 3228eb1

Browse files
authored
allow pndm scheduler to be used with ldm pipeline (huggingface#165)
1 parent c1488ff commit 3228eb1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __call__(
7979
noise_pred = noise_pred_uncond + guidance_scale * (noise_prediction_text - noise_pred_uncond)
8080

8181
# compute the previous noisy sample x_t -> x_t-1
82-
latents = self.scheduler.step(noise_pred, t, latents, eta)["prev_sample"]
82+
latents = self.scheduler.step(noise_pred, t, latents, eta=eta)["prev_sample"]
8383

8484
# scale and decode the image latents with vae
8585
latents = 1 / 0.18215 * latents

src/diffusers/schedulers/scheduling_pndm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ def step(
116116
model_output: Union[torch.FloatTensor, np.ndarray],
117117
timestep: int,
118118
sample: Union[torch.FloatTensor, np.ndarray],
119+
**kwargs,
119120
):
120121
if self.counter < len(self.prk_timesteps):
121122
return self.step_prk(model_output=model_output, timestep=timestep, sample=sample)

0 commit comments

Comments
 (0)