Commit 0a15111
Fix huggingface#12116: preserve boolean dtype for attention masks in ChromaPipeline (huggingface#12263)
* fix: preserve boolean dtype for attention masks in ChromaPipeline
- Convert attention masks to bool and prevent dtype corruption
- Fix both positive and negative mask handling in _get_t5_prompt_embeds
- Remove float conversion in _prepare_attention_mask method
Fixes huggingface#12116
* test: add ChromaPipeline attention mask dtype tests
* test: add slow ChromaPipeline attention mask tests
* chore: removed comments
* refactor: removing redundant type conversion
* Remove dedicated dtype tests as per feedback
---------
Co-authored-by: Dhruv Nair <[email protected]>1 parent 19085ac commit 0a15111
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
| 241 | + | |
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
249 | | - | |
| 249 | + | |
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
| |||
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
608 | | - | |
| 608 | + | |
609 | 609 | | |
610 | 610 | | |
611 | | - | |
612 | 611 | | |
613 | 612 | | |
614 | 613 | | |
| |||
0 commit comments