Nodes/CMK Flow/CMK Flow · 01 START HERE · Create Image
ComfyUI Node

CMK Flow · 01 START HERE · Create Image

The One Node That Sets the Rules for Everything After It

By CMKFlow·Created 3 months ago·Updated 2 days ago· 6
CMK Flow · 01 START HERE · Create Image
  • PROCESS
  • IMAGE
  • MASK
  • LOG
  • LoRA SDXL
  • LoRA ZIT
  • PROCESS SDXL
  • PROCESS ZIT
  • IMAGE
  • LOG
  • VISUAL
  • diagnostic
◄GLOBAL PROMPT POS►
◄PROMPT NEG►
◄INPAINT_MODEText2Image►
◄resolution1152x832►
◄swap_dimensionsfalse►
◄upscale_methodlanczos►
◄devicecpu►
◄FILENAME►
◄outpaint_onfalse►
◄mask_fill_holesfalse►
◄fill_masked_areaneutral►
◄process_modeCustom►
◄resize_modeFit►
◄crop_positionCenter►
◄outpaint_overlap32►
◄model_familySDXL►
◄instantid_enabledfalse►
◄instantid_modeHYBRID►
◄inpaint_mask_expand16►
◄hybrid_sdxl_handoff90%►
◄hybrid_zit_denoise0.20►
◄unload_models_after_usetrue►
◄HYBRID BALANCE2►
◄live_preview_zittrue►
◄content_guard_enabledtrue►
◄controlnet_enabledfalse►
◄instantid_handshake_strategyAUTO►

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 to 1152x832, an SDXL-shaped list. Watch what happens to your aspect ratio when you switch families.
  • INPAINT_MODE - Text2Image or Inpaint. Switching to Inpaint reveals IMAGE, MASK, FILENAME and the whole masked workflow, plus process_mode presets: 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.

CategoryCMK/Flow/Input

Inputs (33)

NameTypeDefaultDescription
GLOBAL PROMPT POSoptSTRINGPositive prompt for the complete Flow.
PROMPT NEGoptSTRINGNegative prompt for the complete Flow.
INPAINT_MODEoptCOMBOText2ImageText2Image 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.
resolutionoptCOMBO1152x83220 options: 1024x1024, 1152x832, 832x1152, 1216x832, 832x1216, 1344x768, +14
swap_dimensionsoptBOOLEANfalse—
upscale_methodoptCOMBOlanczos4 options: lanczos, bicubic, bilinear, nearest
deviceoptCOMBOcpu3 options: cpu, mps, cuda
PROCESSoptCMK_PIPEOptional incoming PROCESS from an upstream CMK Flow input module. Create Image preserves it and applies its authoritative image settings.
IMAGEoptIMAGERequired only when INPAINT_MODE is enabled.
MASKoptMASKRequired for Inpaint except Extend Image. Extend Image generates the uncovered Fit-canvas mask and merges an optional input mask.
FILENAMEoptSTRINGRequired only when INPAINT_MODE is enabled; used by logging and project output.
LOGoptCMK_LOG_PIPEOptional incoming LOG from an upstream CMK Flow input module. Create Image appends its image preparation block.
LoRA SDXLoptCMK_LORA_SDXL_PIPEOptional complete SDXL LoRA bundle from 'LoRA Stack'.
LoRA ZIToptCMK_LORA_ZIT_PIPEOptional complete Z-Image Turbo LoRA bundle from 'LoRA Stack'.
outpaint_onoptBOOLEANfalse—
mask_fill_holesoptBOOLEANfalse—
fill_masked_areaoptCOMBOneutral7 options: neutral, telea, navier-stokes, original, black, white, +1
process_modeoptCOMBOCustomSelects 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_modeoptCOMBOFitFit preserves the complete image and masks the uncovered canvas. Crop fills the target without distortion. Stretch changes the aspect ratio.
crop_positionoptCOMBOCenterAnchors the image when Fit or Crop leaves an offset on one axis.
outpaint_overlapoptINT320–256Grows an active Outpaint mask inward over the source image. This overlap gives diffusion enough context to remove hard canvas seams.
model_familyoptCOMBOSDXLSDXL 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_enabledoptBOOLEANfalseSDXL Text2Image or Inpaint. Activates module 15 and makes module 10 use the InstantID layout preset.
instantid_modeoptCOMBOHYBRIDText2Image 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_expandoptINT164–32Expands only the sampler's Inpaint region beyond the drawn mask edge to prevent VAE/latent boundary seams.
hybrid_sdxl_handoffoptCOMBO90%HYBRID only. Stops SDXL at this sampling progress and hands its clean x0 prediction to ZIT.
hybrid_zit_denoiseoptCOMBO0.20HYBRID only. Low-strength ZIT finishing pass after the SDXL handoff.
unload_models_after_useoptBOOLEANtrueReleases generation, ControlNet and Refiner models at their last consumer. Saves memory; disabling can accelerate repeated runs.
HYBRID BALANCEoptINT20–4HYBRID only. Five fixed SDXL-to-ZIT transition profiles; left preserves more SDXL, right gives ZIT more influence.
live_preview_zitoptBOOLEANtrueEnables latent live previews during Z-Image Turbo sampling. Enabled by default; SDXL live previews are unaffected.
content_guard_enabledoptBOOLEANtrueBaseline only. Enables ContentGuard checks in InstantID, FaceRebuild and FaceSwap image/video processing. Public release builds always enforce this setting as enabled.
controlnet_enabledoptBOOLEANfalseActivates module 05 from the central process control. When disabled, the validated ControlNet standby path passes PROCESS, IMAGE and LOG through unchanged.
instantid_handshake_strategyoptCOMBOAUTOText2Image 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)

NameTypeDescription
PROCESS SDXLCMK_PROCESS_SDXLSDXL and HYBRID pre-pass. Continue to CMK Flow · 05 ControlNet (optional) or CMK Flow · 10 KSampler SDXL.
PROCESS ZITCMK_PROCESS_Z_IMAGEZIT and HYBRID finish. Continue to CMK Flow · 10 KSampler Z-Image Turbo.
IMAGEIMAGEAuthoritative image; route it beside PROCESS and LOG to the next Flow module.
LOGCMK_LOG_PIPEStructured Flow log; route it beside PROCESS and IMAGE to the next Flow module.
VISUALCMK_VISUAL_PIPEInpaint preparation preview for the CMK Visualizer; empty in Text2Image mode.
diagnosticCMK_DIAGNOSTICOptional diagnostic information for troubleshooting.