dagloop5 commited on
Commit
ab1ad4a
·
verified ·
1 Parent(s): cf86fc1

Update h3_dpmpp_2s_ancestral.py

Browse files
Files changed (1) hide show
  1. h3_dpmpp_2s_ancestral.py +4 -1
h3_dpmpp_2s_ancestral.py CHANGED
@@ -153,7 +153,10 @@ class MiniMaxH3DPMpp2SAncestralStep(ModularPipelineBlocks):
153
  def __call__(self, components: MiniMaxH3ModularPipeline, block_state: BlockState, i: int, t: torch.Tensor):
154
  ncv = block_state.num_condition_video_rows
155
  nca = block_state.num_condition_audio_rows
156
- is_last_step = i == len(block_state.row_timestep_plan) - 1
 
 
 
157
 
158
  # --- first (real) evaluation, identical to MiniMaxH3LoopDenoiser ---
159
  unique_timesteps, timestep_indices = block_state.row_timestep_plan[i]
 
153
  def __call__(self, components: MiniMaxH3ModularPipeline, block_state: BlockState, i: int, t: torch.Tensor):
154
  ncv = block_state.num_condition_video_rows
155
  nca = block_state.num_condition_audio_rows
156
+ # Not the loop's own last index — for a Staged Denoising slice that's this *stage's* last step, not
157
+ # necessarily the trajectory's. `components.scheduler.sigmas[i + 1] == 0.0` is the real end regardless
158
+ # of how many steps this particular call's schedule holds.
159
+ is_last_step = float(components.scheduler.sigmas[i + 1]) == 0.0
160
 
161
  # --- first (real) evaluation, identical to MiniMaxH3LoopDenoiser ---
162
  unique_timesteps, timestep_indices = block_state.row_timestep_plan[i]