Commit Graph

343 Commits

Author SHA1 Message Date
comfyanonymous
d0b7ab88ba Add a simple experimental TorchCompileModel node.
It probably only works on Linux.

For maximum speed on Flux with Nvidia 40 series/ada and newer try using
this node with fp8_e4m3fn and the --fast argument.
2024-09-12 05:24:25 -04:00
bymyself
e760bf5c40
Add content-type filter method to folder_paths (#4054)
* Add content-type filter method to folder_paths

* Add unit tests

* Hardcode webp content-type

* Annotate content_types as Literal["image", "video", "audio"]
2024-09-11 02:00:07 -04:00
comfyanonymous
8aabd7c8c0 SaveLora node can now save "full diff" lora format.
This isn't actually a lora format and is saving the full diff of the
weights in a format that can be used in the lora loader nodes.
2024-09-07 03:21:02 -04:00
comfyanonymous
a09b29ca11 Add an option to the SaveLora node to store the bias diff. 2024-09-07 03:03:30 -04:00
comfyanonymous
9bfee68773 LoraSave node now supports generating text encoder loras.
text_encoder_diff should be connected to a CLIPMergeSubtract node.

model_diff and text_encoder_diff are optional inputs so you can create
model only loras, text encoder only loras or a lora that contains both.
2024-09-07 02:30:12 -04:00
comfyanonymous
22d1241a50 Add an experimental LoraSave node to extract model loras.
The model_diff input should be connected to the output of a
ModelMergeSubtract node.
2024-09-04 16:38:38 -04:00
comfyanonymous
766ae119a8 CheckpointSave node name. 2024-08-19 15:06:12 -04:00
comfyanonymous
310ad09258 Add a ModelSave node. 2024-08-17 21:43:07 -04:00
comfyanonymous
a475ec2300 Cleanup HunyuanDit controlnets.
Use the: ControlNetApply SD3 and HunyuanDiT node.
2024-08-09 02:59:34 -04:00
来新璐
06eb9fb426
feat: add support for HunYuanDit ControlNet (#4245)
* add support for HunYuanDit ControlNet

* fix hunyuandit controlnet

* fix typo in hunyuandit controlnet

* fix typo in hunyuandit controlnet

* fix code format style

* add control_weight support for HunyuanDit Controlnet

* use control_weights in HunyuanDit Controlnet

* fix typo
2024-08-09 02:59:24 -04:00
Silver
f3bc40223a
Add format metadata to CLIP save to make compatible with diffusers safetensors loading (#4233) 2024-08-06 01:45:24 -04:00
comfyanonymous
ddb6a9f47c Set the step in EmptySD3LatentImage to 16.
These models work better when the res is a multiple of 16.
2024-08-04 15:59:02 -04:00
comfyanonymous
56f3c660bf ModelSamplingFlux now takes a resolution and adjusts the shift with it.
If you want to sample Flux dev exactly how the reference code does use
the same resolution as your image in this node.
2024-08-04 04:06:00 -04:00
comfyanonymous
0eea47d580 Add ModelSamplingFlux to experiment with the shift value.
Default shift on Flux Schnell is 0.0
2024-08-03 03:54:38 -04:00
comfyanonymous
7cd0cdfce6 Add advanced model merge node for Flux model. 2024-08-02 23:20:53 -04:00
fgdfgfthgr-fox
bfb52de866
Lower SAG scale step for finer control (#4158)
* Lower SAG step for finer control

Since the introduction of cfg++ which uses very low cfg value, a step of 0.1 in SAG might be too high for finer control. Even SAG of 0.1 can be too high when cfg is only 0.6, so I change the step to 0.01.

* Lower PAG step as well.

* Update nodes_sag.py
2024-08-02 10:29:03 -04:00
comfyanonymous
eca962c6da Add FluxGuidance node.
This lets you adjust the guidance on the dev model which is a parameter
that is passed to the diffusion model.
2024-08-02 10:25:49 -04:00
Jairo Correa
c1696cd1b5
Add missing import (#4174) 2024-08-02 09:34:12 -04:00
comfyanonymous
a531001cc7 Add CLIPTextEncodeFlux. 2024-08-01 18:53:25 -04:00
Silver
9300058026
Add dpmpp_2s_ancestral as custom sampler (#4101)
Adding dpmpp_2s_ancestral as custom sampler node to enable its use with eta and s_noise when using custom sampling.
2024-07-27 16:19:50 -04:00
comfyanonymous
6225a7827c Add CLIPTextEncodeHunyuanDiT.
Useful for testing what each text encoder does.
2024-07-26 13:08:06 -04:00
comfyanonymous
b2c995f623 "auto" type is only relevant to the SetUnionControlNetType node. 2024-07-22 11:30:38 -04:00
Chenlei Hu
4151fbfa8a
Add error message on union controlnet (#4081) 2024-07-22 11:27:32 -04:00
comfyanonymous
f836e69346 Fix bug with SaveAudio node with --gpu-only 2024-07-21 16:16:45 -04:00
comfyanonymous
6ab8cad22e Implement beta sampling scheduler.
It is based on: https://arxiv.org/abs/2407.12173

Add "beta" to the list of schedulers and the BetaSamplingScheduler node.
2024-07-19 18:05:09 -04:00
comfyanonymous
ff6ca2a892 Move PAG to model_patches/unet section.
Move other unet model_patches nodes to model_patches/unet section.
2024-07-18 17:22:51 -04:00
comfyanonymous
60383f3b64 Move controlnet nodes to conditioning/controlnet. 2024-07-16 17:08:25 -04:00
comfyanonymous
8270c62530 Add SetUnionControlNetType to set the type of the union controlnet model. 2024-07-16 17:04:53 -04:00
comfyanonymous
8e012043a9 Add a ModelSamplingAuraFlow node to change the shift value.
Set the default AuraFlow shift value to 1.73 (sqrt(3)).
2024-07-11 17:57:36 -04:00
comfyanonymous
628f0b8ebc Move audio nodes out of _for_testing. 2024-07-07 09:22:32 -04:00
comfyanonymous
01991f72ce Fix SamplerEulerCFGpp node. 2024-07-02 12:21:08 -04:00
Peter Crabtree
b82d67d5bf
Add SamplerEulerAncestralCFG++ custom sampler node (#3901)
(for eta and s_noise)
2024-07-01 17:42:17 -04:00
comfyanonymous
fbb7a1f1b6 PreviewAudio node. 2024-06-29 01:33:22 -04:00
comfyanonymous
7ecb2ec169 Audio second setting in EmptyLatentAudio. 2024-06-28 02:55:36 -04:00
comfyanonymous
264caca20e ControlNetApplySD3 node can now be used to use SD3 controlnets. 2024-06-27 18:43:11 -04:00
comfyanonymous
4650e7d6e9 Save and load workflow from the flac files output by SaveAudio. 2024-06-27 02:07:29 -04:00
Chenlei Hu
3b423afcca
Add audio widget (#3863)
* Add audio widget

* Fix audio bugs

* Add CSS

* Populate audio widget when load history
2024-06-27 00:22:55 -04:00
comfyanonymous
69d710e40f Implement my alternative take on CFG++ as the euler_pp sampler.
Add euler_ancestral_pp which is the ancestral version of euler with the
same modification.
2024-06-25 07:41:52 -04:00
comfyanonymous
eab211bb1e Resample audio to 44100 when VAE encoding it. 2024-06-24 16:55:20 -04:00
comfyanonymous
73ca780019 Add SamplerEulerCFG++ node.
This node should match the DDIM implementation of CFG++ when "regular" is
selected.

"alternative" is a slightly different take on CFG++
2024-06-23 13:21:18 -04:00
comfyanonymous
887a6341ed Proper ModelMergeSD3_2B node. 2024-06-21 08:41:31 -04:00
Zhenyu Zhou
45e10cac19
feat: add gits scheduler (#3769) 2024-06-20 08:12:15 -04:00
comfyanonymous
0d6a57938e Support loading diffusers SD3 model format with UNETLoader node. 2024-06-19 22:21:18 -04:00
comfyanonymous
bb1969cab7 Initial support for the stable audio open model. 2024-06-15 12:14:56 -04:00
comfyanonymous
0eaa34ec5b Fix regular empty latent image not working with SD3 and custom sampler. 2024-06-12 10:32:34 -04:00
comfyanonymous
c8b5e08dc3 Default shift value on SD3 is 3.0 2024-06-12 02:24:39 -04:00
comfyanonymous
32be358213 Save SD3 modelspec.architecture in CheckpointSave node. 2024-06-12 01:02:07 -04:00
comfyanonymous
1c34d338d7 Update EmptySD3LatentImage to use 1024 resolution by default. 2024-06-11 07:37:22 -04:00
comfyanonymous
8c4a9befa7 SD3 Support. 2024-06-10 14:06:23 -04:00
comfyanonymous
6cd8ffc465 Reshape the empty latent image to the right amount of channels if needed. 2024-06-08 02:35:08 -04:00
Denys Smirnov
20447e9ec9
Fix alpha in PorterDuffImageComposite. (#3411)
There were two bugs in PorterDuffImageComposite.

The first one is the fact that it uses the mask input directly as alpha, missing the conversion (`1-a`). The fix is similar to c16f5744.

The second one is that all color composition formulas assume alpha premultiplied values, while the input is not premultiplied.

This change fixes both of these issue.
2024-06-04 16:37:11 -04:00
Peter Crabtree
e2c585f3be
Fix to allow use of PerpNegGuider with cfg_function_post hooks (like PAG) (#3618) 2024-06-01 12:36:08 -04:00
comfyanonymous
91542d4f8b Import spandrel_extra_arches if present.
I will not add this dependency to the default ones because models in the
spandrel_extra_arches package are non commercial and therefore not
compatible with free software licenses like the one ComfyUI uses.

If you don't mind this you can install it manually yourself.
2024-05-28 01:42:11 -04:00
comfyanonymous
0920e0e5fe Remove some unused imports. 2024-05-27 19:08:27 -04:00
comfyanonymous
16a493a190 Keep compatibility with some custom nodes. 2024-05-26 15:37:41 -04:00
comfyanonymous
9a151b7def Fix issue and unpin spandrel package. 2024-05-26 13:44:47 -04:00
Joey Ballentine
8cfd677cc0
Replace chainner_models with Spandrel package (#2146)
* Replace chainner_models with Spandrel

* Update to latest spandrel

* Use spandrel_foss instead

* update spandrel to new FOSS-compliant version
2024-05-26 13:44:17 -04:00
comfyanonymous
b02bcced05 Fix FreeU not working when shape is tensor. 2024-05-23 11:48:04 -04:00
pythongosssss
91590adf04
Add webcam node (#3497)
* Add webcam node

* unused import
2024-05-17 13:16:08 -04:00
comfyanonymous
ec6f16adb6 Fix SAG. 2024-05-14 18:02:27 -04:00
comfyanonymous
2de3b69b30 Support saving some more modelspec types. 2024-05-13 21:54:11 -04:00
comfyanonymous
e1489ad257 Fix issue with lowvram mode breaking model saving. 2024-05-11 21:55:20 -04:00
Pam
3787b4f246
Use get_model_object in Deep Shrink node (#3408) 2024-05-06 18:39:39 -04:00
comfyanonymous
565eb6d176 Add a SplitSigmasDenoise node as an alternative to SplitSigmas. 2024-05-05 05:24:36 -04:00
comfyanonymous
94d5a12801 Don't load the model in SDTurboScheduler 2024-05-01 16:57:10 -04:00
comfyanonymous
eecd69b53a Add a SamplerLCMUpscale node.
This sampler is an LCM sampler that upscales the latent during sampling.

It can be used to generate at a higher resolution with an LCM model very
quickly.

To try it use it with a basic 5 step LCM workflow with scale_ratio 1.5 or
2.0
2024-04-29 20:00:47 -04:00
comfyanonymous
059773a6df Add some nodes to multiply the attention in UNet and Clip models. 2024-04-28 13:03:43 -04:00
comfyanonymous
10fcd09f4a Add a denoise value to AlignYourStepsScheduler. 2024-04-27 00:48:41 -04:00
comfyanonymous
16eabdf70d Free more vram for upscale models. 2024-04-25 17:04:19 -04:00
Pam
b8218522f1
Increase sigma_min/sigma_max range for custom schedulers (#3317) 2024-04-23 09:40:10 -04:00
comfyanonymous
d09b5ef4ef Free some memory before loading upscale models. 2024-04-22 18:51:15 -04:00
comfyanonymous
4ee9aad6ca Speed up Sharpen node. 2024-04-21 09:02:06 -04:00
comfyanonymous
644a3ae58d Implement Align Your Steps as a AlignYourStepsScheduler node. 2024-04-20 04:34:12 -04:00
comfyanonymous
133dc3351b Faster blur. 2024-04-19 03:52:02 -04:00
comfyanonymous
abc69cab45 Add a helpful warning for links that don't point anywhere. 2024-04-17 12:28:05 -04:00
comfyanonymous
45ec1cbe96 Implement PerpNeg as a guider. 2024-04-16 02:57:34 -04:00
comfyanonymous
8903dce862 This can be removed since PAG doesn't use the uncond. 2024-04-15 12:14:00 -04:00
comfyanonymous
719fb2c81d Add basic PAG node. 2024-04-14 23:49:50 -04:00
comfyanonymous
744ac944db Don't make dynamicPrompts the default on multiline string inputs.
This should be less confusing to those who want to use multiline input
without them.
2024-04-13 16:18:00 -04:00
comfyanonymous
fd7c636680 Add an AddNoise node to add noise depending on the sigma. 2024-04-10 23:40:31 -04:00
comfyanonymous
4201181b35 Add ModelMergeSD1, ModelMergeSD2 and ModelMergeSDXL. 2024-04-09 04:31:14 -04:00
comfyanonymous
30abc324c2 Support properly saving CosXL checkpoints. 2024-04-08 00:36:22 -04:00
comfyanonymous
c9fc242e2c The middle prompt should be treated more as a negative prompt. 2024-04-07 14:34:43 -04:00
comfyanonymous
d8dea4cdb8 Fix DisableNoise node. 2024-04-05 21:36:23 -04:00
comfyanonymous
ea9ac9d30b Fix PerpNeg node. 2024-04-05 11:46:54 -04:00
comfyanonymous
0f5768e038 Fix missing arguments in cfg_function. 2024-04-04 23:38:57 -04:00
comfyanonymous
1a0486bb96 Fix model needing to be loaded on GPU to generate the sigmas. 2024-04-04 22:08:49 -04:00
comfyanonymous
1f8d8e6c77 Add InstructPixToPixConditioning node. 2024-04-04 15:06:17 -04:00
comfyanonymous
5272fd4b03 Add DualCFGGuider used in IP2P models for example. 2024-04-04 14:57:44 -04:00
comfyanonymous
cfbf3be54b Add basic guider for models with no cfg. 2024-04-04 13:57:32 -04:00
comfyanonymous
c6bd456c45 Make zero denoise a NOP. 2024-04-04 11:41:27 -04:00
comfyanonymous
fcfd2bdf8a Small cleanup. 2024-04-04 11:16:49 -04:00
comfyanonymous
f117566299 SamplerCustomAdvanced node.
This node enables the creation of nodes to change the guider/denoiser and
the noise algorithm.
2024-04-04 01:32:25 -04:00
comfyanonymous
e6482fbbfc Refactor calc_cond_uncond_batch into calc_cond_batch.
calc_cond_batch can take an arbitrary amount of cond inputs.

Added a calc_cond_uncond_batch wrapper with a warning so custom nodes
won't break.
2024-04-01 18:07:47 -04:00
comfyanonymous
8ae1e4d125 Make step on sharpen node smaller. 2024-03-27 01:28:31 -04:00
comfyanonymous
40e124c6be SV3D support. 2024-03-18 16:54:13 -04:00
comfyanonymous
0b78213bda Fix neg scale step. 2024-03-18 15:51:23 -04:00
comfyanonymous
b1a16d4500 Fix stable cascade img2img not working with all resolutions. 2024-03-18 13:51:38 -04:00
comfyanonymous
d3406d8d58 Increase image batch nodes maximum values. 2024-03-17 08:57:49 -04:00
comfyanonymous
f2fe635c9f SamplerDPMAdaptative node to test the different options. 2024-03-15 22:36:10 -04:00