Skip to content

Commit 33e3679

Browse files
better naming
1 parent 0071203 commit 33e3679

File tree

87 files changed

+178
-178
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+178
-178
lines changed

examples/community/composable_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ def __call__(
562562
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
563563
progress_bar.update()
564564
if callback is not None and i % callback_steps == 0:
565-
step_idx = i // getattr("scheduler", "order", 1)
566-
callback(step_idx, t, latents)
565+
callback_idx = i // getattr("scheduler", "order", 1)
566+
callback(callback_idx, t, latents)
567567

568568
# 8. Post-processing
569569
image = self.decode_latents(latents)

examples/community/img2img_inpainting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ def __call__(
434434

435435
# call the callback, if provided
436436
if callback is not None and i % callback_steps == 0:
437-
step_idx = i // getattr("scheduler", "order", 1)
438-
callback(step_idx, t, latents)
437+
callback_idx = i // getattr("scheduler", "order", 1)
438+
callback(callback_idx, t, latents)
439439

440440
latents = 1 / 0.18215 * latents
441441
image = self.vae.decode(latents).sample

examples/community/interpolate_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ def __call__(
372372

373373
# call the callback, if provided
374374
if callback is not None and i % callback_steps == 0:
375-
step_idx = i // getattr("scheduler", "order", 1)
376-
callback(step_idx, t, latents)
375+
callback_idx = i // getattr("scheduler", "order", 1)
376+
callback(callback_idx, t, latents)
377377

378378
latents = 1 / 0.18215 * latents
379379
image = self.vae.decode(latents).sample

examples/community/lpw_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,8 +1088,8 @@ def __call__(
10881088
progress_bar.update()
10891089
if i % callback_steps == 0:
10901090
if callback is not None:
1091-
step_idx = i // getattr("scheduler", "order", 1)
1092-
callback(step_idx, t, latents)
1091+
callback_idx = i // getattr("scheduler", "order", 1)
1092+
callback(callback_idx, t, latents)
10931093
if is_cancelled_callback is not None and is_cancelled_callback():
10941094
return None
10951095

examples/community/lpw_stable_diffusion_onnx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,8 +846,8 @@ def __call__(
846846
# call the callback, if provided
847847
if i % callback_steps == 0:
848848
if callback is not None:
849-
step_idx = i // getattr("scheduler", "order", 1)
850-
callback(step_idx, t, latents)
849+
callback_idx = i // getattr("scheduler", "order", 1)
850+
callback(callback_idx, t, latents)
851851
if is_cancelled_callback is not None and is_cancelled_callback():
852852
return None
853853

examples/community/lpw_stable_diffusion_xl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,8 +1182,8 @@ def __call__(
11821182
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
11831183
progress_bar.update()
11841184
if callback is not None and i % callback_steps == 0:
1185-
step_idx = i // getattr("scheduler", "order", 1)
1186-
callback(step_idx, t, latents)
1185+
callback_idx = i // getattr("scheduler", "order", 1)
1186+
callback(callback_idx, t, latents)
11871187

11881188
if not output_type == "latent":
11891189
# make sure the VAE is in float32 mode, as it overflows in float16

examples/community/masked_stable_diffusion_img2img.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ def __call__(
202202
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
203203
progress_bar.update()
204204
if callback is not None and i % callback_steps == 0:
205-
step_idx = i // getattr("scheduler", "order", 1)
206-
callback(step_idx, t, latents)
205+
callback_idx = i // getattr("scheduler", "order", 1)
206+
callback(callback_idx, t, latents)
207207

208208
if not output_type == "latent":
209209
scaled = latents / self.vae.config.scaling_factor

examples/community/multilingual_stable_diffusion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ def __call__(
407407

408408
# call the callback, if provided
409409
if callback is not None and i % callback_steps == 0:
410-
step_idx = i // getattr("scheduler", "order", 1)
411-
callback(step_idx, t, latents)
410+
callback_idx = i // getattr("scheduler", "order", 1)
411+
callback(callback_idx, t, latents)
412412

413413
latents = 1 / 0.18215 * latents
414414
image = self.vae.decode(latents).sample

examples/community/pipeline_prompt2prompt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ def __call__(
254254
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
255255
progress_bar.update()
256256
if callback is not None and i % callback_steps == 0:
257-
step_idx = i // getattr("scheduler", "order", 1)
258-
callback(step_idx, t, latents)
257+
callback_idx = i // getattr("scheduler", "order", 1)
258+
callback(callback_idx, t, latents)
259259

260260
# 8. Post-processing
261261
if not output_type == "latent":

examples/community/pipeline_zero1to3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ def __call__(
865865
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
866866
progress_bar.update()
867867
if callback is not None and i % callback_steps == 0:
868-
step_idx = i // getattr("scheduler", "order", 1)
869-
callback(step_idx, t, latents)
868+
callback_idx = i // getattr("scheduler", "order", 1)
869+
callback(callback_idx, t, latents)
870870

871871
# 8. Post-processing
872872
has_nsfw_concept = None

0 commit comments

Comments
 (0)