Spaces:
Running
on
Zero
Running
on
Zero
Update injection_main.py
Browse files- injection_main.py +3 -1
injection_main.py
CHANGED
@@ -328,9 +328,10 @@ def invert(
|
|
328 |
timesteps = list(reversed(pipe.scheduler.timesteps))
|
329 |
|
330 |
# Initialize tqdm progress bar
|
331 |
-
progress_bar = tqdm(range(1
|
332 |
|
333 |
for i in progress_bar:
|
|
|
334 |
# We'll skip the final iteration
|
335 |
if i >= num_inference_steps - 1:
|
336 |
continue
|
@@ -376,6 +377,7 @@ def invert(
|
|
376 |
|
377 |
|
378 |
|
|
|
379 |
def style_image_with_inversion(
|
380 |
pipe,
|
381 |
input_image,
|
|
|
328 |
timesteps = list(reversed(pipe.scheduler.timesteps))
|
329 |
|
330 |
# Initialize tqdm progress bar
|
331 |
+
progress_bar = tqdm(range(num_inference_steps - 1), total=num_inference_steps - 1, desc="DDIM Inversion")
|
332 |
|
333 |
for i in progress_bar:
|
334 |
+
i = int(i) # Explicitly convert i to int
|
335 |
# We'll skip the final iteration
|
336 |
if i >= num_inference_steps - 1:
|
337 |
continue
|
|
|
377 |
|
378 |
|
379 |
|
380 |
+
|
381 |
def style_image_with_inversion(
|
382 |
pipe,
|
383 |
input_image,
|