10 Commits

Author SHA1 Message Date
comfyanonymous
35324c6a52 Allow disabling pe in flux code for some other models. 2025-03-18 05:09:25 -04:00
comfyanonymous
7761e410ec Cleanup code. 2025-03-16 06:29:12 -04:00
HishamC
f49d8d3d1e Fix for running via DirectML (#6542)
* Fix for running via DirectML

Fix DirectML empty image generation issue with Flux1. add CPU fallback for unsupported path. Verified the model works on AMD GPUs

* fix formating

* update casual mask calculation
2025-02-11 17:11:32 -05:00
comfyanonymous
220f470bfa Slightly lower hunyuan video memory usage. 2025-01-16 00:23:01 -05:00
Raphael Walker
ec2ea78501 Add support for attention masking in Flux (#5942)
* fix attention OOM in xformers

* allow passing attention mask in flux attention

* allow an attn_mask in flux

* attn masks can be done using replace patches instead of a separate dict

* fix return types

* fix return order

* enumerate

* patch the right keys

* arg names

* fix a silly bug

* fix xformers masks

* replace match with if, elif, else

* mask with image_ref_size

* remove unused import

* remove unused import 2

* fix pytorch/xformers attention

This corrects a weird inconsistency with skip_reshape.
It also allows masks of various shapes to be passed, which will be
automtically expanded (in a memory-efficient way) to a size that is
compatible with xformers or pytorch sdpa respectively.

* fix mask shapes
2024-12-16 18:21:17 -05:00
a-One-Fan
2e56b50183 Fix Flux FP64 math on XPU (#4210) 2024-08-05 01:26:20 -04:00
comfyanonymous
bd6f023ff6 Try to fix mac issue. 2024-08-01 13:41:27 -04:00
comfyanonymous
30a15dd5e1 Better Mac support on flux model. 2024-08-01 13:10:50 -04:00
comfyanonymous
96dbbd23d8 Fix old python versions no longer working. 2024-08-01 09:57:20 -04:00
comfyanonymous
fc6a27f36c Basic Flux Schnell and Flux Dev model implementation. 2024-08-01 09:49:29 -04:00