Skip to content

Fix #507: fix: pass attention_mask to T5/CLIP encoder in HFEmbedder#511

Draft
nandanadileep wants to merge 1 commit into
black-forest-labs:mainfrom
nandanadileep:agent/issue-507-fix-pass-attentionmask
Draft

Fix #507: fix: pass attention_mask to T5/CLIP encoder in HFEmbedder#511
nandanadileep wants to merge 1 commit into
black-forest-labs:mainfrom
nandanadileep:agent/issue-507-fix-pass-attentionmask

Conversation

@nandanadileep

Copy link
Copy Markdown

Fixes #507

Changed attention_mask=None to attention_mask=batch_encoding["attention_mask"].to(self.hf_module.device) in HFEmbedder.forward() at src/flux/modules/conditioner.py:34 so that padding tokens are properly masked out for both T5 and CLIP encoders.

Local test infra unavailable in CI sandbox.


This change was prepared with AI assistance under human direction and review.

…r in HFEmbedder

Signed-off-by: nandanadileep <nandanadileep29@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant