ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

This tutorial is the latest SD in 2024 ComfyUIGetting Started, designed for beginners, details how to build a controlNet workflow. Through step-by-step guidance, you can easily master the advanced functions of SD ComfyUI and improve yourAI Drawingprecision and creativity.

We areWebUIControlNet is used through plugins, which contain preprocessors and models. In comfyui, we build preprocessors and models separately. Let's see how to build them.

First we load our default workflow

1. Preprocessor

We can add our preprocessor in the blank area as follows

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

Another way is to install the preprocessor plug-in to add our preprocessor node

Controlnet Preprocessor Plug-in:

  1. Plugin address: https://github.com/Fannovel16/comfyui_controlnet_aux.git
  2. If after installation, running ComfyUI shows that the plugin cannot be imported
  3. Please run the "install.bat" file in the "ComfyUI\custom_nodes\comfyui_controlnet_aux" directory

With this plugin, it is easier to manage and add our preprocessors

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

With the preprocessor node, we drag the load image from the left side of the node

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

Pull out the preview image on the right, and our preprocessing is now complete. The effect after running corresponds to the 💥 button in our webui

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

2.ControlNet Model

Then we sort out the logic. After the image is processed by the canny preprocessor, we should send it to the canny model corresponding to the controlnet. So we load it as shown belowControlNetModel, remember to select the model corresponding to canny.

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

We see a node on the right side of the loaded controlnet model. Drag it out and select the controlnet application. Does this look familiar to you? It is very similar to the controlnet control strength in WebUI. The image node on the right receives the node after canny preprocessing.

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

We are looking at the conditions on the right. The ControlNet application will process the conditions and add the control information currently extracted by ControlNet. So we need to connect them to the output conditions of the "CLIP Text Encoder" node.

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

The output condition on the left is linked to the positive condition of the K sampler (positive prompt word)

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

The above connections complete the most basic Contnet workflow. The following is the complete workflow.

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

Multiple controlnet links

We just need to connect another "Controlnet application" in series after the "Controlnet application", and the rest should be connected to the Controlnet model or the Controlnet preprocessor.

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

Supplement: The controlnet application that comes with comfyui is relatively simple. If you want to use advanced Controlnet

We can install this extension in the manager

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow

After the installation is complete, we can use the more feature-rich controlnet application. Does this look more similar to the WebUI?

ComfyUI zero-based introductory tutorial, how to build a controlNet workflow
  1. Strength: This is what we use to control the weight.
  2. Start time: When we are drawing, when does Controlnet start controlling?
  3. End time: When we are drawing, when does Controlnet end control?

 

statement:The content is collected from various media platforms such as public websites. If the included content infringes on your rights, please contact us by email and we will deal with it as soon as possible.
TutorialEncyclopedia

No need for models, use Stable Diffusion to generate AI clothing model scene images at low cost

2024-7-13 12:48:26

Encyclopedia

AI article rewriting, use KIMI for intelligent copywriting polishing

2024-7-15 9:38:11

Search