Nodes/ComfyUI-Qwen-Image-Integrated-KSampler/🐋 千问ControlNet集成加载器——Github:@luguoli
ComfyUI Node

🐋 千问ControlNet集成加载器——Github:@luguoli

The node that gives Qwen-Image and Z-Image a backbone (pose, depth, canny, repaint)

By luguoli·Created 9 months ago·Updated 8 months ago· 243
🐋 千问ControlNet集成加载器——Github:@luguoli
  • image
  • mask
  • controlnet_data
  • ControlNet 数据/ControlNet Data
control_net_name
control_typeauto
strength2.00
start_percent0.000
end_percent0.500

The Qwen Image Integrated KSampler from luguoli's pack is the crowd-pleaser, but it's not self-sufficient - it can't make a condition map, it can only apply one. This node is the other half of the pair: it's the loader you add when a prompt alone won't hold a pose, respect a depth map, or keep an edge. Feed it a control image, pick a ControlNet file and a control type, and it hands the sampler a tidy CONTROL_NET_DATA packet that does the spatial steering.

Why you'd bother: Qwen-Image and Z-Image both got proper union ControlNets within weeks of release (InstantX's Qwen union covers canny, soft edge, depth and pose; Alibaba PAI's Fun unions cover the Z-Image family). A union checkpoint is one file that handles every condition, with the mode chosen at inference - which is exactly what this loader's control_type dropdown is for. So the honest workflow is: preprocess your map (depth, pose skeleton, canny edges), drop it in here, and wire the output into the sampler's controlnet_data input. Two or three nodes instead of a wall of wires, which is precisely how the community recommends the pack.

How it works

The loader does two things. First it loads whatever checkpoint you pick from ComfyUI's models/controlnet folder via the control_net_name dropdown. Then it looks up your control_type against ComfyUI's built-in union type table and stamps that type number onto the loaded model - auto just means "don't force one, let the model use its own default."

The output is a data packet bundling the model, the control image, an optional mask, and your strength and step-window settings. Chaining is the neat trick: the optional controlnet_data input accepts a previous loader's output and appends to the list, so you can stack pose and depth by stringing two loaders together. The sampler then walks the list and applies each packet to both the positive and negative conditioning via set_cond_hint. For repaint in image-to-image mode it even scales the control image and mask to match your target resolution and inverts the mask for the concat - that's your local redraw path.

The inputs that matter

Most of these you set once and forget:

  • control_net_name - the dropdown of .safetensors in models/controlnet. Use the union checkpoint for your architecture; SD-era files won't load on a DiT model, and nothing in the node will stop you from trying.
  • control_type - auto, openpose, depth, hed/pidi/scribble/ted, canny/lineart/anime_lineart/mlsd, normal, segment, tile, repaint.
  • strength - watch this one. The default is 2.0, which is hotter than what the union cards ask for (InstantX recommends 0.8–1.0). Start at 1.0 and work up.
  • start_percent / end_percent - the window over sampling steps the control is active. Default end_percent is 0.5, so control fades out halfway through; great for letting the tail of sampling refine freely, but if your pose isn't sticking, nudge it toward 1.0.
  • mask - required for repaint, ignored otherwise.

The single output, ControlNet Data, goes into the sampler's controlnet_data input. That's the whole loop.

Install

Same pack as the sampler, so install once:

cd ComfyUI/custom_nodes
git clone https://github.com/luguoli/ComfyUI-Qwen-Image-Integrated-KSampler.git
pip install -r requirements.txt

Restart ComfyUI. Or skip all that: ComfyUI Manager → search "ComfyUI-Qwen-Image-Integrated-KSampler" → Install. There's also a Gitee mirror if you're in China. The repo's requirements are unremarkable - torch, numpy, transformers, einops, psutil - nothing you won't already have, and it ships no model files. The ControlNet checkpoint is your download, not theirs.

Gotchas

Beyond the strength default, the things that bite: repaint without a mask throws an error by design; passing no control image with a non-zero strength also throws. And remember the sampler only applies a packet whose strength is above zero - a zeroed-out loader is a silent no-op, which is confusing for exactly one minute before you remember it.

Categoryconditioning/controlnet

Inputs (8)

NameTypeDefaultDescription
imageIMAGE🖼️ 控制图像 - ControlNet 控制图像输入
control_net_nameCOMBO🔧 ControlNet 模型 - 选择要使用的 ControlNet 模型
control_typeCOMBOauto🎨 控制类型 - ControlNet 的具体控制类型,如姿态、 边缘检测、深度等
strengthFLOAT2.000–10💪 控制强度 - ControlNet 对生成结果的影响强度
start_percentFLOAT0.0000–1🏁 控制步数开始百分比 - ControlNet 效果开始应用的步数百分比
end_percentFLOAT0.5000–1🎯 控制步数结束百分比 - ControlNet 效果结束应用的步数百分比
maskoptMASK🎭 遮罩(可选) - Inpainting 遮罩,用于 ControlNet 区域控制
controlnet_dataoptCONTROL_NET_DATA🌿 ControlNet 数据(可选) - 输入 ControlNet 集成加载器输出的数据包,直接应用 ControlNet 控制

Outputs (1)

NameTypeDescription
ControlNet 数据/ControlNet DataCONTROL_NET_DATA