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

CMK Flow · 05 ControlNet SDXL

SDXL ControlNet as one guided step

By CMKFlow·Created 3 months ago·Updated 2 days ago· 6
CMK Flow · 05 ControlNet SDXL
  • PROCESS
  • IMAGE
  • LOG
  • VISUAL
  • REFERENCE IMAGE INPUT
  • PROCESS
  • IMAGE
  • LOG
  • VISUAL
  • diagnostic
  • CONTROLNET IMAGE
◄ENABLEfalse►
◄CONTROLNET MODEL▾►
◄IMAGE SOURCEReference Image►
◄REFERENCE IMAGE▾►
◄APPLY MASKfalse►
◄PREPROCESSORLineArtPreprocessor►
◄STRENGTH1.50►
◄resolution768►
◄controlnet_start_percent0►
◄controlnet_end_percent30►
◄invert_hintfalse►
◄REFERENCE IMAGE NAME—►

CMK Flow · 05 ControlNet SDXL is the pack's ControlNet module - the same job as the toolbox node, but wired into the guided pipeline so the settings travel with the process pipe instead of living on loose sockets. If you're running CMK's reference workflows, this is the node you'll actually be poking at.

Where it sits

In CMK Flow the pipeline runs 01 START HERE → 02 Regional Conditioning → 05 ControlNet → 10 KSampler → 15 InstantID → 20 Refiner, then a PostProcess boundary. Module 05 is optional and it sits exactly where ControlNet belongs: after the model is loaded, before the sampler, feeding structure while the composition is still forming. It takes a CMK_PROCESS_SDXL and an IMAGE and gives both back with the ControlNet state attached - plus a preview image so you can see the conditioning map you just built.

The inputs that matter

  • ENABLE - the module switch. Off means no model load, no preprocessing, no ControlNet on the sampler.
  • CONTROLNET MODEL - from models/controlnet.
  • IMAGE SOURCE - Base Image (use the image coming down the pipe) or Reference Image (default). Reference mode is the usual case: you feed a pose or a lineart source that is not the image you're generating from.
  • REFERENCE IMAGE - a dropdown of image files in ComfyUI's input directory, with the pack's own CMK Package · controlnet_reference.png offered first so a fresh install has something that works.
  • PREPROCESSOR - same 18-entry list as the toolbox node, defaulting to LineArtPreprocessor, and the same caveat applies: these are CMK's native OpenCV approximations, not ControlNet Aux annotator models. canny, tile, shuffle and none do what they say; the rest resolve to shared edge-map fallbacks.
  • STRENGTH - ControlNet weight, default 1.5, range 0–2. That's higher than the SD-era 1.0 habit and it's a deliberate CMK default; pull it toward 0.7–1.0 if the conditioning is fighting your prompt.
  • controlnet_start_percent / controlnet_end_percent - defaults 0 and 30, i.e. ControlNet guides the early composition and gets out of the way before the model spends its detail budget. This is the parameter that matters most in practice, and the community advice has been the same since 2023: hold the condition through composition, then release it.
  • invert_hint, APPLY MASK and resolution are the advanced knobs. resolution is passed to the preprocessor slot but CMK's native preprocessors ignore it.

If you'd rather wire an image than name a file, REFERENCE IMAGE INPUT overrides the dropdown, and REFERENCE IMAGE NAME lets you label it in the logs.

Outputs: PROCESS, IMAGE, LOG, VISUAL, diagnostic, and CONTROLNET IMAGE - the processed conditioning map, which is the one worth wiring into a preview so you can confirm the preprocessor did what you expected.

One design detail worth knowing

In the pipeline, the ControlNet checkpoint is not loaded here. The prepare step is called with model loading deferred to the sampler module - the code says it plainly: the model is loaded in module 10 immediately before it's applied, "so no upstream PROCESS/cache can retain it after sampling." That's a memory decision, and it's why you can't grab a CONTROL_NET socket and wire it somewhere else. If you want the loaded model in hand, use the toolbox node.

There's also a special path for InstantID's REFERENCE-LATENT mode: the original RGB source is forwarded untouched, ControlNet load and preprocessing are skipped, and the log says so. Inpaint mode deliberately does not take that shortcut, because it still needs the real ControlNet against a decoded, re-encoded latent.

Install

Manager: search CMK Flow → install the CMKFlow entry → restart. Manual, from the folder with 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

CMK dependency check: OK is the finish line, and it's the step people skip after a manual clone - git clone alone never runs pip. Model weights are separate; the resource check will audit and, if you say yes, download the ControlNet files the shipped workflows expect:

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

Enable Vue Nodes / Nodes 2.0 in ComfyUI settings - CMK's mode-dependent widget hiding needs it.

Issues worth knowing

If ENABLE is off but you're still seeing a ControlNet preview, that's the reference image being shown, not a processed map - the module deliberately previews the reference when it's disabled so you can see what you're pointing at.

The commonest real complaint is "ControlNet isn't doing anything" when the strength is right and the preprocessor wasn't. Look at CONTROLNET IMAGE first. If it's an edge map and you asked for depth, you've hit the native-preprocessor limitation, not a bug.

CMK Flow is a one-person GPL-3.0 project (Carsten Kirschner), open-sourced in July 2026 with a handful of Reddit posts and not much else - the author's stated goal was that it runs on a clean ComfyUI without a chain of other node packs. That's true, and it's the reason the preprocessors are homegrown.

CategoryCMK/Flow/Process

Inputs (17)

NameTypeDefaultDescription
PROCESSCMK_PROCESS_SDXL—
IMAGEIMAGE—
ENABLEBOOLEANfalse—
CONTROLNET MODELCOMBO1 options:
IMAGE SOURCECOMBOReference Image2 options: Base Image, Reference Image
REFERENCE IMAGECOMBO2 options: CMK Package · controlnet_reference.png, example.png
APPLY MASKBOOLEANfalse—
PREPROCESSORCOMBOLineArtPreprocessor18 options: LineArtPreprocessor, none, canny, lineart, lineart_coarse, lineart_realistic, +12
STRENGTHFLOAT1.500–2—
resolutionINT76864–8192—
controlnet_start_percentFLOAT00–100ControlNet start point in percent (0–100).
controlnet_end_percentFLOAT300–100ControlNet end point in percent (0–100).
invert_hintBOOLEANfalse—
LOGoptCMK_LOG_PIPE—
VISUALoptCMK_VISUAL_PIPE—
REFERENCE IMAGE INPUToptIMAGE—
REFERENCE IMAGE NAMEoptSTRING—

Outputs (6)

NameTypeDescription
PROCESSCMK_PROCESS_SDXL—
IMAGEIMAGE—
LOGCMK_LOG_PIPE—
VISUALCMK_VISUAL_PIPE—
diagnosticCMK_DIAGNOSTIC—
CONTROLNET IMAGEIMAGE—