268 Commits

Author SHA1 Message Date
comfyanonymous
b236908ce4 Free memory before doing tiled decode. 2024-11-07 04:01:24 -05:00
comfyanonymous
6bef072519 Make VAEDecodeTiled node work with video VAEs. 2024-11-07 03:47:12 -05:00
comfyanonymous
cfe443b8e7 Fix unknown VAE being detected as the mochi VAE. 2024-11-05 03:43:27 -05:00
comfyanonymous
0e63952db1 Mochi VAE encoder. 2024-11-01 17:33:09 -04:00
comfyanonymous
c8815960f6 Remove useless line. 2024-10-28 17:41:12 -04:00
comfyanonymous
9f8e7912ef Basic Genmo Mochi video model support.
To use:
"Load CLIP" node with t5xxl + type mochi
"Load Diffusion Model" node with the mochi dit file.
"Load VAE" with the mochi vae file.

EmptyMochiLatentVideo node for the latent.
euler + linear_quadratic in the KSampler node.
2024-10-26 06:54:00 -04:00
comfyanonymous
215cf1d843 Mixed precision diffusion models with scaled fp8.
This change allows supports for diffusion models where all the linears are
scaled fp8 while the other weights are the original precision.
2024-10-21 18:12:51 -04:00
comfyanonymous
567711396b Support scaled fp8 t5xxl model. 2024-10-20 22:27:00 -04:00
comfyanonymous
077a32ca01 Support diffusion models with scaled fp8 weights. 2024-10-19 23:47:42 -04:00
comfyanonymous
e931ff67d3 model_options consistency between functions.
weight_dtype -> dtype
2024-10-11 20:51:19 -04:00
comfyanonymous
3e7430aaa6 Make clip loader nodes support loading sd3 t5xxl in lower precision.
Add attention mask support in the SD3 text encoder code.
2024-10-10 15:06:15 -04:00
Dr.Lt.Data
b0d10d28bd Hotfix for the div zero occurrence when memory_used_encode is 0 (#5121)
https://github.com/comfyanonymous/ComfyUI/issues/5069#issuecomment-2382656368
2024-10-09 23:34:34 -04:00
comfyanonymous
6b0d97384c Add a weight_dtype fp8_e4m3fn_fast to the Diffusion Model Loader node.
This is used to load weights in fp8 and use fp8 matrix multiplication.
2024-10-09 19:43:17 -04:00
comfyanonymous
d57d58c265 Some minor cleanups. 2024-10-05 13:22:39 -04:00
comfyanonymous
a610d8e4b8 Allow more permutations of clip/t5 in dual clip loader. 2024-10-03 09:26:11 -04:00
comfyanonymous
01b4d4de25 CLIP Loader node now supports clip_l and clip_g only for SD3. 2024-10-02 04:25:17 -04:00
comfyanonymous
2208794d01 Refactor some of the TE detection code. 2024-10-01 07:08:41 -04:00
comfyanonymous
6b6c490b4c Add model_options to load_controlnet function. 2024-09-19 08:23:35 -04:00
comfyanonymous
835d306666 Add some option to model_options for the text encoder.
load_device, offload_device and the initial_device can now be set.
2024-09-17 03:49:54 -04:00
comfyanonymous
28b12fb344 Long CLIP L support for SDXL, SD3 and Flux.
Use the *CLIPLoader nodes.
2024-09-15 07:59:38 -04:00
comfyanonymous
d30678a05e Support loading long clipl model with the CLIP loader node. 2024-08-20 10:46:36 -04:00
comfyanonymous
f9c6ff16f7 New load_text_encoder_state_dicts function.
Now you can load text encoders straight from a list of state dicts.
2024-08-19 17:36:35 -04:00
comfyanonymous
a86fa7a05e unet -> diffusion_models. 2024-08-17 21:31:04 -04:00
comfyanonymous
03c874ec6e Add model_options for text encoder. 2024-08-17 11:17:20 -04:00
comfyanonymous
a552dfba70 Fix some issues with TE being in lowvram mode. 2024-08-12 23:42:21 -04:00
comfyanonymous
1c7090b281 load_unet -> load_diffusion_model with a model_options argument. 2024-08-12 23:20:57 -04:00
comfyanonymous
d95ec784a4 Fix some potential issues with the previous commits. 2024-08-12 00:23:29 -04:00
comfyanonymous
32e625e0fd Support loading directly to vram with CLIPLoader node. 2024-08-12 00:06:01 -04:00
comfyanonymous
3ac5bcd55b Fix mistake in last commit. 2024-08-12 00:00:17 -04:00
comfyanonymous
089485a7c6 Load TE model straight to vram if certain conditions are met. 2024-08-11 23:52:43 -04:00
comfyanonymous
71eddf2d2f Add a way to set model dtype and ops from load_checkpoint_guess_config. 2024-08-11 08:50:34 -04:00
comfyanonymous
4e7fcb5e95 Remove the ckpt_path from load_state_dict_guess_config. 2024-08-11 08:37:35 -04:00
ljleb
a5193f9c4c alternative to load_checkpoint_guess_config that accepts a loaded state dict (#4249)
* make alternative fn

* add back ckpt path as 2nd argument?
2024-08-11 08:36:52 -04:00
comfyanonymous
001ff4d6a6 Fix OOMs happening in some cases.
A cloned model patcher sometimes reported a model was loaded on a device
when it wasn't.
2024-08-06 13:36:04 -04:00
comfyanonymous
f27f0f8a48 Fix some issues. 2024-08-03 15:06:40 -04:00
comfyanonymous
753d9640f9 Automatically use fp8 for diffusion model weights if:
Checkpoint contains weights in fp8.

There isn't enough memory to load the diffusion model in GPU vram.
2024-08-03 13:45:19 -04:00
comfyanonymous
5606d85b07 Add a way to load the diffusion model in fp8 with UNETLoader node. 2024-08-01 13:30:51 -04:00
comfyanonymous
d6d48306d8 Load flux t5 in fp8 if weights are in fp8. 2024-08-01 11:05:56 -04:00
comfyanonymous
fc6a27f36c Basic Flux Schnell and Flux Dev model implementation. 2024-08-01 09:49:29 -04:00
comfyanonymous
79ea2d3d12 Refactor: Move sd2_clip.py to text_encoders folder. 2024-07-28 01:19:20 -04:00
comfyanonymous
06fb93c0d1 Basic hunyuan dit implementation. (#4102)
* Let tokenizers return weights to be stored in the saved checkpoint.

* Basic hunyuan dit implementation.

* Fix some resolutions not working.

* Support hydit checkpoint save.

* Init with right dtype.

* Switch to optimized attention in pooler.

* Fix black images on hunyuan dit.
2024-07-25 18:21:08 -04:00
comfyanonymous
15a95668ae Let tokenizers return weights to be stored in the saved checkpoint. 2024-07-25 10:52:09 -04:00
comfyanonymous
33e584b3bc Make it possible to load tokenizer data from checkpoints. 2024-07-24 16:43:53 -04:00
comfyanonymous
553fbe3407 Refactor: Move some code to the comfy/text_encoders folder. 2024-07-15 17:36:24 -04:00
comfyanonymous
29c17be75e Support AuraFlow Lora and loading model weights in diffusers format.
You can load model weights in diffusers format using the UNETLoader node.
2024-07-13 13:51:40 -04:00
comfyanonymous
4c066c4bc4 AuraFlow model implementation. 2024-07-11 16:52:26 -04:00
comfyanonymous
68f579e0e8 Fix error message never being shown. 2024-07-11 11:46:51 -04:00
comfyanonymous
1e3385c222 Cleaner support for loading different diffusion model types. 2024-07-11 11:37:31 -04:00
comfyanonymous
ecf278e391 Remove useless code. 2024-07-10 20:33:12 -04:00
comfyanonymous
238efd021c More flexibility with text encoder return values.
Text encoders can now return other values to the CONDITIONING than the cond
and pooled output.
2024-07-10 20:06:50 -04:00