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