PromptZone - AI Prompts, Guides and Tools for Builders

Cover image for Qwen-Image ComfyUI Guide to Canny and Depth Layout Control
Wiebke Chakraborty
Wiebke Chakraborty

Posted on Edited on

Qwen-Image ComfyUI Guide to Canny and Depth Layout Control

Qwen-Image is Alibaba Qwen's text-to-image model with a 20-billion-parameter diffusion transformer and downloadable Apache 2.0 weights. ComfyUI supports it natively and documents additional DiffSynth model patches for Canny, depth, and inpainting control. To guide composition from a reference, load the matching native patch workflow, install its patch, and supply the required edge or depth input. Qwen model card ComfyUI documentation

What are the key facts about Qwen-Image controls in ComfyUI?

Field Verified information
Developer Alibaba's Qwen team develops Qwen-Image; ComfyUI documents its native integration and DiffSynth patch workflows. ComfyUI documentation
Released Original Qwen-Image weights: August 4, 2025; native ComfyUI support is recorded on August 5. Qwen repository
Type Text-to-image diffusion with optional structural conditioning through model patches. ComfyUI documentation
Size or parameters Base image transformer: 20 billion; a patch parameter total is not published in the cited workflow guide. ComfyUI documentation
License and access Qwen-Image is Apache 2.0; ComfyUI links separate base-component and patch downloads. Model card ComfyUI documentation
Where it runs Local ComfyUI; the documentation also links a Comfy Cloud patch-workflow template. ComfyUI documentation

Use the sibling Qwen-Image ComfyUI setup guide to establish ordinary text-to-image generation first. Here, the objective is different: keep an image's useful structural information while exploring a new visual description.

What can Canny and depth control in Qwen-Image?

The official guide identifies Canny as a control input for processed edges and line contours. Depth uses a preprocessed depth map representing spatial relationships, while inpainting uses a mask to identify areas to repaint. These are different conditioning inputs, so choose the workflow according to what you want the reference to contribute. ComfyUI documentation

For a first Canny experiment, consider a simple still life with a bottle and a box. Write down the outlines and positions you want to retain, then propose a different material or lighting treatment in the prompt. This gives you something specific to review: whether the composition remains useful while the generated appearance changes.

Use a depth experiment when your review concerns foreground and background arrangement. For example, define whether a chair should remain in front of a window and whether the background should still read as distant. These are suggested evaluation tasks, not claims that a control input guarantees geometric fidelity.

Qwen-Image's documented range of visual styles makes it reasonable to compare several treatments of the same structural reference. Keep the reference and generation settings fixed while changing only the visual description. That procedure helps you see what the prompt changes within the chosen control setup. Model card

What are the limits of Qwen-Image model patches?

Control inputs require the appropriate preprocessing. ComfyUI explicitly distinguishes edge images, depth maps, and inpainting masks; an arbitrary reference image does not automatically supply all three. The model patch must match the type of condition connected to it. ComfyUI documentation

The patch workflow also depends on the ordinary Qwen-Image components. Its installation instructions reuse the base diffusion model, text encoder, and VAE. Adding a patch does not remove those dependencies or establish a lower memory requirement. ComfyUI documentation

Measure the entire patch workflow, including preprocessing and generation. ComfyUI publishes timing examples for its text-to-image configurations separately from the patch instructions; those figures do not measure your controlled graph. ComfyUI documentation

Keep model-patch controls and instruction-based editing conceptually separate. This article follows ComfyUI's structural-control workflow for the original generator. For changes directed by an image and an instruction, see the Qwen-Image-Edit guide and its separate model card. Editing model card

How do you use Qwen-Image Canny and depth patches in ComfyUI?

Update ComfyUI, then open the official Qwen-Image documentation and load its DiffSynth model-patch workflow. The guide provides a template and explains that missing core nodes can indicate an outdated installation or a startup import failure. Start from that graph so the required connections are visible. ComfyUI documentation

Download the base components from Comfy-Org's linked distribution. The documented filenames are qwen_image_fp8_e4m3fn.safetensors, qwen_2.5_vl_7b_fp8_scaled.safetensors, and qwen_image_vae.safetensors. Put them in models/diffusion_models, models/text_encoders, and models/vae respectively. ComfyUI documentation Base distribution

For the Canny path, download the corresponding patch into models/model_patches. With the Hugging Face CLI installed, run this command from your ComfyUI directory; the path after --local-dir is relative to that directory. Patch distribution Canny patch file CLI documentation

hf download Comfy-Org/Qwen-Image-DiffSynth-ControlNets \
  split_files/model_patches/qwen_image_canny_diffsynth_controlnet.safetensors \
  --local-dir ./qwen-patch-download
mkdir -p models/model_patches
cp ./qwen-patch-download/split_files/model_patches/qwen_image_canny_diffsynth_controlnet.safetensors \
  models/model_patches/
Enter fullscreen mode Exit fullscreen mode

In the graph, confirm the base model, text encoder, VAE, and Canny patch selections. Upload your reference through the image input. The official Canny workflow includes a native Canny preprocessing node; inspect its output before submitting the complete generation. ComfyUI documentation

Write a prompt describing the desired subject, materials, and lighting. Run the workflow and compare the output with your reference at the same display size. Judge the chosen outlines first, then the requested appearance, so an appealing style does not conceal a composition failure.

The QwenImageDiffsynthControlnet node exposes a strength setting for line control. Change that setting deliberately and save the graph with each result. Avoid changing strength, prompt, seed, and reference together if you want to understand which change helped. ComfyUI documentation

For depth control, switch to the documented depth patch and supply a preprocessed depth map, following the guide's corresponding connections. Do not merely rename the Canny file or feed the edge map into the depth path. Inspect the condition itself before evaluating the generated image. ComfyUI documentation

How does controlled Qwen-Image compare with text-only workflows?

Within Qwen-Image, a plain text-to-image graph uses your description as its input, while the documented patch graph adds structural conditioning. HiDream-I1 is another real text-to-image option with a native ComfyUI workflow, but its standard example has its own loaders and sampling configuration. These are distinct graphs that should be evaluated on their documented inputs. Qwen guide HiDream guide

The ComfyUI pillar explains graph organization. For this comparison, the useful question is whether reference structure improves your result enough to justify the extra preparation and controls.

What should you check before using Qwen-Image model patches?

Do I need a custom Qwen-Image extension?

The Qwen-Image generation and DiffSynth patch workflows covered here use native ComfyUI support. Update ComfyUI and inspect startup errors if a required core node is missing. ComfyUI documentation

Should I choose Canny or depth for Qwen-Image?

Use the Qwen-Image Canny patch to condition generation on processed edges and contours. Use the depth patch with a preprocessed depth map when you want spatial depth information to guide the result. ComfyUI documentation

Where do Qwen-Image DiffSynth patch files go?

Place Qwen-Image DiffSynth patch files in ComfyUI/models/model_patches. Keep the base diffusion model, text encoder, and VAE in their separate documented directories. ComfyUI documentation

Does a Qwen-Image reference guarantee an unchanged composition?

A reference in the Qwen-Image patch workflow supplies conditioning that you still need to evaluate in the generated image. Save the QwenImageDiffsynthControlnet strength setting and inspect the outlines or depth relationships your task requires. ComfyUI documentation

Sources

Top comments (0)