gkalstn0 Claude Opus 4.6 (1M context) commited on
Commit
2134e9d
·
1 Parent(s): eabf2fa

feat: skip encoder_attention_mask in guider when mask is None

Browse files

After batch=1 trimming sets prompt_attention_mask=None, prevent
passing None masks to the guider even when use_attention_mask=True.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. pipeline_motif_video.py +1 -1
pipeline_motif_video.py CHANGED
@@ -1250,7 +1250,7 @@ class MotifVideoPipeline(DiffusionPipeline):
1250
  guider_inputs = {
1251
  "encoder_hidden_states": (prompt_embeds, negative_prompt_embeds),
1252
  }
1253
- if use_attention_mask:
1254
  guider_inputs["encoder_attention_mask"] = (
1255
  prompt_attention_mask,
1256
  negative_prompt_attention_mask,
 
1250
  guider_inputs = {
1251
  "encoder_hidden_states": (prompt_embeds, negative_prompt_embeds),
1252
  }
1253
+ if use_attention_mask and prompt_attention_mask is not None:
1254
  guider_inputs["encoder_attention_mask"] = (
1255
  prompt_attention_mask,
1256
  negative_prompt_attention_mask,