├── .github └── workflows │ └── build.yml ├── .gitignore ├── README.md ├── docs ├── Contributing Documentation │ ├── Writing Style Guide.md │ ├── index.md │ └── templates.md ├── Core Nodes │ ├── Advanced │ │ ├── DIffusersLoader.md │ │ ├── LoadCheckpointWithConfig.md │ │ ├── index.md │ │ └── media │ │ │ ├── DiffusersLoader.svg │ │ │ └── LoadCheckpointWithConfig.svg │ ├── Conditioning │ │ ├── ApplyControlNet.md │ │ ├── ApplyStyleModel.md │ │ ├── CLIPSetLastLayer.md │ │ ├── CLIPTextEncode.md │ │ ├── CLIPVisionEncode.md │ │ ├── ConditioningAverage.md │ │ ├── ConditioningCombine.md │ │ ├── ConditioningSetArea.md │ │ ├── ConditioningSetMask.md │ │ ├── GLIGENTextboxApply.md │ │ ├── index.md │ │ ├── media │ │ │ ├── ApplyControlNet.svg │ │ │ ├── ApplyStyleModel.svg │ │ │ ├── CLIPSetLastLayer.svg │ │ │ ├── CLIPTextEncodePrompt.svg │ │ │ ├── CLIPVisionEncode.svg │ │ │ ├── ConditioningAverage.svg │ │ │ ├── ConditioningCombine.svg │ │ │ ├── ConditioningSetArea.svg │ │ │ ├── ConditioningSetMask.svg │ │ │ ├── GLIGENTextboxApply.svg │ │ │ └── unCLIPConditioning.svg │ │ └── unCLIPConditioning.md │ ├── Experimental │ │ ├── LoadLatent.md │ │ ├── SaveLatent.md │ │ ├── TomePatchModel.md │ │ ├── VAEDecodeTiled.md │ │ ├── VAEEncodeTiled.md │ │ ├── index.md │ │ └── media │ │ │ ├── LoadLatent.svg │ │ │ ├── SaveLatent.svg │ │ │ ├── TomePatchModel.svg │ │ │ ├── VAEDecodeTiled.svg │ │ │ └── VAEEncodeTiled.svg │ ├── Image │ │ ├── InvertImage.md │ │ ├── LoadImage.md │ │ ├── PadImageForOutpainting.md │ │ ├── PreviewImage.md │ │ ├── SaveImage.md │ │ ├── index.md │ │ ├── media │ │ │ ├── ImageBlend.svg │ │ │ ├── ImageBlur.svg │ │ │ ├── ImageQuantize.svg │ │ │ ├── ImageSharpen.svg │ │ │ ├── InvertImage.svg │ │ │ ├── LoadImage.svg │ │ │ ├── PadImageForOutpainting.svg │ │ │ ├── PreviewImage.svg │ │ │ ├── SaveImage.svg │ │ │ ├── UpscaleImage.svg │ │ │ └── UpscaleImageUsingModel.svg │ │ ├── postprocessing │ │ │ ├── ImageBlend.md │ │ │ ├── ImageBlur.md │ │ │ ├── ImageQuantize.md │ │ │ └── ImageSharpen.md │ │ └── upscaling │ │ │ ├── UpscaleImage.md │ │ │ └── UpscaleImageUsingModel.md │ ├── Latent │ │ ├── EmptyLatentImage.md │ │ ├── LatentComposite.md │ │ ├── LatentCompositeMasked.md │ │ ├── UpscaleLatent.md │ │ ├── VAEDecode.md │ │ ├── VAEEncode.md │ │ ├── batch │ │ │ ├── LatentFromBatch.md │ │ │ ├── RebatchLatents.md │ │ │ └── RepeatLatentBatch.md │ │ ├── index.md │ │ ├── inpaint │ │ │ ├── SetLatentNoiseMask.md │ │ │ └── VAEEncodeForInpainting.md │ │ ├── media │ │ │ ├── CropLatent.svg │ │ │ ├── EmptyLatentImage.svg │ │ │ ├── FlipLatent.svg │ │ │ ├── LatentComposite.svg │ │ │ ├── LatentCompositeMasked.svg │ │ │ ├── LatentFromBatch.svg │ │ │ ├── RebatchLatents.svg │ │ │ ├── RepeatLatentBatch.svg │ │ │ ├── RotateLatent.svg │ │ │ ├── SetLatentNoiseMask.svg │ │ │ ├── UpscaleLatent.svg │ │ │ ├── VAEDecode.svg │ │ │ ├── VAEEncode.svg │ │ │ └── VAEEncodeForInpainting.svg │ │ └── transform │ │ │ ├── CropLatent.md │ │ │ ├── FlipLatent.md │ │ │ └── RotateLatent.md │ ├── Loaders │ │ ├── GLIGENLoader.md │ │ ├── HypernetworkLoader.md │ │ ├── LoadCLIP.md │ │ ├── LoadCLIPVision.md │ │ ├── LoadCheckpoint.md │ │ ├── LoadControlNet.md │ │ ├── LoadLoRA.md │ │ ├── LoadStyleModel.md │ │ ├── LoadUpscaleModel.md │ │ ├── LoadVAE.md │ │ ├── index.md │ │ ├── media │ │ │ ├── GLIGENLoader.svg │ │ │ ├── HypernetworkLoader.svg │ │ │ ├── LoadCLIP.svg │ │ │ ├── LoadCLIPVision.svg │ │ │ ├── LoadCheckpoint.svg │ │ │ ├── LoadControlNet.svg │ │ │ ├── LoadLoRA.svg │ │ │ ├── LoadStyleModel.svg │ │ │ ├── LoadUpscaleModel.svg │ │ │ ├── LoadVAE.svg │ │ │ └── unCLIPCheckpointLoader.svg │ │ └── unCLIPCheckpointLoader.md │ ├── Mask │ │ ├── ConvertImageToMask.md │ │ ├── ConvertMaskToImage.md │ │ ├── CropMask.md │ │ ├── FeatherMask.md │ │ ├── InvertMask.md │ │ ├── LoadImageAsMask.md │ │ ├── MaskComposite.md │ │ ├── SolidMask.md │ │ ├── index.md │ │ └── media │ │ │ ├── ConvertImageToMask.svg │ │ │ ├── ConvertMaskToImage.svg │ │ │ ├── CropMask.svg │ │ │ ├── FeatherMask.svg │ │ │ ├── InvertMask.svg │ │ │ ├── LoadImageAsMask.svg │ │ │ ├── MaskComposite.svg │ │ │ └── SolidMask.svg │ ├── Sampling │ │ ├── KSampler Advanced.md │ │ ├── KSampler.md │ │ ├── index.md │ │ ├── media │ │ │ ├── KSampler.svg │ │ │ └── KSamplerADV.svg │ │ └── samplers.md │ ├── index.md │ └── media │ │ └── img2imgExample.png ├── Custom Nodes │ └── index.md ├── Developing Custom Nodes │ └── index.md ├── Interface │ ├── NodeOptions.md │ ├── SaveFileFormatting.md │ ├── Shortcuts.md │ ├── Textprompts.md │ ├── UtilityNodes.md │ ├── index.md │ └── media │ │ ├── Primitive.svg │ │ ├── Reroute.svg │ │ └── SR.png ├── index.md └── media │ └── default_workflow.svg ├── mkdocs.yml └── utils └── copy_pnginfo.py /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | on: 3 | push: 4 | branches: 5 | - master 6 | - main 7 | permissions: 8 | contents: write 9 | jobs: 10 | deploy: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | - uses: actions/setup-python@v4 15 | with: 16 | python-version: 3.x 17 | - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV 18 | - uses: actions/cache@v3 19 | with: 20 | key: mkdocs-material-${{ env.cache_id }} 21 | path: .cache 22 | restore-keys: | 23 | mkdocs-material- 24 | - run: pip install \ 25 | mkdocs-material \ 26 | mkdocs-awesome-pages-plugin \ 27 | - run: mkdocs gh-deploy --force 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vscode -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ComfyUI community manual 2 | 3 | This is the repo of the community managed manual of ComfyUI which can be found [here](https://blenderneko.github.io/ComfyUI-docs/). If you're looking to contribute a good place to start is to examine our contribution guide [here](https://blenderneko.github.io/ComfyUI-docs/Contributing%20Documentation/). The main focus of this project right now is to complete the getting started, interface and core nodes section. 4 | 5 | Current roadmap: 6 | 7 | - [ ] getting started 8 | - [ ] interface 9 | - [ ] core nodes 10 | - [ ] Sampling 11 | - [ ] Loaders 12 | - [ ] Conditioning 13 | - [ ] Latent 14 | - [ ] Image 15 | - [ ] mask 16 | - [ ] Advanced 17 | - [ ] Utils 18 | - [ ] _for_testing? -------------------------------------------------------------------------------- /docs/Contributing Documentation/Writing Style Guide.md: -------------------------------------------------------------------------------- 1 | # Writing Style Guide 2 | 3 | below the writing style guide of the [Blender manual](https://docs.blender.org/manual/en/latest/contribute/guides/writing_guide.html), adapted for this project. 4 | 5 | ## Primary Goals 6 | 7 | The main goals for this manual are as follows: 8 | 9 | `User Focused` 10 | 11 | : The Manual is written for people with a basic understanding of using Stable Diffusion in currently available software with a basic grasp of node based programming. While some areas of machine learning and generative models are highly technical, this manual shall be kept understandable by non-technical users. 12 | 13 | `Complete` 14 | 15 | : The manual provides detailed functional description of all nodes and features in ComfyUI. For each node or feature the manual should provide information on how to use it, and its purpose. More background information should be provided when necessary to give deeper understanding of the generative process. 16 | 17 | `Concise` 18 | 19 | : Machine Learning is an incredibly interesting field, however, expanding into details can add unnecessary content. Keep the text concise, relevant to the topic at hand and factual. 20 | 21 | `Maintainable` 22 | 23 | : Keep in mind that ComfyUI has frequent updates, so try to write content that will not have to be redone the moment some small change is made. 24 | 25 | ## Content Guidelines 26 | 27 | In order to maintain a consistent writing style within the manual, please keep this page in mind and only deviate from it when you have a good reason to do so. 28 | 29 | Rules of thumb: 30 | 31 | - Spell checking is strongly recommended. 32 | - Use American English. 33 | - Take care about grammar, appropriate wording and use simple English. 34 | - Keep sentences short and clear, resulting in text that is easy to read, objective and to the point. 35 | - If you are unsure about how a feature works, ask someone else or find out who developed it and ask them. 36 | 37 | To be avoided: 38 | 39 | - Avoid writing in first person perspective, about yourself or your own opinions. 40 | - Avoid [weasel words](https://en.wikipedia.org/wiki/Weasel_word) and being unnecessarily vague. 41 | - Avoid documenting bugs. 42 | - Avoid product placements, i.e. unnecessarily promoting specific models. Keep content neutral where possible. 43 | - Avoid technical explanations about the mathematical/algorithmic implementation of a feature if there is a simpler way to explain it. 44 | - Avoid repetition of large portions of text. Simply explain it once, and from then on refer to that explanation. 45 | 46 | ## Screenshot Guidelines 47 | 48 | Individual nodes shall be captured using the [Workflow SVG script](https://github.com/pythongosssss/ComfyUI-Custom-Scripts/tree/main), keep in mind that they will be given a width of 450px on their page. These nodes shall be of the default width and using the default dark mode theme. 49 | 50 | Images displaying example workflows shall clearly display the nodes in question and contain the workflow as part of their meta-data such that users can easily access the workflows. Workflows shall not be presented to users in the form of a json file, or as output images of a prompt. To attach the workflow to these screenshots the file `copy_pnginfo.py` inside the util folder can be called using `copy_pnginfo.py screenshot.png image_with_metadata.png output_image.png` -------------------------------------------------------------------------------- /docs/Contributing Documentation/index.md: -------------------------------------------------------------------------------- 1 | # Overview page contributing documentation -------------------------------------------------------------------------------- /docs/Contributing Documentation/templates.md: -------------------------------------------------------------------------------- 1 | # Templates 2 | 3 | The following guide provides patterns for core and custom nodes. 4 | 5 | ## Node Pages 6 | 7 | Pages about nodes should always start with a brief explanation and image of the node. This is followed by two headings, inputs and outputs, with a note of absence if the node has none. At the end of the page can be an optional example(s) section: 8 | 9 | 10 | ``` md 11 | # Node Name 12 | 13 | { align=right width=450 } 14 | 15 | Short description and explanation of the node 16 | 17 | ## inputs 18 | 19 | `Lorem ipsum dolor sit amet` 20 | 21 | : Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus 22 | tellus non sem sollicitudin, quis rutrum leo facilisis. 23 | 24 | `Cras arcu libero` 25 | 26 | : Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin 27 | ut eros sed sapien ullamcorper consequat. Nunc ligula ante. 28 | 29 | Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis. 30 | Nam vulputate tincidunt fringilla. 31 | Nullam dignissim ultrices urna non auctor. 32 | 33 | ## outputs 34 | 35 | This node has no outputs. 36 | 37 | ## example 38 | 39 | example usage text with workflow image 40 | ``` 41 | 42 | Examples Should be short, simple and not rely on custom nodes other than those in the nodepack to which the node on the manual page belongs to. Examples should come with an image that displays how the node fits into the example workflow, and the metadata of this image should encode the workflow depicted. 43 | 44 | -------------------------------------------------------------------------------- /docs/Core Nodes/Advanced/DIffusersLoader.md: -------------------------------------------------------------------------------- 1 | # Diffusers Loader 2 | 3 | { align=right width=450 } 4 | 5 | The Diffusers Loader node can be used to load a diffusion model from diffusers. 6 | 7 | ## inputs 8 | 9 | `model_path` 10 | 11 | : path to the diffusers model. 12 | 13 | ## outputs 14 | 15 | `MODEL` 16 | 17 | : The model used for denoising latents. 18 | 19 | `CLIP` 20 | 21 | : The CLIP model used for encoding text prompts. 22 | 23 | `VAE` 24 | 25 | : The VAE model used for encoding and decoding images to and from latent space. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Advanced/LoadCheckpointWithConfig.md: -------------------------------------------------------------------------------- 1 | # Load Checkpoint (With Config) 2 | 3 | { align=right width=450 } 4 | 5 | The Load Checkpoint (With Config) node can be used to load a diffusion model according to a supplied config file. Note that the regular [load checkpoint](../Loaders/LoadCheckpoint.md) node is able to guess the appropriate config in most of the cases. 6 | 7 | ## inputs 8 | 9 | `config_name` 10 | 11 | : The name of the config file. 12 | 13 | `ckpt_name` 14 | 15 | : The name of the model to be loaded. 16 | 17 | ## outputs 18 | 19 | `MODEL` 20 | 21 | : The model used for denoising latents. 22 | 23 | `CLIP` 24 | 25 | : The CLIP model used for encoding text prompts. 26 | 27 | `VAE` 28 | 29 | : The VAE model used for encoding and decoding images to and from latent space. 30 | 31 | ## example 32 | 33 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Advanced/index.md: -------------------------------------------------------------------------------- 1 | # Advanced 2 | 3 | -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ApplyControlNet.md: -------------------------------------------------------------------------------- 1 | # Apply ControlNet 2 | 3 | { align=right width=450 } 4 | 5 | The Apply ControlNet node can be used to provide further visual guidance to a diffusion model. Unlike unCLIP embeddings, controlnets and T2I adaptors work on any model. By chaining together multiple nodes it is possible to guide the diffusion model using multiple controlNets or T2I adaptors. This can be useful to e.g. hint at the diffusion model where the edges in the final image should be by providing an image containing edge detections along with a controlNet trained on edge detection images to this node. 6 | 7 | !!! info 8 | To use the T2IAdaptor style model see the [Apply Style Model](ApplyStyleModel.md) node instead 9 | 10 | 11 | ## inputs 12 | 13 | `conditioning` 14 | 15 | : A conditioning. 16 | 17 | `control_net` 18 | 19 | : A controlNet or T2IAdaptor, trained to guide the diffusion model using specific image data. 20 | 21 | `image` 22 | 23 | : The image used as a visual guide for the diffusion model. 24 | 25 | ## outputs 26 | 27 | `CONDITIONING` 28 | 29 | : A Conditioning containing the control_net and visual guide. 30 | 31 | ## example 32 | 33 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ApplyStyleModel.md: -------------------------------------------------------------------------------- 1 | # Apply Style Model 2 | 3 | { align=right width=450 } 4 | 5 | The Apply Style Model node can be used to provide further visual guidance to a diffusion model specifically pertaining to the style of the generated images. This node takes the T2I Style adaptor model and an embedding from a CLIP vision model to guide a diffusion model towards the style of the image embedded by CLIP vision. 6 | 7 | 8 | ## inputs 9 | 10 | `conditioning` 11 | 12 | : A conditioning. 13 | 14 | `style_model` 15 | 16 | : A T2I style adaptor. 17 | 18 | `CLIP_vision_output` 19 | 20 | : The image containing the desired style, encoded by a CLIP vision model. 21 | 22 | ## outputs 23 | 24 | `CONDITIONING` 25 | 26 | : A Conditioning containing the T2I style adaptor and visual guide towards the desired style. 27 | 28 | ## example 29 | 30 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/CLIPSetLastLayer.md: -------------------------------------------------------------------------------- 1 | # CLIP Set Last Layer 2 | 3 | { align=right width=450 } 4 | 5 | The CLIP Set Last Layer node can be used to set the CLIP output layer from which to take the text embeddings. Encoding text into an embedding happens by the text being transformed by various layers in the CLIP model. Although traditionally diffusion models are conditioned on the output of the last layer in CLIP, some diffusion models have been conditioned on earlier layers and might not work as well when using the output of the last layer. 6 | 7 | ## inputs 8 | 9 | `clip` 10 | 11 | : The CLIP model used for encoding the text. 12 | 13 | ## outputs 14 | 15 | `CLIP` 16 | 17 | : The CLIP model with the newly set output layer. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/CLIPTextEncode.md: -------------------------------------------------------------------------------- 1 | # CLIP Text Encode (Prompt) 2 | 3 | { align=right width=450 } 4 | 5 | The CLIP Text Encode node can be used to encode a text prompt using a CLIP model into an embedding that can be used to guide the diffusion model towards generating specific images. For a complete guide of all text prompt related features in ComfyUI see [this](../../Interface/Textprompts.md) page. 6 | 7 | 8 | ## inputs 9 | 10 | `clip` 11 | 12 | : The CLIP model used for encoding the text. 13 | 14 | `text` 15 | 16 | : The text to be encoded. 17 | 18 | ## outputs 19 | 20 | `CONDITIONING` 21 | 22 | : A Conditioning containing the embedded text used to guide the diffusion model. 23 | 24 | ## example 25 | 26 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/CLIPVisionEncode.md: -------------------------------------------------------------------------------- 1 | # CLIP Vision Encode 2 | 3 | { align=right width=450 } 4 | 5 | The CLIP Vision Encode node can be used to encode an image using a CLIP vision model into an embedding that can be used to guide unCLIP diffusion models or as input to style models. 6 | 7 | 8 | ## inputs 9 | 10 | `clip_vision` 11 | 12 | : The CLIP vision model used for encoding the image. 13 | 14 | `image` 15 | 16 | : The image to be encoded. 17 | 18 | ## outputs 19 | 20 | `CLIP_VISION_OUTPUT` 21 | 22 | : The encoded image. 23 | 24 | ## example 25 | 26 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ConditioningAverage.md: -------------------------------------------------------------------------------- 1 | # Conditioning (Average) 2 | 3 | { align=right width=450 } 4 | 5 | The Conditioning (Average) node can be used to interpolate between two text embeddings according to a strength factor set in `conditioning_to_strength`. 6 | 7 | ## inputs 8 | 9 | `conditioning_to` 10 | 11 | : The conditioning with the text embeddings at `conditioning_to_strength` of 1. 12 | 13 | `conditioning_from` 14 | 15 | : The conditioning with the text embeddings at `conditioning_to_strength` of 0. 16 | 17 | `conditioning_to_strength` 18 | 19 | : The factor by which to mix `conditioning_to` into `conditioning_from`. 20 | 21 | ## outputs 22 | 23 | `CONDITIONING` 24 | 25 | : A new conditioning with the text embeddings mixed based on `conditioning_to_strength`. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ConditioningCombine.md: -------------------------------------------------------------------------------- 1 | # Conditioning (Combine) 2 | 3 | { align=right width=450 } 4 | 5 | The Conditioning (Combine) node can be used to combine multiple conditionings by averaging the predicted noise of the diffusion model. Note that this is different from the [Conditioning (Average)](ConditioningAverage.md) node. Here outputs of the diffusion model conditioned on different conditionings (i.e. all parts that make up the conditioning) are averaged out, while the Conditioning (Average) node interpolates the text embeddings that are stored inside the conditioning. 6 | 7 | !!! tip 8 | Even though Conditioning Combine does not have a factor input to determine how to interpolate the two resulting noise predictions, the [Conditioning (Set Area)](ConditioningSetArea.md) node can be used to weight the individual conditionings before combining them. 9 | 10 | ## inputs 11 | 12 | `conditioning_1` 13 | 14 | : The First conditioning. 15 | 16 | `conditioning_2` 17 | 18 | : The second conditioning. 19 | 20 | 21 | ## outputs 22 | 23 | `CONDITIONING` 24 | 25 | : A new conditioning containing both inputs, later to be averaged by the sampler. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ConditioningSetArea.md: -------------------------------------------------------------------------------- 1 | # Conditioning (Set Area) 2 | 3 | { align=right width=450 } 4 | 5 | The Conditioning (Set Area) node can be used to limit a conditioning to a specified area of the image. Together with the [Conditioning (Combine)](ConditioningCombine.md) node this can be used to add more control over the composition of the final image. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | !!! info 11 | `strength` is normalized before mixing multiple noise predictions from the diffusion model. 12 | 13 | ## inputs 14 | 15 | `conditioning` 16 | 17 | : The conditioning that will be limited to an area. 18 | 19 | `width` 20 | 21 | : The width of the area. 22 | 23 | `height` 24 | 25 | : The height of the area. 26 | 27 | `x` 28 | 29 | : The x coordinate of the area. 30 | 31 | `y` 32 | 33 | : The y coordinate of the area. 34 | 35 | `strength` 36 | 37 | : The weight of the area to be used when mixing multiple overlapping conditionings. 38 | 39 | ## outputs 40 | 41 | `CONDITIONING` 42 | 43 | : A new conditioning limited to the specified area. 44 | 45 | ## example 46 | 47 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/ConditioningSetMask.md: -------------------------------------------------------------------------------- 1 | # Conditioning (Set Mask) 2 | 3 | { align=right width=450 } 4 | 5 | The Conditioning (Set Mask) node can be used to limit a conditioning to a specified mask. Together with the [Conditioning (Combine)](ConditioningCombine.md) node this can be used to add more control over the composition of the final image. 6 | 7 | !!! info 8 | `strength` is normalized before mixing multiple noise predictions from the diffusion model. 9 | 10 | ## inputs 11 | 12 | `conditioning` 13 | 14 | : The conditioning that will be limited to a mask. 15 | 16 | `mask` 17 | 18 | : The mask to constrain the conditioning to. 19 | 20 | `strength` 21 | 22 | : The weight of the masked area to be used when mixing multiple overlapping conditionings. 23 | 24 | `set_cond_area` 25 | 26 | : Whether to denoise the whole area, or limit it to the bounding box of the mask. 27 | 28 | 29 | ## outputs 30 | 31 | `CONDITIONING` 32 | 33 | : A new conditioning limited to the specified mask. 34 | 35 | ## example 36 | 37 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/GLIGENTextboxApply.md: -------------------------------------------------------------------------------- 1 | # GLIGEN Textbox Apply 2 | 3 | { align=right width=450 } 4 | 5 | The GLIGEN Textbox Apply node can be used to provide further spatial guidance to a diffusion model, guiding it to generate the specified parts of the prompt in a specific region of the image. Although the text input will accept any text, GLIGEN works best if the input to it is an object that is part of the text prompt. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `conditioning_to` 13 | 14 | : A conditioning. 15 | 16 | `clip` 17 | 18 | : A CLIP model. 19 | 20 | `gligen_textbox_model` 21 | 22 | : A GLIGEN model. 23 | 24 | `text` 25 | 26 | : The text to associate the spatial information to. 27 | 28 | `width` 29 | 30 | : The width of the area. 31 | 32 | `height` 33 | 34 | : The height of the area. 35 | 36 | `x` 37 | 38 | : The x coordinate of the area. 39 | 40 | `y` 41 | 42 | : The y coordinate of the area. 43 | 44 | ## outputs 45 | 46 | `CONDITIONING` 47 | 48 | : A Conditioning containing GLIGEN and the spatial guidance. 49 | 50 | ## example 51 | 52 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/index.md: -------------------------------------------------------------------------------- 1 | # Conditioning 2 | 3 | In ComfyUI Conditionings are used to guide the diffusion model to generate certain outputs. All conditionings start with a text prompt embedded by CLIP using a [Clip Text Encode](CLIPTextEncode.md) node. These conditions can then be further augmented or modified by the other nodes that can be found in this segment. 4 | 5 | Examples of such are guiding the process towards certain compositions using the [Conditioning (Set Area)](ConditioningSetArea.md), [Conditioning (Set Mask)](ConditioningSetArea.md), or [GLIGEN Textbox Apply](GLIGENTextboxApply.md) node. 6 | 7 | Or providing additional visual hints through nodes such as the [Apply Style Model](ApplyStyleModel.md), [Apply ControlNet](ApplyControlNet.md) or [unCLIP Conditioning](unCLIPConditioning.md) node. A full list of relevant nodes can be found in the sidebar. -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/media/ApplyStyleModel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/media/CLIPVisionEncode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/media/ConditioningCombine.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Conditioning/unCLIPConditioning.md: -------------------------------------------------------------------------------- 1 | # unCLIP Conditioning 2 | 3 | { align=right width=450 } 4 | 5 | The unCLIP Conditioning node can be used to provide unCLIP models with additional visual guidance through images encoded by a CLIP vision model. This node can be chained to provide multiple images as guidance. 6 | 7 | !!! warning 8 | Not all diffusion models are compatible with unCLIP conditioning. This node specifically requires a a diffusion model that was made with unCLIP in mind. 9 | 10 | ## inputs 11 | 12 | `conditioning` 13 | 14 | : The conditioning. 15 | 16 | `clip_vision_output` 17 | 18 | : An image encoded by a CLIP VISION model. 19 | 20 | `strength` 21 | 22 | : How strongly the unCLIP diffusion model should be guided by the image 23 | 24 | `noise_augmentation` 25 | 26 | : Noise_augmentation can be used to guide the unCLIP diffusion model to random places in the neighborhood of the original CLIP vision embeddings, providing additional variations of the generated image closely related to the encoded image. 27 | 28 | ## outputs 29 | 30 | `CONDITIONING` 31 | 32 | : A Conditioning containing additional visual guidance for unCLIP models. 33 | 34 | ## example 35 | 36 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/LoadLatent.md: -------------------------------------------------------------------------------- 1 | # Load Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Load Latent node can be used to to load latents that were saved with the [Save Latent](SaveLatent.md) node. 6 | 7 | ## inputs 8 | 9 | `latent` 10 | 11 | : The name of the latent to load. 12 | 13 | 14 | ## outputs 15 | 16 | `LATENT` 17 | 18 | : The latent image. 19 | 20 | ## example 21 | 22 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/SaveLatent.md: -------------------------------------------------------------------------------- 1 | # Save Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Save Latent node can be used to to save latents for later use. These can then be loaded again using the [Load Latent](LoadLatent.md) node. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The latents to be saved. 12 | 13 | `filename_prefix` 14 | 15 | : a prefix for the file name. 16 | 17 | 18 | ## outputs 19 | 20 | This node has no outputs. 21 | 22 | ## example 23 | 24 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/TomePatchModel.md: -------------------------------------------------------------------------------- 1 | # Tome Patch Model 2 | 3 | { align=right width=450 } 4 | 5 | The Tome Patch Model node can be used to apply Tome optimizations to the diffusion model. Tome (TOken MErging) tries to find a way to merge prompt tokens in such a way that the effect on the final image are minimal. This results in faster generation times and a reduction in required VRAM at the cost of a potential reduction in quality. This tradeoff can be controlled by the `ratio` setting, where higher values result in more tokens being merged 6 | 7 | ## inputs 8 | 9 | `model` 10 | 11 | : The diffusion model for tome to be applied to. 12 | 13 | `ratio` 14 | 15 | : The treshold to determine when to merge tokens. 16 | 17 | 18 | ## outputs 19 | 20 | `MODEL` 21 | 22 | : The diffusion model optimized by tome. 23 | 24 | ## example 25 | 26 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/VAEDecodeTiled.md: -------------------------------------------------------------------------------- 1 | # VAE Decode (Tiled) 2 | 3 | { align=right width=450 } 4 | 5 | The VAE Decode (Tiled) node can be used to decode latent space images back into pixel space images, using the provided VAE. This node decodes latents in tiles allowing it to decode larger latent images than the regular [VAE Decode](../Latent/VAEDecode.md) node. 6 | 7 | !!! info 8 | When the regular VAE Decode node fails due to insufficient VRAM, comfy will automatically retry using the tiled implementation 9 | 10 | ## inputs 11 | 12 | `samples` 13 | 14 | : The latent images to be decoded. 15 | 16 | `vae` 17 | 18 | : The VAE to use for decoding the latent images. 19 | 20 | 21 | ## outputs 22 | 23 | `IMAGE` 24 | 25 | : The decoded images. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/VAEEncodeTiled.md: -------------------------------------------------------------------------------- 1 | # VAE Encode (Tiled) 2 | 3 | { align=right width=450 } 4 | 5 | The VAE Encode node can be used to encode pixel space images into latent space images, using the provided VAE. This node encodes images in tiles allowing it to encode larger images than the regular [VAE Encode](../Latent/VAEEncode.md) node. 6 | 7 | !!! info 8 | When the regular VAE Encode node fails due to insufficient VRAM, comfy will automatically retry using the tiled implementation 9 | 10 | ## inputs 11 | 12 | `pixels` 13 | 14 | : The pixel space images to be encoded. 15 | 16 | `vae` 17 | 18 | : The VAE to use for encoding the pixel images. 19 | 20 | 21 | ## outputs 22 | 23 | `LATENT` 24 | 25 | : The encoded latent images. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/index.md: -------------------------------------------------------------------------------- 1 | # Experimental 2 | 3 | Experimental contains experimental nodes that might not be fully polished yet. -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/media/LoadLatent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/media/SaveLatent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/media/TomePatchModel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/media/VAEDecodeTiled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Experimental/media/VAEEncodeTiled.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Image/InvertImage.md: -------------------------------------------------------------------------------- 1 | # Invert Image 2 | 3 | { align=right width=450 } 4 | 5 | The Invert Image node can be used to to invert the colors of an image. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to be inverted. 12 | 13 | 14 | ## outputs 15 | 16 | `IMAGE` 17 | 18 | : The inverted pixel image. 19 | 20 | ## example 21 | 22 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/LoadImage.md: -------------------------------------------------------------------------------- 1 | # Load Image 2 | 3 | { align=right width=450 } 4 | 5 | The Load Image node can be used to to load an image. Images can be uploaded by starting the file dialog or by dropping an image onto the node. Once the image has been uploaded they can be selected inside the node. 6 | 7 | !!! info 8 | by default images will be uploaded to the input folder of ComfyUI 9 | 10 | ## inputs 11 | 12 | `image` 13 | 14 | : The name of the image to use. 15 | 16 | 17 | ## outputs 18 | 19 | `IMAGE` 20 | 21 | : The pixel image. 22 | 23 | `MASK` 24 | 25 | : The alpha channel of the image. 26 | 27 | ## example 28 | 29 | In order to perform image to image generations you have to load the image with the load image node. In the example below an image is loaded using the load image node, and is then encoded to latent space with a [VAE encode](../Latent/VAEEncode.md) node, letting us perform image to image tasks. 30 | 31 | (TODO: provide different example using mask) 32 | 33 |
-------------------------------------------------------------------------------- /docs/Core Nodes/Image/PadImageForOutpainting.md: -------------------------------------------------------------------------------- 1 | # Pad Image for Outpainting 2 | 3 | { align=right width=450 } 4 | 5 | The Pad Image for Outpainting node can be used to to add padding to an image for outpainting. This image can then be given to an inpaint diffusion model via the [VAE Encode for Inpainting](../Latent/inpaint/VAEEncodeForInpainting.md). 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The image to be padded. 12 | 13 | `left` 14 | 15 | : amount to pad left of the image. 16 | 17 | `top` 18 | 19 | : amount to pad above the image. 20 | 21 | `right` 22 | 23 | : amount to pad right of the image. 24 | 25 | `bottom` 26 | 27 | : amount to pad below the image. 28 | 29 | `feathering` 30 | 31 | : How much to feather the borders of the original image. 32 | 33 | ## outputs 34 | 35 | `IMAGE` 36 | 37 | : The padded pixel image. 38 | 39 | `MASK` 40 | 41 | : The mask indicating to the sampler where to outpaint. 42 | 43 | ## example 44 | 45 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/PreviewImage.md: -------------------------------------------------------------------------------- 1 | # Preview Image 2 | 3 | { align=right width=450 } 4 | 5 | The Preview Image node can be used to preview images inside the node graph. 6 | 7 | 8 | ## inputs 9 | 10 | `image` 11 | 12 | : The pixel image to preview. 13 | 14 | 15 | ## outputs 16 | 17 | This node has no outputs. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/SaveImage.md: -------------------------------------------------------------------------------- 1 | # Save Image 2 | 3 | { align=right width=450 } 4 | 5 | The Save Image node can be used to save images. To simply preview an image inside the node graph use the [Preview Image](PreviewImage.md) node. It can be hard to keep track of all the images that you generate. To help with organizing your images you can pass specially formatted strings to an output node with a `file_prefix` widget. For more information about how to format your string see [this](../../Interface/SaveFileFormatting.md) page. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to preview. 12 | 13 | `filename_prefix` 14 | 15 | : A prefix to put into the filename. 16 | 17 | 18 | ## outputs 19 | 20 | This node has no outputs. 21 | 22 | ## example 23 | 24 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/index.md: -------------------------------------------------------------------------------- 1 | # Image 2 | 3 | ComfyUI provides a variety of nodes to manipulate pixel images. These nodes can be used to [load](LoadImage.md) images for img2img workflows, [save](SaveImage.md) results, or e.g. [upscale](./upscaling/UpscaleImageUsingModel.md) images for a highres workflow. -------------------------------------------------------------------------------- /docs/Core Nodes/Image/media/InvertImage.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Image/media/UpscaleImageUsingModel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Image/postprocessing/ImageBlend.md: -------------------------------------------------------------------------------- 1 | # Image Blend 2 | 3 | { align=right width=450 } 4 | 5 | The Image Blend node can be used to blend two images together. 6 | 7 | !!! info 8 | If the dimensions of the second image do not match those of the first it is rescaled and center-cropped to maintain its aspect ratio 9 | 10 | ## inputs 11 | 12 | `image1` 13 | 14 | : A pixel image. 15 | 16 | `image2` 17 | 18 | : A second pixel image. 19 | 20 | `blend_factor` 21 | 22 | : The opacity of the second image. 23 | 24 | `blend_mode` 25 | 26 | : How to blend the images. 27 | 28 | ## outputs 29 | 30 | `IMAGE` 31 | 32 | : The blended pixel image. 33 | 34 | ## example 35 | 36 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/postprocessing/ImageBlur.md: -------------------------------------------------------------------------------- 1 | # Image Blur 2 | 3 | { align=right width=450 } 4 | 5 | The Image Blend node can be used to apply a gaussian blur to an image. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to be blurred. 12 | 13 | `blur_radius` 14 | 15 | : The radius of the gaussian. 16 | 17 | `sigma` 18 | 19 | : The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel. 20 | 21 | ## outputs 22 | 23 | `IMAGE` 24 | 25 | : The blurred pixel image. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/postprocessing/ImageQuantize.md: -------------------------------------------------------------------------------- 1 | # Image Quantize 2 | 3 | { align=right width=450 } 4 | 5 | The Image Quantize node can be used to quantize an image, reducing the number of colors in the image. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to be quantized. 12 | 13 | `colors` 14 | 15 | : The number of colors in the quantized image. 16 | 17 | `dither` 18 | 19 | : Wether to use dithering to make the quantized image look more smooth, or not. 20 | 21 | ## outputs 22 | 23 | `IMAGE` 24 | 25 | : The quantized pixel image. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/postprocessing/ImageSharpen.md: -------------------------------------------------------------------------------- 1 | # Image Sharpen 2 | 3 | { align=right width=450 } 4 | 5 | The Image Sharpen node can be used to apply a Laplacian sharpening filter to an image. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to be sharpened. 12 | 13 | `sharpen_radius` 14 | 15 | : The radius of the sharpening kernel. 16 | 17 | `sigma` 18 | 19 | : The sigma of the gaussian, the smaller sigma is the more the kernel in concentrated on the center pixel. 20 | 21 | `alpha` 22 | 23 | : The strength of the sharpening kernel. 24 | 25 | ## outputs 26 | 27 | `IMAGE` 28 | 29 | : The sharpened pixel image. 30 | 31 | ## example 32 | 33 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/upscaling/UpscaleImage.md: -------------------------------------------------------------------------------- 1 | # Upscale Image 2 | 3 | { align=right width=450 } 4 | 5 | The Upscale Image node can be used to resize pixel images. To upscale images using AI see the [Upscale Image Using Model](UpscaleImageUsingModel.md) node. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel images to be upscaled. 12 | 13 | `upscale_method` 14 | 15 | : The method used for resizing. 16 | 17 | `Width` 18 | 19 | : The target width in pixels. 20 | 21 | `height` 22 | 23 | : The target height in pixels. 24 | 25 | `crop` 26 | 27 | : Wether or not to center-crop the image to maintain the aspect ratio of the original latent images. 28 | 29 | ## outputs 30 | 31 | `IMAGE` 32 | 33 | : The resized images. 34 | 35 | ## example 36 | 37 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Image/upscaling/UpscaleImageUsingModel.md: -------------------------------------------------------------------------------- 1 | # Upscale Image (using Model) 2 | 3 | { align=right width=450 } 4 | 5 | The Upscale Image (using Model) node can be used to upscale pixel images using a model loaded with the [Load Upscale Model](../../Loaders/LoadUpscaleModel.md) node. 6 | 7 | ## inputs 8 | 9 | `upscale_model` 10 | 11 | : The model used for upscaling. 12 | 13 | `image` 14 | 15 | : The pixel images to be upscaled. 16 | 17 | ## outputs 18 | 19 | `IMAGE` 20 | 21 | : The upscaled images. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/EmptyLatentImage.md: -------------------------------------------------------------------------------- 1 | # Empty Latent Image 2 | 3 | { align=right width=450 } 4 | 5 | The Empty Latent Image node can be used to create a new set of empty latent images. These latents can then be used inside e.g. a text2image workflow by noising and denoising them with a sampler node. 6 | 7 | ## inputs 8 | 9 | `width` 10 | 11 | : The width of the latent images in pixels. 12 | 13 | `height` 14 | 15 | : The height of the latent images in pixels. 16 | 17 | `batch_size` 18 | 19 | : The number of latent images. 20 | 21 | ## outputs 22 | 23 | `LATENT` 24 | 25 | : The empty latent images. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/LatentComposite.md: -------------------------------------------------------------------------------- 1 | # Latent Composite 2 | 3 | { align=right width=450 } 4 | 5 | The Latent Composite node can be used to paste one latent into another. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `samples_to` 13 | 14 | : The latents to be pasted in. 15 | 16 | `samples_from` 17 | 18 | : The latents that are to be pasted. 19 | 20 | `x` 21 | 22 | : The x coordinate of the pasted latent in pixels. 23 | 24 | `y` 25 | 26 | : The y coordinate of the pasted latent in pixels. 27 | 28 | `feather` 29 | 30 | : Feathering for the latents that are to be pasted. 31 | 32 | ## outputs 33 | 34 | `LATENT` 35 | 36 | : A new latent composite containing the `samples_from` pasted into `samples_to`. 37 | 38 | ## example 39 | 40 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/LatentCompositeMasked.md: -------------------------------------------------------------------------------- 1 | # Latent Composite Masked 2 | 3 | { align=right width=450 } 4 | 5 | The Latent Composite Masked node can be used to paste a masked latent into another. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `destination` 13 | 14 | : The latents to be pasted in. 15 | 16 | `source` 17 | 18 | : The latents that are to be pasted. 19 | 20 | `mask` 21 | 22 | : The mask for the source latents that are to be pasted. 23 | 24 | `x` 25 | 26 | : The x coordinate of the pasted latent in pixels. 27 | 28 | `y` 29 | 30 | : The y coordinate of the pasted latent in pixels. 31 | 32 | 33 | 34 | ## outputs 35 | 36 | `LATENT` 37 | 38 | : A new latent composite containing the `source` latents pasted into the `destination` latents. 39 | 40 | ## example 41 | 42 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/UpscaleLatent.md: -------------------------------------------------------------------------------- 1 | # Upscale Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Upscale Latent node can be used to resize latent images. 6 | 7 | !!! warning 8 | Resizing latent images is not the same as resizing pixel images. Naively resizing the latents rather than the pixels results in more artifacts. 9 | 10 | ## inputs 11 | 12 | `samples` 13 | 14 | : The latent images to be upscaled. 15 | 16 | `upscale_method` 17 | 18 | : The method used for resizing. 19 | 20 | `Width` 21 | 22 | : The target width in pixels. 23 | 24 | `height` 25 | 26 | : The target height in pixels. 27 | 28 | `crop` 29 | 30 | : Wether or not to center-crop the image to maintain the aspect ratio of the original latent images. 31 | 32 | ## outputs 33 | 34 | `LATENT` 35 | 36 | : The resized latents. 37 | 38 | ## example 39 | 40 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/VAEDecode.md: -------------------------------------------------------------------------------- 1 | # VAE Decode 2 | 3 | { align=right width=450 } 4 | 5 | The VAE Decode node can be used to decode latent space images back into pixel space images, using the provided VAE. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The latent images to be decoded. 12 | 13 | `vae` 14 | 15 | : The VAE to use for decoding the latent images. 16 | 17 | 18 | ## outputs 19 | 20 | `IMAGE` 21 | 22 | : The decoded images. 23 | 24 | ## example 25 | 26 | TODO: SD 1.5 to XL example 27 | 28 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/VAEEncode.md: -------------------------------------------------------------------------------- 1 | # VAE Encode 2 | 3 | { align=right width=450 } 4 | 5 | The VAE Encode node can be used to encode pixel space images into latent space images, using the provided VAE. 6 | 7 | ## inputs 8 | 9 | `pixels` 10 | 11 | : The pixel space images to be encoded. 12 | 13 | `vae` 14 | 15 | : The VAE to use for encoding the pixel images. 16 | 17 | 18 | ## outputs 19 | 20 | `LATENT` 21 | 22 | : The encoded latent images. 23 | 24 | ## example 25 | 26 | In order to use images in e.g. image to image tasks, they first need to be encoded into latent space. In the below example the VAE encode node is used to convert a pixel image into a latent image so that we can re-and de-noise this image into something new. 27 | 28 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/batch/LatentFromBatch.md: -------------------------------------------------------------------------------- 1 | # Latent From Batch 2 | 3 | { align=right width=450 } 4 | 5 | The Latent From Batch node can be used to pick a slice from a batch of latents. This is useful when a specific latent image or images inside the batch need to be isolated in the workflow. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The batch of latent images to pick a slice from. 12 | 13 | `batch_index` 14 | 15 | : The index of the first latent image to pick. 16 | 17 | `length` 18 | 19 | : How many latent images to take. 20 | 21 | ## outputs 22 | 23 | `LATENT` 24 | 25 | : A new batch of latent images only containing the slice that was picked. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/batch/RebatchLatents.md: -------------------------------------------------------------------------------- 1 | # Rebatch Latents 2 | 3 | { align=right width=450 } 4 | 5 | The Rebatch latents node can be used to split or combine batches of latent images. When this results in multiple batches the node will output a list of batches instead of a single batch. This is useful e.g. to split batches up when the batch size is too big for all of them to fit inside VRAM, as ComfyUI will execute nodes for every batch in the list, rather than all at once. It can also be used merge lists of batches back together into a single batch. 6 | 7 | !!! info 8 | The output of this node is a list, read [this]() page for more info about lists in comfy. TODO:figure out when and where to explain this. 9 | 10 | ## inputs 11 | 12 | `samples` 13 | 14 | : The latent images that are to be rebatched. 15 | 16 | `batch_size` 17 | 18 | : The new batch size. 19 | 20 | ## outputs 21 | 22 | `LATENT` 23 | 24 | : A list of latents where each batch is no larger than `batch_size`. 25 | 26 | ## example 27 | 28 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/batch/RepeatLatentBatch.md: -------------------------------------------------------------------------------- 1 | # Repeat Latent Batch 2 | 3 | { align=right width=450 } 4 | 5 | The Repeat Latent Batch node can be used to repeat a batch of latent images. This can e.g. be used to create multiple variations of an image in an image to image workflow. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The batch of latent images that are to be repeated. 12 | 13 | `amount` 14 | 15 | : The number of repeats. 16 | 17 | ## outputs 18 | 19 | `LATENT` 20 | 21 | : A new batch of latent images, repeated `amount` times. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/index.md: -------------------------------------------------------------------------------- 1 | # Latent 2 | 3 | Latent diffusion models such as Stable Diffusion do not operate in pixel space, but denoise in latent space instead. These nodes provide ways to switch between pixel and latent space using [encoders](./VAEEncode.md) and [decoders](./VAEDecode.md), and provide a variety of ways to manipulate latent images. -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/inpaint/SetLatentNoiseMask.md: -------------------------------------------------------------------------------- 1 | # Set Latent Noise Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Set Latent Noise Mask node can be used to add a mask to the latent images for inpainting. When the noise mask is set a sampler node will only operate on the masked area. If a single mask is provided, all the latents in the batch will use this mask. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The latent images to be masked for inpainting. 12 | 13 | `mask` 14 | 15 | : The mask indicating where to inpaint. 16 | 17 | ## outputs 18 | 19 | `LATENT` 20 | 21 | : The masked latents. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/inpaint/VAEEncodeForInpainting.md: -------------------------------------------------------------------------------- 1 | # VAE Encode (for Inpainting) 2 | 3 | { align=right width=450 } 4 | 5 | The VAE Encode For Inpainting node can be used to encode pixel space images into latent space images, using the provided VAE. It also takes a mask for inpainting, indicating to a sampler node which parts of the image should be denoised. The area of the mask can be increased using `grow_mask_by` to provide the inpainting process with some additional padding to work with. 6 | 7 | !!! info 8 | This node is specifically meant to be used for diffusion models trained for inpainting and will make sure the pixels underneath the mask are set to gray (0.5,0.5,0.5) before encoding. 9 | 10 | ## inputs 11 | 12 | `pixels` 13 | 14 | : The pixel space images to be encoded. 15 | 16 | `vae` 17 | 18 | : The VAE to use for encoding the pixel images. 19 | 20 | `mask` 21 | 22 | : The mask indicating where to inpaint. 23 | 24 | `grow_mask_by` 25 | 26 | : How much to increase the area of the given mask. 27 | 28 | 29 | ## outputs 30 | 31 | `LATENT` 32 | 33 | : The masked and encoded latent images. 34 | 35 | ## example 36 | 37 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/FlipLatent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/RebatchLatents.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/RepeatLatentBatch.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/RotateLatent.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/SetLatentNoiseMask.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/VAEDecode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/media/VAEEncode.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/transform/CropLatent.md: -------------------------------------------------------------------------------- 1 | # Crop Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Crop latent node can be used to crop latents to a new shape. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `samples` 13 | 14 | : The latents that are to be cropped. 15 | 16 | `width` 17 | 18 | : The width of the area in pixels. 19 | 20 | `height` 21 | 22 | : The height of the area in pixels. 23 | 24 | `x` 25 | 26 | : The x coordinate of the area in pixels. 27 | 28 | `y` 29 | 30 | : The y coordinate of the area in pixels. 31 | 32 | 33 | ## outputs 34 | 35 | `LATENT` 36 | 37 | : The cropped latents. 38 | 39 | ## example 40 | 41 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/transform/FlipLatent.md: -------------------------------------------------------------------------------- 1 | # Flip Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Flip latent node can be used to flip latents horizontally or vertically. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The latents that are to be flipped. 12 | 13 | `flip_method` 14 | 15 | : Wether to flip the latents horizontally or vertically. 16 | 17 | 18 | 19 | ## outputs 20 | 21 | `LATENT` 22 | 23 | : The flipped latents. 24 | 25 | ## example 26 | 27 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Latent/transform/RotateLatent.md: -------------------------------------------------------------------------------- 1 | # Rotate Latent 2 | 3 | { align=right width=450 } 4 | 5 | The Rotate Latent node can be used to rotate latent images clockwise in increments of 90 degrees. 6 | 7 | ## inputs 8 | 9 | `samples` 10 | 11 | : The latent images to be rotated. 12 | 13 | `rotation` 14 | 15 | : Clockwise rotation. 16 | 17 | ## outputs 18 | 19 | `LATENT` 20 | 21 | : The rotated latents. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/GLIGENLoader.md: -------------------------------------------------------------------------------- 1 | # GLIGEN Loader 2 | 3 | { align=right width=450 } 4 | 5 | The GLIGEN Loader node can be used to load a specific GLIGEN model. GLIGEN models are used to associate spatial information to parts of a text prompt, guiding the diffusion model to generate images adhering to compositions specified by GLIGEN. 6 | 7 | ## inputs 8 | 9 | `gligen_name` 10 | 11 | : The name of the GLIGEN model. 12 | 13 | ## outputs 14 | 15 | `GLIGEN` 16 | 17 | : The GLIGEN model used to encode spatial information to parts of the text prompt. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/HypernetworkLoader.md: -------------------------------------------------------------------------------- 1 | # Hypernetwork Loader 2 | 3 | { align=right width=450 } 4 | 5 | The Hypernetwork Loader node can be used to load a hypernetwork. similar to LoRAs, they are used to modify the diffusion model, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple hypernetworks together to further modify the model. 6 | 7 | !!! tip 8 | 9 | Hypernetwork strength values can be set to negative values. At times this can result in interesting effects. 10 | 11 | ## inputs 12 | 13 | `model` 14 | 15 | : A diffusion model. 16 | 17 | `hypernetwork_name` 18 | 19 | : The name of the hypernetwork. 20 | 21 | `strength` 22 | 23 | : How strongly to modify the diffusion model. This value can be negative. 24 | 25 | 26 | ## outputs 27 | 28 | `MODEL` 29 | 30 | : The modified diffusion model. 31 | 32 | 33 | ## example 34 | 35 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadCLIP.md: -------------------------------------------------------------------------------- 1 | # Load CLIP 2 | 3 | { align=right width=450 } 4 | 5 | The Load CLIP node can be used to load a specific CLIP model, CLIP models are used to encode text prompts that guide the diffusion process. 6 | 7 | !!! warning 8 | 9 | Conditional diffusion models are trained using a specific CLIP model, using a different model than the one which it was trained with is unlikely to result in good images. The [Load Checkpoint](LoadCheckpoint.md) node automatically loads the correct CLIP model. 10 | 11 | ## inputs 12 | 13 | `clip_name` 14 | 15 | : The name of the CLIP model. 16 | 17 | ## outputs 18 | 19 | `CLIP` 20 | 21 | : The CLIP model used for encoding text prompts. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadCLIPVision.md: -------------------------------------------------------------------------------- 1 | # Load CLIP Vision 2 | 3 | { align=right width=450 } 4 | 5 | The Load CLIP Vision node can be used to load a specific CLIP vision model, similar to how CLIP models are used to encode text prompts, CLIP vision models are used to encode images. 6 | 7 | ## inputs 8 | 9 | `clip_name` 10 | 11 | : The name of the CLIP vision model. 12 | 13 | ## outputs 14 | 15 | `CLIP_VISION` 16 | 17 | : The CLIP vision model used for encoding image prompts. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadCheckpoint.md: -------------------------------------------------------------------------------- 1 | # Load Checkpoint 2 | 3 | { align=right width=450 } 4 | 5 | The Load Checkpoint node can be used to load a diffusion model, diffusion models are used to denoise latents. This node will also provide the appropriate VAE and CLIP model. 6 | 7 | ## inputs 8 | 9 | `ckpt_name` 10 | 11 | : The name of the model. 12 | 13 | ## outputs 14 | 15 | `MODEL` 16 | 17 | : The model used for denoising latents. 18 | 19 | `CLIP` 20 | 21 | : The CLIP model used for encoding text prompts. 22 | 23 | `VAE` 24 | 25 | : The VAE model used for encoding and decoding images to and from latent space. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadControlNet.md: -------------------------------------------------------------------------------- 1 | # Load ControlNet Model 2 | 3 | { align=right width=450 } 4 | 5 | The Load ControlNet Model node can be used to load a ControlNet model. Similar to how the CLIP model provides a way to give textual hints to guide a diffusion model, ControlNet models are used to give visual hints to a diffusion model. This process is different from e.g. giving a diffusion model a partially noised up image to modify. Instead ControlNet models can be used to tell the diffusion model e.g. where edges in the final image should be, or how subjects should be posed. This node can also be used to load T2IAdaptors. 6 | 7 | ## inputs 8 | 9 | `control_net_name` 10 | 11 | : The name of the ControlNet model. 12 | 13 | ## outputs 14 | 15 | `CONTROL_NET` 16 | 17 | : The ControlNet or T2IAdaptor model used for providing visual hints to a diffusion model. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadLoRA.md: -------------------------------------------------------------------------------- 1 | # Load LoRA 2 | 3 | { align=right width=450 } 4 | 5 | The Load LoRA node can be used to load a LoRA. LoRAs are used to modify the diffusion and CLIP models, to alter the way in which latents are denoised. Typical use-cases include adding to the model the ability to generate in certain styles, or better generate certain subjects or actions. One can even chain multiple LoRAs together to further modify the model. 6 | 7 | !!! tip 8 | 9 | LoRA strength values can be set to negative values. At times this can result in interesting effects. 10 | 11 | ## inputs 12 | 13 | `model` 14 | 15 | : A diffusion model. 16 | 17 | `clip` 18 | 19 | : A CLIP model. 20 | 21 | `lora_name` 22 | 23 | : The name of the LoRA. 24 | 25 | `strength_model` 26 | 27 | : How strongly to modify the diffusion model. This value can be negative. 28 | 29 | `strength_clip` 30 | 31 | : How strongly to modify the CLIP model. This value can be negative. 32 | 33 | ## outputs 34 | 35 | `MODEL` 36 | 37 | : The modified diffusion model. 38 | 39 | `CLIP` 40 | 41 | : The modified CLIP model. 42 | 43 | ## example 44 | 45 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadStyleModel.md: -------------------------------------------------------------------------------- 1 | # Load Style Model 2 | 3 | { align=right width=450 } 4 | 5 | The Load Style Model node can be used to load a Style model. Style models can be used to provide a diffusion model a visual hint as to what kind of style the denoised latent should be in. 6 | 7 | !!! info 8 | Only T2IAdaptor style models are currently supported 9 | 10 | ## inputs 11 | 12 | `style_model_name` 13 | 14 | : The name of the style model. 15 | 16 | ## outputs 17 | 18 | `STYLE_MODEL` 19 | 20 | : The style model used for providing visual hints about the desired style to a diffusion model. 21 | 22 | ## example 23 | 24 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadUpscaleModel.md: -------------------------------------------------------------------------------- 1 | # Load Upscale Model 2 | 3 | { align=right width=450 } 4 | 5 | The Load Upscale Model node can be used to load a specific upscale model, upscale models are used to upscale images. 6 | 7 | 8 | ## inputs 9 | 10 | `model_name` 11 | 12 | : The name of the upscale model. 13 | 14 | ## outputs 15 | 16 | `UPSCALE_MODEL` 17 | 18 | : The upscale model used for upscaling images. 19 | 20 | ## example 21 | 22 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/LoadVAE.md: -------------------------------------------------------------------------------- 1 | # Load VAE 2 | 3 | { align=right width=450 } 4 | 5 | The Load VAE node can be used to load a specific VAE model, VAE models are used to encoding and decoding images to and from latent space. Although the [Load Checkpoint](LoadCheckpoint.md) node provides a VAE model alongside the diffusion model, sometimes it can be useful to use a specific VAE model. 6 | 7 | ## inputs 8 | 9 | `vae_name` 10 | 11 | : The name of the VAE. 12 | 13 | ## outputs 14 | 15 | `VAE` 16 | 17 | : The VAE model used for encoding and decoding images to and from latent space. 18 | 19 | ## example 20 | 21 | At times you might wish to use a different VAE than the one that came loaded with the [Load Checkpoint](./LoadCheckpoint.md) node. In the example below we use a different VAE to encode an image to latent space, and decode the result of the Ksampler. 22 | 23 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/index.md: -------------------------------------------------------------------------------- 1 | # Loaders 2 | 3 | The loaders in this segment can be used to load a variety of models used in various workflows. A full list of all of the loaders can be found in the sidebar. -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/GLIGENLoader.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadCLIP.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadCLIPVision.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadControlNet.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadStyleModel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadUpscaleModel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/media/LoadVAE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Loaders/unCLIPCheckpointLoader.md: -------------------------------------------------------------------------------- 1 | # unCLIP Checkpoint Loader 2 | 3 | { align=right width=450 } 4 | 5 | The unCLIP Checkpoint Loader node can be used to load a diffusion model specifically made to work with unCLIP. unCLIP Diffusion models are used to denoise latents conditioned not only on the provided text prompt, but also on provided images. This node will also provide the appropriate VAE and CLIP amd CLIP vision models. 6 | 7 | !!! warning 8 | even though this node can be used to load all diffusion models, not all diffusion models are compatible with unCLIP. 9 | 10 | ## inputs 11 | 12 | `ckpt_name` 13 | 14 | : The name of the model. 15 | 16 | ## outputs 17 | 18 | `MODEL` 19 | 20 | : The model used for denoising latents. 21 | 22 | `CLIP` 23 | 24 | : The CLIP model used for encoding text prompts. 25 | 26 | `VAE` 27 | 28 | : The VAE model used for encoding and decoding images to and from latent space. 29 | 30 | `CLIP_VISION` 31 | 32 | : The CLIP Vision model used for encoding image prompts. 33 | 34 | ## example 35 | 36 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/ConvertImageToMask.md: -------------------------------------------------------------------------------- 1 | # Convert Image to Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Convert Image yo Mask node can be used to convert a specific channel of an image into a mask. 6 | 7 | ## inputs 8 | 9 | `image` 10 | 11 | : The pixel image to be converted to a mask. 12 | 13 | `channel` 14 | 15 | : Which channel to use as a mask. 16 | 17 | ## outputs 18 | 19 | `MASK` 20 | 21 | : The mask created from the image channel. 22 | 23 | ## example 24 | 25 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/ConvertMaskToImage.md: -------------------------------------------------------------------------------- 1 | # Convert Mask to Image 2 | 3 | { align=right width=450 } 4 | 5 | The Convert Mask to Image node can be used to convert a mask to a grey scale image. 6 | 7 | ## inputs 8 | 9 | `mask` 10 | 11 | : The mask to be converted to an image. 12 | 13 | ## outputs 14 | 15 | `IMAGE` 16 | 17 | : The grey scale image from the mask. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/CropMask.md: -------------------------------------------------------------------------------- 1 | # Crop Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Crop Mask node can be used to crop a mask to a new shape. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `mask` 13 | 14 | : The mask to be cropped. 15 | 16 | `width` 17 | 18 | : The width of the area in pixels. 19 | 20 | `height` 21 | 22 | : The height of the area in pixels. 23 | 24 | `x` 25 | 26 | : The x coordinate of the area in pixels. 27 | 28 | `y` 29 | 30 | : The y coordinate of the area in pixels. 31 | 32 | ## outputs 33 | 34 | `MASK` 35 | 36 | : The cropped mask. 37 | 38 | ## example 39 | 40 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/FeatherMask.md: -------------------------------------------------------------------------------- 1 | # Feather Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Feather Mask node can be used to feather a mask. 6 | 7 | ## inputs 8 | 9 | `mask` 10 | 11 | : The mask to be feathered. 12 | 13 | `left` 14 | 15 | : How much to feather edges on the left 16 | 17 | `top` 18 | 19 | : How much to feather edges on the top 20 | 21 | `right` 22 | 23 | : How much to feather edges on the right 24 | 25 | `bottom` 26 | 27 | : How much to feather edges on the bottom 28 | 29 | ## outputs 30 | 31 | `MASK` 32 | 33 | : The feathered mask. 34 | 35 | ## example 36 | 37 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/InvertMask.md: -------------------------------------------------------------------------------- 1 | # Invert Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Invert Mask node can be used to invert a mask. 6 | 7 | ## inputs 8 | 9 | `mask` 10 | 11 | : The mask to be inverted. 12 | 13 | ## outputs 14 | 15 | `MASK` 16 | 17 | : The inverted mask. 18 | 19 | ## example 20 | 21 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/LoadImageAsMask.md: -------------------------------------------------------------------------------- 1 | # Load Image (as Mask) 2 | 3 | { align=right width=450 } 4 | 5 | The Load Image (as Mask) node can be used to load a channel of an image to use as a mask. Images can be uploaded by starting the file dialog or by dropping an image onto the node. Once the image has been uploaded they can be selected inside the node. 6 | 7 | !!! info 8 | by default images will be uploaded to the input folder of ComfyUI 9 | 10 | ## inputs 11 | 12 | `image` 13 | 14 | : The name of the image to be converted to a mask. 15 | 16 | `channel` 17 | 18 | : The channel of the image to be used as mask. 19 | 20 | ## outputs 21 | 22 | `MASK` 23 | 24 | : The mask created from the image channel. 25 | 26 | ## example 27 | 28 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/MaskComposite.md: -------------------------------------------------------------------------------- 1 | # Mask Composite 2 | 3 | { align=right width=450 } 4 | 5 | The Mask Composite node can be used to paste one mask into another. 6 | 7 | !!! info 8 | The origin of the coordinate system in ComfyUI is at the top left corner. 9 | 10 | ## inputs 11 | 12 | `destination` 13 | 14 | : The mask that is to be pasted in. 15 | 16 | `source` 17 | 18 | : The mask that is to be pasted. 19 | 20 | `x` 21 | 22 | : The x coordinate of the pasted mask in pixels. 23 | 24 | `y` 25 | 26 | : The y coordinate of the pasted mask in pixels. 27 | 28 | `operation` 29 | 30 | : how to paste the mask. 31 | 32 | ## outputs 33 | 34 | `MASK` 35 | 36 | : A new mask composite containing the `source` pasted into `destination`. 37 | 38 | ## example 39 | 40 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/SolidMask.md: -------------------------------------------------------------------------------- 1 | # Solid Mask 2 | 3 | { align=right width=450 } 4 | 5 | The Solid Mask node can be used to create a solid masking containing a single value. 6 | 7 | ## inputs 8 | 9 | `value` 10 | 11 | : The value to fill the mask with. 12 | 13 | `width` 14 | 15 | : The width of the mask. 16 | 17 | `height` 18 | 19 | : The height of the mask. 20 | 21 | ## outputs 22 | 23 | `MASK` 24 | 25 | : The mask filled with a single value. 26 | 27 | ## example 28 | 29 | example usage text with workflow image -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/index.md: -------------------------------------------------------------------------------- 1 | # Mask 2 | 3 | Masks provide a way to tell the sampler what to denoise and what to leave alone. These nodes provide a variety of ways create or load masks and manipulate them. -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/media/ConvertImageToMask.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/media/ConvertMaskToImage.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Mask/media/InvertMask.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Core Nodes/Sampling/KSampler Advanced.md: -------------------------------------------------------------------------------- 1 | # KSampler Advanced 2 | 3 | { align=right width=450 } 4 | 5 | The KSampler Advanced node is the more advanced version of the [KSampler](KSampler.md) node. While the KSampler node always adds noise to the latent followed by completely denoising the noised up latent, the KSampler Advanced node provides extra settings to control this behavior. The KSampler Advanced node can be told not to add noise into the latent with the `add_noise` setting. It can also be made to return partially denoised images via the `return_with_leftover_noise` setting. Unlike the KSampler node, this node does not have a `denoise` setting but this process is instead controlled by the `start_at_step` and `end_at_step` settings. This makes it possible to e.g. hand over a partially denoised latent to a separate KSampler Advanced node to finish the process. 6 | 7 | !!! tip 8 | 9 | Given that `end_at_step >= steps` a KSampler Advanced node will denoise a latent in the exact same way a KSampler node would with a `denoise` setting of: 10 | 11 | `denoise = (steps - start_at_step) / steps` 12 | 13 | ## inputs 14 | 15 | `Model` 16 | 17 | : The model used for denoising 18 | 19 | `Positive` 20 | 21 | : The positive conditioning. 22 | 23 | `Negative` 24 | 25 | : The negative conditioning. 26 | 27 | `latent_image` 28 | 29 | : The latent that will be denoised. 30 | 31 | `add_noise` 32 | 33 | : Wether or not to add noise to the latent before denoising. When enabled the node will inject noise appropriate for the given start step. 34 | 35 | `seed` 36 | 37 | : The random seed used in creating the noise. 38 | 39 | `control_after_generate` 40 | 41 | : Provides the ability to change the seed number described above after each prompt. the node can `randomize`, `increment`, `decrement` or keep the seed number `fixed`. 42 | 43 | `steps` 44 | 45 | : The number of steps in the schedule. The more steps the sampler is allowed to make the more accurate the result will be. See the [samplers](samplers.md) page for good guidelines on how to pick an appropriate number of steps. 46 | 47 | `cfg` 48 | 49 | : The classifier free guidance(cfg) scale determines how aggressive the sampler should be in realizing the content of the prompts in the final image. Higher scales force the image to better represent the prompt, but a scale that is set too high will negatively impact the quality of the image. 50 | 51 | `sampler_name` 52 | 53 | : Which sampler to use, see the [samplers](samplers.md) page for more details on the available samplers. 54 | 55 | `scheduler` 56 | 57 | : The type of schedule to use, see the [samplers](samplers.md) page for more details on the available schedules. 58 | 59 | `start_at_step` 60 | 61 | : Determines at which step of the schedule to start the denoising process. 62 | 63 | `end_at_step` 64 | 65 | : Determines at which step of the schedule to end denoising. When this settings exceeds `steps` the schedule ends at `steps` instead 66 | 67 | `return_with_leftover_noise` 68 | 69 | : When disabled the KSampler Advanced will attempt to completely denoise the latent in the final step. Depending on how many steps in the schedule are skipped by this, the output can be inaccurate and of lower quality. 70 | 71 | 72 | ## outputs 73 | 74 | `LATENT` 75 | 76 | : the denoised latent. 77 | 78 | ## example 79 | 80 | Under construction -------------------------------------------------------------------------------- /docs/Core Nodes/Sampling/KSampler.md: -------------------------------------------------------------------------------- 1 | # KSampler 2 | 3 | { align=right width=450 } 4 | 5 | The KSampler uses the provided model and positive and negative conditioning to generate a new version of the given latent. First the latent is noised up according to the given `seed` and `denoise` strength, erasing some of the latent image. then this noise is removed using the given `Model` and the `positive` and `negative` conditioning as guidance, "dreaming" up new details in places where the image was erased by noise. 6 | 7 | ## inputs 8 | 9 | `Model` 10 | 11 | : The model used for denoising 12 | 13 | `Positive` 14 | 15 | : The positive conditioning. 16 | 17 | `Negative` 18 | 19 | : The negative conditioning. 20 | 21 | `latent_image` 22 | 23 | : The latent that will be denoised. 24 | 25 | `seed` 26 | 27 | : The random seed used in creating the noise. 28 | 29 | `control_after_generate` 30 | 31 | : Provides the ability to change the seed number described above after each prompt. the node can `randomize`, `increment`, `decrement` or keep the seed number `fixed`. 32 | 33 | `steps` 34 | 35 | : The number of steps to use during denoising. The more steps the sampler is allowed to make the more accurate the result will be. See the [samplers](samplers.md) page for good guidelines on how to pick an appropriate number of steps. 36 | 37 | `cfg` 38 | 39 | : The classifier free guidance(cfg) scale determines how aggressive the sampler should be in realizing the content of the prompts in the final image. Higher scales force the image to better represent the prompt, but a scale that is set too high will negatively impact the quality of the image. 40 | 41 | `sampler_name` 42 | 43 | : Which sampler to use, see the [samplers](samplers.md) page for more details on the available samplers. 44 | 45 | `scheduler` 46 | 47 | : The type of schedule to use, see the [samplers](samplers.md) page for more details on the available schedules. 48 | 49 | `denoise` 50 | 51 | : How much information of the latents should be erased by noise. 52 | 53 | 54 | ## outputs 55 | 56 | `LATENT` 57 | 58 | : the denoised latent. 59 | 60 | ## example 61 | 62 | The KSampler is the core of any workflow and can be used to perform text to image and image to image generation tasks. The example below shows how to use the KSampler in an image to image task, by connecting a model, a positive and negative embedding, and a latent image. Note that we use a denoise value of less than 1.0. This way parts of the original image are preserved when it is noised up, guiding the denoising process to similar looking images. 63 | 64 | -------------------------------------------------------------------------------- /docs/Core Nodes/Sampling/index.md: -------------------------------------------------------------------------------- 1 | # Sampling 2 | 3 | The sampling nodes provide a way to denoise latent images using a diffusion model. For an overview of the available schedules and samplers, see [here](./samplers.md) -------------------------------------------------------------------------------- /docs/Core Nodes/Sampling/samplers.md: -------------------------------------------------------------------------------- 1 | # Samplers 2 | 3 | under construction 4 | 5 | -------------------------------------------------------------------------------- /docs/Core Nodes/index.md: -------------------------------------------------------------------------------- 1 | # Overview page of ComfyUI core nodes -------------------------------------------------------------------------------- /docs/Core Nodes/media/img2imgExample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlenderNeko/ComfyUI-docs/807e2ab3ff1cf45b742eec9cc6a57d713d08040b/docs/Core Nodes/media/img2imgExample.png -------------------------------------------------------------------------------- /docs/Custom Nodes/index.md: -------------------------------------------------------------------------------- 1 | # Overview page of developing ComfyUI custom nodes stuff -------------------------------------------------------------------------------- /docs/Developing Custom Nodes/index.md: -------------------------------------------------------------------------------- 1 | # Overview page of ComfyUI interface stuff -------------------------------------------------------------------------------- /docs/Interface/NodeOptions.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlenderNeko/ComfyUI-docs/807e2ab3ff1cf45b742eec9cc6a57d713d08040b/docs/Interface/NodeOptions.md -------------------------------------------------------------------------------- /docs/Interface/SaveFileFormatting.md: -------------------------------------------------------------------------------- 1 | # Save File Formatting 2 | 3 | It can be hard to keep track of all the images that you generate. To help with organizing your images you can pass specially formatted strings to an output node with a `file_prefix` widget. 4 | 5 | ## Search and replace strings 6 | 7 | To automatically insert the values of certain node widgets into the file name the following syntax can be used: `%node_name.widget_name%` e.g. if we wish to store images on a per resolution bases we could provide the node with the following string: `%Empty Latent Image.width%x%Empty Latent Image.height%/image`. These string will then be replaced by the specified node values. 8 | 9 | ## Renaming nodes for search and replace 10 | 11 | At times node names might be rather large or multiple nodes might share the same name. In these cases one can specify a specific name in the node option menu under `properties>Node name for S&R` 12 | 13 | { width=700 } 14 | 15 | ## Date time strings 16 | 17 | ComfyUI can also inset date information with `%date:FORMAT%` where format recognizes the following specifiers: 18 | 19 | | specifier | description | 20 | | -------------- | ----------- | 21 | | `d` or `dd` | day | 22 | | `M` or `MM` | month | 23 | | `yy` or `yyyy` | year | 24 | | `h` or `hh` | hour | 25 | | `m` or `mm` | minute | 26 | | `s` or `ss` | second | 27 | 28 | -------------------------------------------------------------------------------- /docs/Interface/Shortcuts.md: -------------------------------------------------------------------------------- 1 | # Shortcuts 2 | 3 | ComfyUI comes with the following shortcuts you can use to speed up your workflow: 4 | 5 | | Keybind | Explanation | 6 | | -------------------- | -------------------------------------------------------------- | 7 | | ++ctrl+enter++ | Queue up current graph for generation | 8 | | ++ctrl+shift+enter++ | Queue up current graph as first for generation | 9 | | ++ctrl+s++ | Save workflow | 10 | | ++ctrl+o++ | Load workflow | 11 | | ++ctrl+a++ | Select all nodes | 12 | | ++ctrl+m++ | Mute/unmute selected nodes | 13 | | ++delete++ | Delete selected nodes | 14 | | ++backspace++ | Delete selected nodes | 15 | | ++ctrl+delete++ | Delete the current graph | 16 | | ++ctrl+backspace++ | Delete the current graph | 17 | | ++space++ | Move the canvas around when held and moving the cursor | 18 | | ++ctrl+lbutton++ | Add clicked node to selection | 19 | | ++shift+lbutton++ | Add clicked node to selection | 20 | | ++ctrl+c++ | Copy selected nodes | 21 | | ++ctrl+v++ | Paste selected nodes while severing connections | 22 | | ++ctrl+shift+v++ | Paste selected nodes while maintaining incoming connections | 23 | | ++shift+lbutton++ | Hold and drag to move multiple selected nodes at the same time | 24 | | ++ctrl+d++ | Load default graph | 25 | | ++q++ | Toggle visibility of the queue | 26 | | ++h++ | Toggle visibility of history | 27 | | ++r++ | Refresh graph | 28 | | 2 X ++lbutton++ | Double click to open node quick search palette | 29 | | ++rbutton++ | Open node menu | -------------------------------------------------------------------------------- /docs/Interface/Textprompts.md: -------------------------------------------------------------------------------- 1 | # Text Prompts 2 | 3 | ComfyUI Provides a variety of ways to finetune your prompts to better reflect your intention. 4 | 5 | ## up and down weighting 6 | 7 | The importance of parts of the prompt can be up or down-weighted by enclosing the specified part of the prompt in brackets using the following syntax: `(prompt:weight)`. E.g. if we have a prompt `flowers inside a blue vase` and we want the diffusion model to empathize the flowers we could try reformulating our prompt into: `(flowers:1.2) inside a blue vase`. Nested loops multiply the weights inside them, e.g. in the prompt `((flowers:1.2):.5) inside a blue vase` flowers end up with a weight of 0.6. Using only brackets without specifying a weight is shorthand for `(prompt:1.1)`, e.g. `(flower)` is equal to `(flower:1.1)`. To use brackets inside a prompt they have to be escaped, e.g. `\(1990\)`. ComfyUI can also add the appropriate weighting syntax for a selected part of the prompt via the keybinds ++ctrl+arrow-up++ and ++ctrl+arrow-down++. The amount by which these shortcuts up or down-weight can be adjusted in the settings. 8 | 9 | ## using textual inversion embeddings 10 | 11 | Textual inversions are custom made CLIP embeddings that embody certain concepts. Textual inversions can be referenced inside a prompt by use the following syntax: `embedding:name` where name is the name of the embedding file. 12 | 13 | ## adding random choices 14 | 15 | It is possible to let ComfyUI choose random parts of a prompt when it is queued up using the following syntax `{choice1|choice2|...}`. E.g. if we want ComfyUI to randomly select one of a set of colors we can add the following to our prompt: `{red|blue|yellow|green}`. -------------------------------------------------------------------------------- /docs/Interface/UtilityNodes.md: -------------------------------------------------------------------------------- 1 | # Utility Nodes 2 | 3 | ComfyUI comes with a set of nodes to help manage the graph. 4 | 5 | ## Reroute 6 | 7 | { align=right width=200 } 8 | 9 | The Reroute node can be used to reroute links, this can be useful for organizing your workflows. 10 | 11 | !!! tip 12 | the in and output on the reroute node can also be positioned vertically 13 | 14 | ## Primitive 15 | 16 | { align=right width=450 } 17 | 18 | The Primitive node can be used to... -------------------------------------------------------------------------------- /docs/Interface/index.md: -------------------------------------------------------------------------------- 1 | # Overview page of ComfyUI interface stuff 2 | 3 | under construction -------------------------------------------------------------------------------- /docs/Interface/media/Primitive.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Interface/media/Reroute.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/Interface/media/SR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlenderNeko/ComfyUI-docs/807e2ab3ff1cf45b742eec9cc6a57d713d08040b/docs/Interface/media/SR.png -------------------------------------------------------------------------------- /docs/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | hide: 3 | - footer 4 | --- 5 | 6 | # Welcome to the ComfyUI Community Docs! 7 | 8 | This is the community-maintained repository of documentation related to [ComfyUI](https://github.com/comfyanonymous/ComfyUI), a powerful and modular stable diffusion GUI and backend. 9 | 10 | The aim of this page is to get you up and running with ComfyUI, running your first gen, and providing some suggestions for the next steps to explore. 11 | 12 | ## Installation 13 | 14 | We won't be covering the installation of ComfyUI in detail, as the project is under active development, which tends to change the installation instructions. Instead, refer to the [README](https://github.com/comfyanonymous/ComfyUI#installing) on GitHub and find the sections that are relevant to your install (Linux, macOS or Windows). 15 | 16 | ### Downloading a Model 17 | 18 | If you're entirely new to anything Stable Diffusion-related, the first thing you'll want to do is grab a model _checkpoint_ that you will use to generate your images. 19 | 20 | !!! tip "Experienced Users" 21 | 22 | If you already have files (model checkpoints, embeddings etc), there's no need to re-download those. You can keep them in the same location and just tell ComfyUI where to find them. To do this, locate the file called `extra_model_paths.yaml.example`, rename it to `extra_model_paths.yaml`, then edit the relevant lines and restart Comfy. Once that's done, skip to the next section. 23 | 24 | You can find a large variety of models on websites like [CivitAI](https://civitai.com/) or [HuggingFace](https://huggingface.co/models?other=stable-diffusion). To start, grab a model _checkpoint_ that you like and place it in `models/checkpoints` (create the directory if it doesn't exist yet), then re-start ComfyUI. 25 | 26 | ## First Steps With Comfy 27 | 28 | At this stage, you should have ComfyUI up and running in a browser tab. The default flow that's loaded is a good starting place to get familiar with. To navigate the canvas, you can either drag the canvas around, or hold ++space++ and move your mouse. You can zoom by scrolling. 29 | 30 | !!! tip "Accidents happen" 31 | 32 | If you mess something up, just hit `Load Default` in the menu to reset it to the inital state. 33 | 34 |