comfyanonymous
c19335f030
Cleanup.
2024-05-18 10:11:44 -04:00
comfyanonymous
fddf60ebb7
Remove unnecessary code.
2024-05-18 09:36:44 -04:00
comfyanonymous
e2d71cc7b6
Add debug options to force on and off attention upcasting.
2024-05-16 04:09:41 -04:00
comfyanonymous
e02598e417
Fix SAG.
2024-05-14 18:02:27 -04:00
comfyanonymous
d4db823cfe
Only enable attention upcasting on models that actually need it.
2024-05-14 17:00:50 -04:00
comfyanonymous
89e38bcd63
Refactor attention upcasting code part 1.
2024-05-14 12:47:31 -04:00
comfyanonymous
95e80c5df1
Workaround xformers bug.
2024-04-30 21:23:40 -04:00
comfyanonymous
9956e2b6e7
Switch some more prints to logging.
2024-03-11 16:34:58 -04:00
comfyanonymous
681300661a
Fix attention masks properly for multiple batches.
2024-02-17 16:15:18 -05:00
comfyanonymous
511e70ab62
Fix attention mask batch size in some attention functions.
2024-02-17 15:22:21 -05:00
comfyanonymous
4a9216bca3
Properly fix attention masks in CLIP with batches.
2024-02-17 12:13:13 -05:00
comfyanonymous
50fb52bc5b
Remove some unused imports.
2024-01-25 23:42:37 -05:00
comfyanonymous
62a7bf2919
Use basic attention implementation for small inputs on old pytorch.
2024-01-09 13:46:52 -05:00
comfyanonymous
8cf0a2dfe7
Update optimized_attention_for_device function for new functions that
...
support masked attention.
2024-01-07 13:52:08 -05:00
comfyanonymous
f9f0822512
Add attention mask support to sub quad attention.
2024-01-07 04:13:58 -05:00
comfyanonymous
59259b0de3
Support attention mask in split attention.
2024-01-06 13:16:48 -05:00
comfyanonymous
1240b45932
Implement attention mask on xformers.
2024-01-06 04:33:03 -05:00
comfyanonymous
99f61f753a
Remove useless code.
2023-12-15 01:28:16 -05:00
comfyanonymous
98cc7883b7
Refactor comfy.ops
...
comfy.ops -> comfy.ops.disable_weight_init
This should make it more clear what they actually do.
Some unused code has also been removed.
2023-12-11 23:27:13 -05:00
comfyanonymous
782cf4f295
Cleaner CLIP text encoder implementation.
...
Use a simple CLIP model implementation instead of the one from
transformers.
This will allow some interesting things that would too hackish to implement
using the transformers implementation.
2023-12-06 23:50:03 -05:00
comfyanonymous
39bb52dc2c
Missed this one.
2023-12-05 12:48:41 -05:00
comfyanonymous
03e65605de
All the unet ops with weights are now handled by comfy.ops
2023-12-04 03:12:18 -05:00
comfyanonymous
60f4b792c8
Fix regression from last commit.
2023-11-26 03:43:02 -05:00
comfyanonymous
e4900be7f3
Clean up the extra_options dict for the transformer patches.
...
Now everything in transformer_options gets put in extra_options.
2023-11-26 03:13:56 -05:00
comfyanonymous
eb17325740
Make buggy xformers fall back on pytorch attention.
2023-11-24 03:55:35 -05:00
comfyanonymous
5e4d60a231
Support SVD img2vid model.
2023-11-23 19:41:33 -05:00
comfyanonymous
83a79be597
Fix some memory issues in sub quad attention.
2023-10-30 15:30:49 -04:00
comfyanonymous
8eae4c0adb
Fix some OOM issues with split attention.
2023-10-30 13:14:11 -04:00
comfyanonymous
f083f6b663
Fix some OOM issues with split and sub quad attention.
2023-10-25 20:17:28 -04:00
comfyanonymous
c73b5fab20
attention_basic now works with hypertile.
2023-10-22 03:59:53 -04:00
comfyanonymous
57381b0892
Make sub_quad and split work with hypertile.
2023-10-22 03:51:29 -04:00
comfyanonymous
5a9a1a50af
Make xformers work with hypertile.
2023-10-21 13:23:03 -04:00
comfyanonymous
bffd427388
Add a separate optimized_attention_masked function.
2023-10-16 02:31:24 -04:00
comfyanonymous
95df4b6174
Allow attn_mask in attention_pytorch.
2023-10-11 20:38:48 -04:00
comfyanonymous
c60864b5e4
Refactor the attention functions.
...
There's no reason for the whole CrossAttention object to be repeated when
only the operation in the middle changes.
2023-10-11 20:38:48 -04:00
comfyanonymous
23ed2b1654
Model patches can now know which batch is positive and negative.
2023-09-27 12:04:07 -04:00
comfyanonymous
ef0c0892f6
Add a force argument to soft_empty_cache to force a cache empty.
2023-09-04 00:58:18 -04:00
Simon Lui
1148c2dec7
Some fixes to generalize CUDA specific functionality to Intel or other GPUs.
2023-09-02 18:22:10 -07:00
comfyanonymous
b8f3570a1b
Remove xformers related print.
2023-09-01 02:12:03 -04:00
comfyanonymous
01a6f9b116
Fix issue with gligen.
2023-08-18 16:32:23 -04:00
comfyanonymous
280659a6ee
Support for Control Loras.
...
Control loras are controlnets where some of the weights are stored in
"lora" format: an up and a down low rank matrice that when multiplied
together and added to the unet weight give the controlnet weight.
This allows a much smaller memory footprint depending on the rank of the
matrices.
These controlnets are used just like regular ones.
2023-08-18 11:59:51 -04:00
comfyanonymous
8a8d8c86d6
Initialize the unet directly on the target device.
2023-07-29 14:51:56 -04:00
comfyanonymous
4ec7f09adc
It's actually possible to torch.compile the unet now.
2023-07-18 21:36:35 -04:00
comfyanonymous
fa8010f038
Disable autocast in unet for increased speed.
2023-07-05 21:58:29 -04:00
comfyanonymous
033dc1f52a
Cleanup.
2023-07-02 11:58:23 -04:00
comfyanonymous
391ee8d21f
Fix bug with controlnet.
2023-06-24 11:02:38 -04:00
comfyanonymous
0db33017af
Add some more transformer hooks and move tomesd to comfy_extras.
...
Tomesd now uses q instead of x to decide which tokens to merge because
it seems to give better results.
2023-06-24 03:30:22 -04:00
comfyanonymous
08f1f7686c
Support base SDXL and SDXL refiner models.
...
Large refactor of the model detection and loading code.
2023-06-22 13:03:50 -04:00
comfyanonymous
d72d5d49f5
Add original_shape parameter to transformer patch extra_options.
2023-06-21 13:22:01 -04:00
comfyanonymous
873b08bd0f
Add a way to set patches that modify the attn2 output.
...
Change the transformer patches function format to be more future proof.
2023-06-18 22:58:22 -04:00