Nodes/ComfyUI_PromptStudio/Qwen Structure Guide (ControlNet)
ComfyUI Node

Qwen Structure Guide (ControlNet)

The ControlNet guide builder for Qwen 2.1

By tiko13·Created 3 months ago·Updated 12 days ago· 8
Qwen Structure Guide (ControlNet)
  • image
  • IMAGE
◄guide_type▾►
◄input_mode▾►
◄fit▾►
◄width1024►
◄height1024►
◄targeting►
◄emit_posefalse►

ControlNet's promise was always "the prompt says what, the map says where". Qwen Structure Guide (ControlNet) is the piece that turns a reference photo into that map - pose skeleton, depth, edges or sketch - and, more usefully, lets you crop the part of the reference you care about and drop its guide into a chosen region of your canvas.

It's the node behind Prompt Studio's References → Structure guide card, but it's a normal ComfyUI node in the Prompt Studio/References category and you can wire it by hand.

What it actually does

Four required widgets pick the job, two set the output canvas, and it hands you back a single IMAGE.

  • image - your reference photo (or an already-prepared map). Only the first frame and the first three channels are used.
  • guide_type - pose, depth, edges or sketch.
  • input_mode - photo means "run an extractor on this"; prepared means "this already is a map, just frame it".
  • fit - fit letterboxes the guide onto the target canvas centered, crop scales and center-crops it to fill.
  • width / height - the canvas the guide is built for; 1024×1024 default, 64 to 8192.
  • targeting (optional, STRING) - a JSON blob with reference and target rectangles in normalized 0–1 coordinates.

The extractors are the usual suspects and they're not bundled. pose runs DWPose (a person detector plus a pose estimator); depth runs Depth-Anything-V2-Small; sketch runs a line-art model. edges is the exception - it's ComfyUI's built-in Canny at 0.2/0.6 thresholds, so it needs nothing extra. If an extractor is missing, the node says so instead of producing a black frame: Install depth extraction in Settings > Setup, then restart ComfyUI.

Two details in the framing logic explain bugs you'd otherwise chase for an hour. Pose/depth/edges letterbox onto black, because they're bright-on-dark maps, while sketch letterboxes onto white, because sketch is dark lines on light paper. And when targeting has a target rectangle, the guide is built at the crop's size and then pasted into that region of the full canvas - so a wide pose pushed into a narrow region comes out small. Prompt Studio's own guide preview exists for exactly that check; use it.

Wiring it up

The output image is a ControlNet conditioning map, not a pretty picture. In Qwen 2.1 Fun ControlNet graphs it feeds the ControlNet node alongside the Qwen union MODEL_PATCH and VAE, and that node's MODEL output goes to the sampler. The union weights are ~7.55 GB and land as models/model_patches/QwenImage21/Qwen-Image-2.1-Fun-Controlnet-Union.safetensors.

The union era is a good thing and a slightly smaller thing, per the knowledge base: supply got solved - Qwen-Image, Z-Image and Flux 2 each got a union within about a week of release - while the menu of conditions shrank, so you get pose/depth/edges/sketch rather than the twelve-condition SDXL buffet. This node's four guide types are honestly the four people used anyway.

Install

Install the pack and restart ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/tiko13/ComfyUI_PromptStudio
# restart ComfyUI

Or install ComfyUI_PromptStudio via ComfyUI Manager. For this node specifically you also want the extractor pack and models:

  • comfyui_controlnet_aux (Fannovel16) - Prompt Studio's setup installs it through Manager when you select a pose/depth/sketch extractor. The node reads the pack's configured checkpoints directory, including installs outside the default custom_nodes path, and it writes nothing global to your environment.
  • The extractor weights land under that pack's ckpts folder: DWPose's yolox_l.onnx and dw-ll_ucoco_384.onnx, depth_anything_v2_vits.pth, and sk_model.pth / sk_model2.pth.
  • The Qwen union ControlNet weights, downloaded by the setup wizard with checksum verification.

Qwen 2.1 is under the Qwen Research License - research and evaluation only - so accept that before you build a commercial pipeline on it.

Where people get burned

Wrong input_mode. Running a pose extractor on an image that's already a skeleton gives you garbage, and running the depth extractor on a depth map gives you a depth-of-a-depth. prepared skips extraction entirely and just frames the map - that's the mode for a map you made elsewhere.

Pose on a non-pose photo. DWPose has to find a person. If it can't, the node raises No person was detected. Try a clearer full-body photo or a prepared pose guide. A landscape shot or a heavy crop of a torso is a common cause.

crop cutting off limbs. crop fills the canvas, which means it also throws away whatever doesn't fit. If your subject is being truncated, switch to fit and accept the letterbox.

Cropping away the context. Targeting a small region of a reference before extraction is great for "just this jacket", but pose and depth extraction get worse with less scene to work from. Crop for framing; don't crop to sharpen a skeleton.

CategoryPrompt Studio/References

Inputs (8)

NameTypeDefaultDescription
imageIMAGE—
guide_typeCOMBO4 options: pose, depth, edges, sketch
input_modeCOMBO2 options: photo, prepared
fitCOMBO2 options: fit, crop
widthINT102464–8192—
heightINT102464–8192—
targetingoptSTRING—
emit_poseoptBOOLEANfalse—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—