Current location: Home> ComfyUI Tutorial> Guide to Using Canny ControlNet SD1.5 in ComfyUI

Guide to Using Canny ControlNet SD1.5 in ComfyUI

Author: LoRA Time: 27 Mar 2025

Canny ControlNet is the most commonly used ControlNet model. It uses the Canny edge detection algorithm to extract edge information in the image, and then uses this edge information to guide the AI to generate the image.

Canny ControlNet Key Features

Keep structure: Be able to maintain the basic structure and outline of the original image well

Strong flexibility: The intensity of guidance can be controlled by adjusting the parameters of edge detection

Wide scope of application: suitable for various scenarios such as sketching, line drawing, architectural design, etc.

Stable effect: Canny's guidance effect is more stable and predictable than other ControlNet models

1. How to use the Canny ControlNet SD1.5 model in ComfyUI

1. Update ComfyUI and install the necessary models

Since some nodes use new ComfyUI nodes, you need to update ComfyUI to the latest version first

Update ComfyUI Please refer to the ComfyUI update tutorial

First, the following model needs to be installed:

Model TypeModel FileDownload address
SD1.5 Basic Modeldreamshaper_8.safetensorsCivitai
Canny ControlNet Modelcontrol_v11p_sd15_canny.pthHugging Face
VAE model (optional)vae-ft-mse-840000-ema-pruned.safetensorsHugging Face

2. Model storage location

Please place the model file in the following structure:

image.png

3. SD1.5 Canny ControlNet workflow file download

SD1.5 Canny ControlNet Workflow

Save the image below to locally, select load this image in the LoadImage node after loading the workflow SD1.5 Canny ControlNet Workflow

SD1.5 Canny ControlNet Workflow

2. Workflow description

This workflow mainly contains the following parts:

1. Model loading part: Loading the SD model, VAE model and ControlNet model

2. Prompt word coding part: deal with positive and negative prompt words

3. Image processing part: including image loading and Canny edge detection

4.ControlNet control section: Apply edge information to the generation process

5.Sampling and Saving Parts: Generate the final image and save it

Key node description

1.LoadImage: Used to load input images

2.Canny: There are two important parameters for edge detection:

low_threshold: low threshold, controls the sensitivity of edge detection

high_threshold: high threshold, controls edge continuity

3.ControlNetLoader: Load the ControlNet model

4.ControlNetApplyAdvanced: Controls the application method of ControlNet, including the following important parameters:

strength: Control strength

start_percent: The point of time that starts to affect

end_percent: The point of time when the end effect is

3. Use steps

1. Import the workflow

Download the workflow file for this tutorial

Click "Load" in ComfyUI, or directly drag the downloaded JSON file into ComfyUI

2. Prepare to enter pictures

Prepare a picture you want to process

LoadImage node to load images

3. Adjust Canny parameters

low_threshold Recommended range: 0.2-0.5

High_threshold Recommended range: 0.5-0.8

The edge detection effect can be previewed in real time through the PreviewImage node

4. Set the generation parameters

In the KSampler node:

Steps: 20-30 recommended

cfg: Recommended 7-8

sampler_name: It is recommended to use "dpmpp_2m"

scheduler: "karras" is recommended

5. Adjust ControlNet strength

strength: 1.0 means to follow edge information completely

The strength value can be reduced as needed to reduce the control

4. Usage tips and suggestions

1. Adjust edge detection parameters

If there are too many edges: Increase threshold value

If the edges are too few: reduce the threshold value

It is recommended to preview the effect first through PreviewImage

2. Prompt word writing

Positive prompt words should describe the style and details you want in detail

Negative prompt words to contain elements you want to avoid

The prompt word should be related to the content of the original image

3. Frequently Asked Questions

If the generated image is too blurry: Increase the cfg value

If edge following is not enough: Increase the strength value

If the details are not enough: Increase the steps value

V. Practical Examples

The following are some common usage scenarios and corresponding parameter settings:

1. Color line drawing

low_threshold: 0.2

high_threshold: 0.5

strength: 1.0

steps: 25

2. Structural repainting

low_threshold: 0.4

high_threshold: 0.7

strength: 0.8

steps: 30