ComfyUI

ComfyUI

comfyui plugin, modular Stable Diffusion graphical interface

Visit Site →

ComfyUI Plugin Official Website, Modular Stable Diffusion Graphical Interface

ComfyUI Introduction

ComfyUI is an alternative WebUI based on the node workflow of the Stable Diffusion algorithm. By breaking down the Stable Diffusion process into nodes, it achieves more precise workflow customization and improved reproducibility. The image generation speed will be faster than traditional WebUI, and it can use less GPU memory.

「ComfyUI Installer and Workflow」: Quark Cloud Drive Fast Download, Register for 1TB Space

https://pan.quark.cn/s/1c846e5a7308

Official GitHub Link:

https://github.com/comfyanonymous/ComfyUI

Official Usage Examples:

https://comfyanonymous.github.io/ComfyUI_examples/

ComfyUI Author Q&A&A - Why did you make this? I want to understand the detailed working principle of stable diffusion. I also want something clean and powerful to try SD without restrictions. - For whom? This is for anyone who wants to create complex workflows with SD or wants to learn more about the working principles of SD. The interface closely follows the working principles of SD, and the code should be easier to understand than other SD UIs.

Why Use ComfyUI? What Are the Advantages of ComfyUI?

1. Less GPU memory usage, compared to traditional WebUI, ComfyUI can produce larger images with the same amount of GPU memory, especially now, it's too difficult to play SDXL with small GPU memory using WebUI. This should be the main reason for the second spring of ComfyUI.

2. Higher limits, ComfyUI is more suitable for complex long-term large-scale work, which can integrate the workflow that requires multiple steps in traditional WebUI into one workflow.

3. Workflows can be reused quickly, ComfyUI can save the workflows used before, and the next time you use the same workflow, you can directly load and reuse it.

4. Higher playability, each node can be installed and loaded, and the connection process can have more exploratory play.

Of course, compared to traditional WebUI, the main disadvantage is that the difficulty of getting started is somewhat high, and the ComfyUI plugin is still not as many as the WebUI.

Why Do We Need ComfyUI? 

The author's original intention for writing the ComfyUI code was to gain a deep understanding of the working principles of stable diffusion and to have a powerful and simple tool to carry out unrestricted stable diffusion experiments.
If you are also interested in deeply understanding the working principles of stable diffusion and are looking for a tool to create your own image generation workflow, then ComfyUI is definitely your best choice. Additionally,The main reason for using ComfyUI is its better optimization for SDXL, lower GPU memory usage, and faster speed.
Many people may find it strange, isn't A1111 already good enough? Why use ComfyUI? So let's talk about the differences between A1111 and ComfyAI next.
①User InterfaceA1111's user interface is more in line with our habits, and for each setting, we just need to make a selection or adjustment. For example, when we need to perform image-to-image operations, we just need to click the image-to-image tag, upload the image, and set the parameters, and then the model will complete the entire image generation process according to the internal settings of A1111. But ComfyUI is different, if we need to perform image-to-image operations, we need to build the process ourselves, consider which modules (nodes) to add, and how these nodes are connected, etc., then set the parameters, and finally, ComfyUI will generate the final image according to the process we set. Therefore, if you know nothing about stable diffusion, A1111 is a better choice for you, and when you have a certain understanding of the stable diffusion operation mechanism, ComfyUI will also be a very good alternative.
②Extended SupportA1111 has stronger extended support than ComfyUI. When searching for "ComfyUI" in the GitHub search box, there are only 22 pages of search results, while searching for "stable diffusion webui" results in 100 pages. This means that there are more plugins for A1111, indicating richer extension functions and stronger overall capabilities.
③Drawing SpeedRecently, the sudden increase in the popularity of ComfyUI is mainly due to its better support for SDXL. In A1111, using the SDXL model often consumes a lot of memory, and the GPU memory usage is also high, which leads to slow image generation speed. However, ComfyUI can complete the same content with lower GPU memory and memory usage at a faster speed. For SD v1 version, there is no significant difference in drawing speed between A1111 and ComfyUI, but using SDXL to draw, the speed of ComfyUI is about twice that of A1111. Therefore, if you want to experience SDXL better with low GPU memory, ComfyUI is my current more recommended choice.   

How to Download and Install ComfyUI

ComfyUI Project Website: https://github.com/comfyanonymous/ComfyUI

Windows system can directly download the compressed package: https://github.com/comfyanonymous/ComfyUI/releases/download/latest/ComfyUI_windows_portable_nvidia_cu118_or_cpu.7z

Then extract the installation package and run the corresponding bat file. If using Nvidia GPU, run run_nvidia_gpu.bat, and if using CPU, run run_cpu.bat

Other systems can refer to the installation methods in the project

How to Reuse WebUI Models and Plugins

If you have installed WebUI before, especially most students have installed the integrated package of Qiu Ye, you can remove the .example suffix from the extra_model_paths.yaml.example file, then change the base_path to the directory of Qiu Ye's integrated package, so you can reuse the original models and plugins. If you haven't used WebUI before, you need to download the models to the \ComfyUI\models\checkpoints directory.

How to Download SDXL 1.0 Related Model Files

Download the related model files for SDXL:

Base Model: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/main
Refiner Model: https://huggingface.co/stabilityai/stable-diffusion-xl-refiner-1.0/tree/main
VAE Model: https://huggingface.co/stabilityai/sdxl-vae/tree/main
LoRA Model: https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/sd_xl_offset_example-lora_1.0.safetensors

Place the base model and Refiner model files in the \ComfyUI\models\checkpoints directory
Place the VAE model in the \ComfyUI\models\vae directory
Place the LoRA model in the \ComfyUI\models\loras directory

Basic Understanding of ComfyUI Node Operations and Basic Commands

Double-click run_nvidia_gpu.bat and wait for the loading to complete to automatically open the work interface. To keep it up to date, you can run update/update_comfyui.bat for updates.

1. Basic Operations of ComfyUI Nodes

· Add Node

Right-click in the workspace —>Add Node to add a node

· View All Nodes

Double-click an empty area to view the list of all nodes and search for related nodes

· Select Multiple Nodes

Press Ctrl + mouse select to select multiple nodes. Press SHIFT + drag to move them simultaneously.

· Add Color to Nodes

Right-click on a node —>Colors to add different colors for different nodes to distinguish them

2. Node Wiring in ComfyUI