Skip to content

Commit 9116a05

Browse files
committed
modify comment on ti
1 parent a61c93f commit 9116a05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/community/pipeline_flux_rf_inversion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -834,10 +834,11 @@ def __call__(
834834

835835
if do_rf_inversion:
836836
y_0 = image_latents.clone()
837-
# 6. Denoising loop
837+
# 6. Denoising loop / Controlled Reverse ODE, Algorithm 2 from: https://arxiv.org/pdf/2410.10792
838838
with self.progress_bar(total=num_inference_steps) as progress_bar:
839839
for i, t in enumerate(timesteps):
840840
if do_rf_inversion:
841+
# ti (current timestep) as annotated in algorithm 2 - i/num_inference_steps.
841842
t_i = 1 - t / 1000
842843
dt = torch.tensor(1 / (len(timesteps) - 1), device=device)
843844

@@ -862,7 +863,6 @@ def __call__(
862863
latents_dtype = latents.dtype
863864
if do_rf_inversion:
864865
v_t = -noise_pred
865-
866866
v_t_cond = (y_0 - latents) / (1 - t_i)
867867
eta_t = eta if start_timestep <= i < stop_timestep else 0.0
868868
if start_timestep <= i < stop_timestep:

0 commit comments

Comments
 (0)