Spaces:
Runtime error
Runtime error
Update injection_main.py
Browse files- injection_main.py +6 -9
injection_main.py
CHANGED
@@ -325,16 +325,13 @@ def invert(
|
|
325 |
pipe.scheduler.set_timesteps(num_inference_steps, device=device)
|
326 |
|
327 |
# Reversed timesteps <<<<<<<<<<<<<<<<<<<<
|
328 |
-
timesteps =
|
329 |
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
i = int(i)
|
336 |
-
else:
|
337 |
-
raise TypeError(f"Unexpected type for iteration variable: {type(i)}")
|
338 |
|
339 |
# We'll skip the final iteration
|
340 |
if i >= num_inference_steps - 1:
|
|
|
325 |
pipe.scheduler.set_timesteps(num_inference_steps, device=device)
|
326 |
|
327 |
# Reversed timesteps <<<<<<<<<<<<<<<<<<<<
|
328 |
+
timesteps = reversed(pipe.scheduler.timesteps)
|
329 |
|
330 |
+
for i in progress.tqdm(
|
331 |
+
range(1, num_inference_steps),
|
332 |
+
total=num_inference_steps - 1,
|
333 |
+
desc="DDIM Inversion",
|
334 |
+
):
|
|
|
|
|
|
|
335 |
|
336 |
# We'll skip the final iteration
|
337 |
if i >= num_inference_steps - 1:
|