eeuuia commited on
Commit
1d6fdbc
·
verified ·
1 Parent(s): c7126ee

Update api/ltx/ltx_aduc_pipeline.py

Browse files
Files changed (1) hide show
  1. api/ltx/ltx_aduc_pipeline.py +5 -3
api/ltx/ltx_aduc_pipeline.py CHANGED
@@ -204,6 +204,7 @@ class LtxAducPipeline:
204
 
205
  if chunk_latents is None: raise RuntimeError(f"Failed to generate latents for scene {i+1}.")
206
 
 
207
  if is_narrative and i < num_chunks - 1:
208
  overlap_latents = chunk_latents[:, :, -overlap_frames:, :, :].clone()
209
  overlap_condition_item = LatentConditioningItem(
@@ -211,10 +212,11 @@ class LtxAducPipeline:
211
  media_frame_number=0,
212
  conditioning_strength=1.0
213
  )
214
- call_kwargs.pop("conditioning_items", None)
215
- call_kwargs["conditioning_items"] = overlap_condition_item
216
  else:
217
- call_kwargsl.pop("conditioning_items", None)
 
218
 
219
  if i > 0: chunk_latents = chunk_latents[:, :, overlap_frames:, :, :]
220
 
 
204
 
205
  if chunk_latents is None: raise RuntimeError(f"Failed to generate latents for scene {i+1}.")
206
 
207
+ # BLOCO NOVO E CORRIGIDO
208
  if is_narrative and i < num_chunks - 1:
209
  overlap_latents = chunk_latents[:, :, -overlap_frames:, :, :].clone()
210
  overlap_condition_item = LatentConditioningItem(
 
212
  media_frame_number=0,
213
  conditioning_strength=1.0
214
  )
215
+ # A correção chave é colocar o item DENTRO de uma lista
216
+ call_kwargs["conditioning_items"] = [overlap_condition_item]
217
  else:
218
+ # Remove a chave se não houver mais condicionamento
219
+ call_kwargs.pop("conditioning_items", None)
220
 
221
  if i > 0: chunk_latents = chunk_latents[:, :, overlap_frames:, :, :]
222