ComfyUI/comfy
Jacob Segal 36b2214e30 Execution Model Inversion
This PR inverts the execution model -- from recursively calling nodes to
using a topological sort of the nodes. This change allows for
modification of the node graph during execution. This allows for two
major advantages:

    1. The implementation of lazy evaluation in nodes. For example, if a
    "Mix Images" node has a mix factor of exactly 0.0, the second image
    input doesn't even need to be evaluated (and visa-versa if the mix
    factor is 1.0).

    2. Dynamic expansion of nodes. This allows for the creation of dynamic
    "node groups". Specifically, custom nodes can return subgraphs that
    replace the original node in the graph. This is an incredibly
    powerful concept. Using this functionality, it was easy to
    implement:
        a. Components (a.k.a. node groups)
        b. Flow control (i.e. while loops) via tail recursion
        c. All-in-one nodes that replicate the WebUI functionality
        d. and more
    All of those were able to be implemented entirely via custom nodes,
    so those features are *not* a part of this PR. (There are some
    front-end changes that should occur before that functionality is
    made widely available, particularly around variant sockets.)

The custom nodes associated with this PR can be found at:
https://github.com/BadCafeCode/execution-inversion-demo-comfyui

Note that some of them require that variant socket types ("*") be
enabled.
2024-01-28 20:48:42 -08:00
..
cldm Add manual cast to controlnet. 2023-12-12 11:32:42 -05:00
extra_samplers Remove useless argument from uni_pc sampler. 2023-11-12 01:25:33 -05:00
k_diffusion heunpp2 sampler. 2023-11-14 23:50:55 -05:00
ldm Remove some unused imports. 2024-01-25 23:42:37 -05:00
sd1_tokenizer Initial commit. 2023-01-16 22:37:14 -05:00
t2i_adapter All resolutions now work with t2i adapter for SDXL. 2023-08-22 16:23:54 -04:00
taesd Fix taesd VAE in lowvram mode. 2023-12-26 12:52:21 -05:00
caching.py Execution Model Inversion 2024-01-28 20:48:42 -08:00
checkpoint_pickle.py Remove pytorch_lightning dependency. 2023-06-13 10:11:33 -04:00
cli_args.py Execution Model Inversion 2024-01-28 20:48:42 -08:00
clip_config_bigg.json This is unused but it should be 1280. 2023-06-28 18:04:23 -04:00
clip_model.py Update optimized_attention_for_device function for new functions that 2024-01-07 13:52:08 -05:00
clip_vision_config_g.json Add support for clip g vision model to CLIPVisionLoader. 2023-08-18 11:13:29 -04:00
clip_vision_config_h.json Add support for unCLIP SD2.x models. 2023-04-01 23:19:15 -04:00
clip_vision_config_vitl.json Add support for unCLIP SD2.x models. 2023-04-01 23:19:15 -04:00
clip_vision.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
conds.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
controlnet.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
diffusers_convert.py Fix diffusers VAE loading. 2023-07-26 18:26:39 -04:00
diffusers_load.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
gligen.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
graph_utils.py Execution Model Inversion 2024-01-28 20:48:42 -08:00
graph.py Execution Model Inversion 2024-01-28 20:48:42 -08:00
latent_formats.py Add support for the stable diffusion x4 upscaling model. 2024-01-03 03:37:56 -05:00
lora.py Implement GLora. 2023-12-09 18:15:26 -05:00
model_base.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
model_detection.py Fix regression. 2024-01-02 14:41:33 -05:00
model_management.py Only auto enable bf16 VAE on nvidia GPUs that actually support it. 2024-01-15 03:10:22 -05:00
model_patcher.py Fix model patches not working in custom sampling scheduler nodes. 2024-01-03 12:16:30 -05:00
model_sampling.py Add linear_start and linear_end to model_config.sampling_settings 2023-12-08 02:49:30 -05:00
ops.py Remove useless import. 2024-01-19 15:38:05 -05:00
options.py Only parse command line args when main.py is called. 2023-09-13 11:38:20 -04:00
sample.py Don't round noise mask. 2024-01-11 03:29:58 -05:00
samplers.py Remove some unused imports. 2024-01-25 23:42:37 -05:00
sd1_clip_config.json Initial commit. 2023-01-16 22:37:14 -05:00
sd1_clip.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
sd2_clip_config.json Move text_projection to base clip model. 2023-08-24 23:43:48 -04:00
sd2_clip.py Cleaner CLIP text encoder implementation. 2023-12-06 23:50:03 -05:00
sd.py Cleanup some unused imports. 2024-01-21 21:51:22 -05:00
sdxl_clip.py Cleaner CLIP text encoder implementation. 2023-12-06 23:50:03 -05:00
supported_models_base.py Add unfinished ImageOnlyCheckpointSave node to save a SVD checkpoint. 2024-01-17 19:46:21 -05:00
supported_models.py Implement noise augmentation for SD 4X upscale model. 2024-01-03 14:27:11 -05:00
utils.py Make --gpu-only put intermediate values in GPU memory instead of cpu. 2023-12-08 02:35:45 -05:00