Skip to content

Commit b247c5f

Browse files
committed
try with strength
1 parent b3549fb commit b247c5f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/diffusers/pipelines/sana/pipeline_sana_sprint_img2img.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -850,12 +850,12 @@ def __call__(
850850
if hasattr(self.scheduler, "set_begin_index"):
851851
self.scheduler.set_begin_index(0)
852852

853-
#timesteps, num_inference_steps = self.get_timesteps(num_inference_steps, strength, device)
854-
# if num_inference_steps < 1:
855-
# raise ValueError(
856-
# f"After adjusting the num_inference_steps by strength parameter: {strength}, the number of pipeline"
857-
# f"steps is {num_inference_steps} which is < 1 and not appropriate for this pipeline."
858-
# )
853+
timesteps, num_inference_steps = self.get_timesteps(num_inference_steps, strength, device)
854+
if num_inference_steps < 1:
855+
raise ValueError(
856+
f"After adjusting the num_inference_steps by strength parameter: {strength}, the number of pipeline"
857+
f"steps is {num_inference_steps} which is < 1 and not appropriate for this pipeline."
858+
)
859859
latent_timestep = timesteps[:1].repeat(batch_size * num_images_per_prompt)
860860

861861
# 5. Prepare latents.

0 commit comments

Comments
 (0)