mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
Remove previous denoised prediction from callback.
This commit is contained in:
@@ -511,11 +511,11 @@ class StableDiffusionPipeline(DiffusionPipeline):
|
||||
noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond)
|
||||
|
||||
# compute the previous noisy sample x_t -> x_t-1
|
||||
latents, t, pred_original_sample = self.scheduler.step(noise_pred, t, latents, return_dict=False, **extra_step_kwargs)
|
||||
latents, t = self.scheduler.step(noise_pred, t, latents, return_dict=False, **extra_step_kwargs)
|
||||
|
||||
# call the callback, if provided
|
||||
if callback is not None and i % callback_steps == 0:
|
||||
callback(i, t, latents, pred_original_sample)
|
||||
callback(i, t, latents)
|
||||
|
||||
i += 1
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ class HeunDiscreteScheduler(SchedulerMixin, ConfigMixin):
|
||||
print(f"step_index: {step_index}, state_in_first_order: {self.state_in_first_order}, sigma: {sigma}, sigma_next: {sigma_next}, sigma_hat: {sigma_hat}, dt: {dt}")
|
||||
|
||||
if not return_dict:
|
||||
return (prev_sample, self.timesteps[step_index], pred_original_sample)
|
||||
return (prev_sample, self.timesteps[step_index])
|
||||
|
||||
return SchedulerOutput(prev_sample=prev_sample, timestep=self.timesteps[step_index])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user