Nodes/CMK Flow/CMK Flow · 05 ControlNet Combined
ComfyUI Node

CMK Flow · 05 ControlNet Combined

One ControlNet panel for SDXL and Z-Image Turbo at once

By CMKFlow·Created 3 months ago·Updated 2 days ago· 6
CMK Flow · 05 ControlNet Combined
  • PROCESS SDXL
  • PROCESS ZIT
  • IMAGE
  • LOG
  • VISUAL
  • REFERENCE IMAGE INPUT
  • PROCESS SDXL
  • PROCESS ZIT
  • IMAGE
  • LOG
  • VISUAL
  • diagnostic
  • CONTROLNET IMAGE
◄ENABLEfalse►
◄IMAGE SOURCEReference Image►
◄REFERENCE IMAGE▾►
◄APPLY MASKfalse►
◄STRENGTH1.00►
◄RESOLUTION768►
◄sdxl_controlnet_model▾►
◄sdxl_preprocessorLineArtPreprocessor►
◄sdxl_start_percent0►
◄sdxl_end_percent30►
◄sdxl_invert_hintfalse►
◄zit_low_threshold0.10►
◄zit_high_threshold0.32►
◄zit_model_patchZ-Image-Turbo-Fun-Controlnet-Union.safetensors►
◄REFERENCE IMAGE NAME—►

CMK Flow · 05 ControlNet Combined is what happens when a pack supports two architectures at once and refuses to make you configure ControlNet twice. It's one node, one image source, one strength - driving the SDXL branch and the Z-Image Turbo branch in parallel.

Why this exists

CMK's architecture keeps SDXL, Z-Image Turbo and HYBRID as technically separate generation paths with a shared, family-neutral post-processing zone after them. HYBRID composes on SDXL and hands off to Z-Image Turbo for the finish. That's clean, but it means two processes, two ControlNet stacks, and two chances to get the conditioning image inconsistent between them. The Combined module takes both process pipes in and routes the same conditioning setup to each, with per-family settings pushed into the advanced layer.

The two families don't share a ControlNet file, incidentally, and can't: Z-Image's ControlNet is Alibaba-PAI's Z-Image-Turbo-Fun-Controlnet-Union, a union model built against the 6B DiT, and SDXL unions are an entirely different architecture. The module expects both.

The inputs

