CMK Flow · 01 START HERE · Create Image
The One Node That Sets the Rules for Everything After It
- PROCESS
- IMAGE
- MASK
- LOG
- LoRA SDXL
- LoRA ZIT
- PROCESS SDXL
- PROCESS ZIT
- IMAGE
- LOG
- VISUAL
- diagnostic
If you have loaded a CMK Flow reference workflow and wondered where you are actually supposed to type things, it is this node. The display name is the tell: CMK Flow · 01 START HERE · Create Image. Everything upstream of it is loaders. Everything downstream is numbered - 05 ControlNet, 10 KSampler, 15 InstantID, 20 Refiner - and this node is the switchboard that decides which of those numbered modules even exist in your run.
What it does
It builds the task: prompt, resolution, family, inpaint mode, the image canvas and its mask. Then it hands you back a PROCESS contract bound to a model family, plus the authoritative IMAGE and a structured LOG.
That "family-bound" part is the whole point and the part that confuses newcomers. The node does not have one PROCESS output. It has PROCESS SDXL (CMK_PROCESS_SDXL) and PROCESS ZIT (CMK_PROCESS_Z_IMAGE). These are different socket types on purpose. You cannot wire a Z-Image Turbo process into an SDXL sampler, because ComfyUI will refuse the link. The pack's own README calls this a contract against mis-wiring, and it reads as rigid right up until the moment it saves you from a silent 40-minute run that was never going to work.
model_family picks between SDXL, Z-Image Turbo, and Hybrid. Hybrid is the interesting one: SDXL builds the composition and Z-Image Turbo finishes it, with hybrid_sdxl_handoff deciding where the baton passes.
The inputs you actually touch
model_family- set this first. It drives which downstream modules light up and which PROCESS output is live.GLOBAL PROMPT POS/PROMPT NEG- the prompts for the entire flow, not one sampler. Downstream modules inherit them.resolution- defaults to1152x832, an SDXL-shaped list. Watch what happens to your aspect ratio when you switch families.INPAINT_MODE-Text2ImageorInpaint. Switching toInpaintrevealsIMAGE,MASK,FILENAMEand the whole masked workflow, plusprocess_modepresets:Custom,Replace Object,Remove Object,Extend Image.
On those presets, trust the author's own wording over your instinct: process_mode "selects a guided inpaint preset; it does not perform semantic object recognition." It is a bundle of sampler settings with good defaults, not a magic object-remover. Replace Object uses your prompt and keeps LoRAs; Remove Object bypasses all LoRAs and reconstructs from neutral background guidance; Extend Image builds an outpaint canvas with a Navier-Stokes fill and context reference.
There is also device (cpu/cuda/mps), which looks like a model-placement switch but is really about where the OpenCV mask fills run.
Outputs
You get PROCESS SDXL, PROCESS ZIT, IMAGE, LOG, VISUAL and an optional diagnostic. Route IMAGE, PROCESS and LOG together to the next module - the pack treats that trio as the handoff, and skipping the LOG wire means the Visualizer and summary nodes downstream have nothing to show you.
Installing the pack
ComfyUI Manager → search CMK Flow → install the entry from CMKFlow → restart. Or manually, with ComfyUI fully closed:
git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py
You want CMK dependency check: OK at the end. Model weights are deliberately not part of the Python package - run scripts/check_cmk_resources.py --models-root /your/shared/models afterwards to audit and optionally download them.
Common issues
Nodes render as grey LiteGraph boxes. CMK needs ComfyUI's Vue Nodes / Nodes 2.0 setting. Without it, the dynamic widget switching this node relies on - the whole INPAINT_MODE reveal - degrades. The pack prints a startup notice if the setting is off.
No MODEL input, so where does the model come from? Not here. MODEL travels on its own role wire from CMK Checkpoint VAE Loader -Pipe- and meets your PROCESS at the sampler module. This node never loads a checkpoint and never will.
Z-Image Turbo Inpaint. The README is blunt: it stays EXPERIMENTAL and frozen for now, because of memory and runtime cost. Use SDXL or Hybrid inpaint if you value your afternoon.
Inputs (33)
| Name | Type | Default | Description |
|---|---|---|---|
| GLOBAL PROMPT POSopt | STRING | Positive prompt for the complete Flow. | |
| PROMPT NEGopt | STRING | Negative prompt for the complete Flow. | |
| INPAINT_MODEopt | COMBO | Text2Image | Text2Image creates a new image. Inpaint uses IMAGE and MASK and reveals the task-specific inpaint settings. Z-Image Turbo Inpaint is experimental. HYBRID Inpaint runs the patched Inpaint stage only in SDXL and uses ZIT solely for the subsequent low-denoise finish. |
| resolutionopt | COMBO | 1152x832 | 20 options: 1024x1024, 1152x832, 832x1152, 1216x832, 832x1216, 1344x768, +14 |
| swap_dimensionsopt | BOOLEAN | false | — |
| upscale_methodopt | COMBO | lanczos | 4 options: lanczos, bicubic, bilinear, nearest |
| deviceopt | COMBO | cpu | 3 options: cpu, mps, cuda |
| PROCESSopt | CMK_PIPE | Optional incoming PROCESS from an upstream CMK Flow input module. Create Image preserves it and applies its authoritative image settings. | |
| IMAGEopt | IMAGE | Required only when INPAINT_MODE is enabled. | |
| MASKopt | MASK | Required for Inpaint except Extend Image. Extend Image generates the uncovered Fit-canvas mask and merges an optional input mask. | |
| FILENAMEopt | STRING | Required only when INPAINT_MODE is enabled; used by logging and project output. | |
| LOGopt | CMK_LOG_PIPE | Optional incoming LOG from an upstream CMK Flow input module. Create Image appends its image preparation block. | |
| LoRA SDXLopt | CMK_LORA_SDXL_PIPE | Optional complete SDXL LoRA bundle from 'LoRA Stack'. | |
| LoRA ZITopt | CMK_LORA_ZIT_PIPE | Optional complete Z-Image Turbo LoRA bundle from 'LoRA Stack'. | |
| outpaint_onopt | BOOLEAN | false | — |
| mask_fill_holesopt | BOOLEAN | false | — |
| fill_masked_areaopt | COMBO | neutral | 7 options: neutral, telea, navier-stokes, original, black, white, +1 |
| process_modeopt | COMBO | Custom | Selects a guided inpaint preset; it does not perform semantic object recognition. Custom keeps the Sampler Advanced values. Replace Object discards the masked content before sampling and uses spatial inpaint guidance with the normal SDXL prompt, noise fill, denoise 1.00, noise mask ON, context reference OFF and outpaint OFF; user prompt and LoRAs remain active. Remove Object uses noise fill and full-strength Fooocus inpaint guidance. An existing prompt directs the reconstruction; without one, neutral internal background guidance is used. All LoRAs are bypassed. Extend Image uses Fit to create its outpaint canvas and mask, Navier-Stokes fill, denoise 1.00, noise mask ON and context reference ON. Guided modes override fill_masked_area. |
| resize_modeopt | COMBO | Fit | Fit preserves the complete image and masks the uncovered canvas. Crop fills the target without distortion. Stretch changes the aspect ratio. |
| crop_positionopt | COMBO | Center | Anchors the image when Fit or Crop leaves an offset on one axis. |
| outpaint_overlapopt | INT | 320–256 | Grows an active Outpaint mask inward over the source image. This overlap gives diffusion enough context to remove hard canvas seams. |
| model_familyopt | COMBO | SDXL | SDXL exposes the complete current CMK workflow. Z-Image Turbo supports Text2Image and experimental masked Inpaint. HYBRID supports Text2Image or SDXL Inpaint followed by a ZIT finish. |
| instantid_enabledopt | BOOLEAN | false | SDXL Text2Image or Inpaint. Activates module 15 and makes module 10 use the InstantID layout preset. |
| instantid_modeopt | COMBO | HYBRID | Text2Image only. HYBRID lets module 10 establish the composition; ZERO-PASS lets module 15 create it directly and is intended for a single person only. For multiple people use HYBRID. Inpaint always uses the dedicated HYBRID INPAINT bridge. |
| inpaint_mask_expandopt | INT | 164–32 | Expands only the sampler's Inpaint region beyond the drawn mask edge to prevent VAE/latent boundary seams. |
| hybrid_sdxl_handoffopt | COMBO | 90% | HYBRID only. Stops SDXL at this sampling progress and hands its clean x0 prediction to ZIT. |
| hybrid_zit_denoiseopt | COMBO | 0.20 | HYBRID only. Low-strength ZIT finishing pass after the SDXL handoff. |
| unload_models_after_useopt | BOOLEAN | true | Releases generation, ControlNet and Refiner models at their last consumer. Saves memory; disabling can accelerate repeated runs. |
| HYBRID BALANCEopt | INT | 20–4 | HYBRID only. Five fixed SDXL-to-ZIT transition profiles; left preserves more SDXL, right gives ZIT more influence. |
| live_preview_zitopt | BOOLEAN | true | Enables latent live previews during Z-Image Turbo sampling. Enabled by default; SDXL live previews are unaffected. |
| content_guard_enabledopt | BOOLEAN | true | Baseline only. Enables ContentGuard checks in InstantID, FaceRebuild and FaceSwap image/video processing. Public release builds always enforce this setting as enabled. |
| controlnet_enabledopt | BOOLEAN | false | Activates module 05 from the central process control. When disabled, the validated ControlNet standby path passes PROCESS, IMAGE and LOG through unchanged. |
| instantid_handshake_strategyopt | COMBO | AUTO | Text2Image only. AUTO uses step 1 when ControlNet is actually applied and step 4 otherwise. EARLY always uses step 1; SAFE always uses step 4. Inpaint remains at step 10 and ZERO-PASS at step 0. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| PROCESS SDXL | CMK_PROCESS_SDXL | SDXL and HYBRID pre-pass. Continue to CMK Flow · 05 ControlNet (optional) or CMK Flow · 10 KSampler SDXL. |
| PROCESS ZIT | CMK_PROCESS_Z_IMAGE | ZIT and HYBRID finish. Continue to CMK Flow · 10 KSampler Z-Image Turbo. |
| IMAGE | IMAGE | Authoritative image; route it beside PROCESS and LOG to the next Flow module. |
| LOG | CMK_LOG_PIPE | Structured Flow log; route it beside PROCESS and IMAGE to the next Flow module. |
| VISUAL | CMK_VISUAL_PIPE | Inpaint preparation preview for the CMK Visualizer; empty in Text2Image mode. |
| diagnostic | CMK_DIAGNOSTIC | Optional diagnostic information for troubleshooting. |