Required, and mostly shared:

  • PROCESS SDXL and PROCESS ZIT - both pipes, both required even when one branch is idle.
  • IMAGE - the base image from the pipeline.
  • ENABLE - one switch for the whole module.
  • IMAGE SOURCE (Base Image / Reference Image, default Reference), REFERENCE IMAGE (dropdown of input files plus the pack's sample), APPLY MASK.
  • STRENGTH - default 1.0 here, not 1.5. Range 0–2.
  • RESOLUTION - default 768.

Then the advanced, namespaced per family: sdxl_controlnet_model, sdxl_preprocessor (same native-CV preprocessor list, default LineArtPreprocessor), sdxl_start_percent / sdxl_end_percent (0 → 30, the standard "guide the composition, then release"), sdxl_invert_hint, and on the Z-Image side zit_low_threshold (0.1), zit_high_threshold (0.32) and zit_model_patch (defaulting to Z-Image-Turbo-Fun-Controlnet-Union.safetensors, listed from models/model_patches).

zit_low_threshold and zit_high_threshold are the Canny thresholds for the Z-Image union's conditioning type - the ZIT prepare path pins its control type to canny, so those two numbers do real work and are the first thing to touch when the Z-Image side is too tight or too loose.

Outputs: PROCESS SDXL, PROCESS ZIT, IMAGE, LOG, VISUAL, diagnostic, and CONTROLNET IMAGE.

Two behaviours you'd otherwise trip over

Anti-distillation release. The Z-Image Turbo ControlNet was trained by a different Alibaba sub-team than Z-Image itself, on the Turbo model, and running a full-strength condition across every step partially breaks the distillation - that's a documented, measured complaint in the Z-Image ecosystem, and the workaround everyone converged on is to apply the ControlNet hard for the first few steps and then switch it off so the base refines. CMK's defaults (start at 0, end at 30%) are exactly that shape, and the module treats it as the norm rather than a hack.

Hybrid suppression. If the SDXL process carries the HYBRID marker, the combined prepare hands the Z-Image side an untouched bypass rather than an active ControlNet. ControlNet belongs to the SDXL composition phase in HYBRID mode; the ZIT finisher keeps its clean contract. That's the paired bypass gate's job, and it's why you can't get a ZIT ControlNet effect out of a HYBRID run.

It's an output node, so it previews the processed conditioning image in ComfyUI while it runs - with a transparent placeholder when disabled, so nothing stale sticks around.

Install

Manager: search CMK Flow, install the CMKFlow entry, restart. Manual, from the directory containing main.py:

git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py

Wait for CMK dependency check: OK; a manual clone never runs pip for you. The Z-Image control patch isn't in the Python package - the resource check knows the filename and can fetch it:

python3 custom_nodes/cmk_nodes/scripts/check_cmk_resources.py --models-root "/path/to/shared/models"

ComfyUI's Vue Nodes / Nodes 2.0 setting needs to be on: the per-mode widget switching (sdxl · / zit · prefixes, advanced toggles) doesn't render without it.

Issues worth knowing

Both process inputs are mandatory. Feed it only the SDXL pipe and it raises rather than limping along on half a module.

Note that the Z-Image model patch slot reads from model_patches, which is a core ComfyUI folder for patched-model files, not controlnet. If the dropdown is empty or shows only the default name, the file isn't installed - the name being present in the list doesn't mean the file is on disk.

And the SDXL preprocessors are CMK's own OpenCV approximations, not ControlNet Aux annotators: canny, tile, shuffle and none are literal, most of the rest fall back to a shared edge detector. Verify with CONTROLNET IMAGE before you blame the strength slider.

CategoryCMK/Flow/Process

Inputs (21)

NameTypeDefaultDescription
PROCESS SDXLCMK_PROCESS_SDXL—
PROCESS ZITCMK_PROCESS_Z_IMAGE—
IMAGEIMAGE—
ENABLEBOOLEANfalse—
IMAGE SOURCECOMBOReference Image2 options: Base Image, Reference Image
REFERENCE IMAGECOMBO2 options: CMK Package · controlnet_reference.png, example.png
APPLY MASKBOOLEANfalse—
STRENGTHFLOAT1.000–2—
RESOLUTIONINT76864–8192—
sdxl_controlnet_modelCOMBO1 options:
sdxl_preprocessorCOMBOLineArtPreprocessor18 options: LineArtPreprocessor, none, canny, lineart, lineart_coarse, lineart_realistic, +12
sdxl_start_percentFLOAT00–100—
sdxl_end_percentFLOAT300–100—
sdxl_invert_hintBOOLEANfalse—
zit_low_thresholdFLOAT0.100–1—
zit_high_thresholdFLOAT0.320–1—
zit_model_patchCOMBOZ-Image-Turbo-Fun-Controlnet-Union.safetensors1 options: Z-Image-Turbo-Fun-Controlnet-Union.safetensors
LOGoptCMK_LOG_PIPE—
VISUALoptCMK_VISUAL_PIPE—
REFERENCE IMAGE INPUToptIMAGE—
REFERENCE IMAGE NAMEoptSTRING—

Outputs (7)

NameTypeDescription
PROCESS SDXLCMK_PROCESS_SDXL—
PROCESS ZITCMK_PROCESS_Z_IMAGE—
IMAGEIMAGE—
LOGCMK_LOG_PIPE—
VISUALCMK_VISUAL_PIPE—
diagnosticCMK_DIAGNOSTIC—
CONTROLNET IMAGEIMAGE—