CMK Pipe Set Detailer
Detailer settings that don't wreck your first pass
- pipe
- model
- clip
- conditioning_pos
- conditioning_neg
- sam_model
- pipe
A detailer is a second, smaller generation: find the region, crop it, upscale the crop, re-render it with its own prompt and denoise, paste it back. That means it needs its own sampler settings - a different prompt, a different step count, a different CFG than your main pass. This node is where those settings live on the CMK pipe.
Ten required inputs, one optional, one output. pipe plus model, clip, conditioning_pos, conditioning_neg, detailer_enable, steps, cfg, sampler, scheduler, and optionally sam_model (a SAM_MODEL for mask refinement). Out comes the same CMK_PIPE.
The detail that makes it interesting
Every value is written under a module-scoped key - detailer_model, detailer_clip, detailer_conditioning_pos, detailer_conditioning_neg, boolean_detailer_enable, detailer_steps, detailer_cfg, detailer_sampler, detailer_scheduler, detailer_sam_model. Note what is not overwritten: the generic model, clip, conditioning_*, steps, cfg, sampler, scheduler keys already in the pipe stay exactly as they were.
That's deliberate, and the source says why in a comment: changing a downstream module must not invalidate the first-pass context. This is the caching problem every bundle-style pack has to solve. If you write detailer settings over the main sampler keys, then every time you nudge a detailer step count you've made the whole upstream first pass look dirty, and you pay for a full re-generation to change a face pass. Namespacing the keys keeps the expensive stage cacheable while you iterate on the cheap one.
So: change the detailer's cfg freely, your 1024px first pass won't re-run. Change the main 10 KSampler module's cfg and everything downstream re-runs, correctly.
detailer_enable is the switch the pack's UI uses to skip the stage without rewiring - a disabled detailer stays a real pass-through rather than a missing branch, which is why the flag travels in the pipe instead of being a bypassed node.
The optional sam_model is where you'd hook a SAM model to refine the detector's rough boxes into tighter, seam-friendlier masks. Worth knowing the trade from the wider detailing world: segmentation-style masks hug the subject and mostly hide the seam, boxes don't. If the pasted-back patch shows a visible rectangle, the mask is the first suspect, not the denoise.
Same node, older name
The pack still ships CMKPipeSetSampler2 as a legacy alias with byte-identical inputs, present only so workflows saved against older CMK versions still load. If you find a tutorial using it: same node, new name. Use this one.
Installing the pack
Manager → search CMK Flow → install the CMKFlow entry → restart.
git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py
Expect CMK dependency check: OK. That installer is the one that matters on Desktop installs, where ComfyUI may be running a bundled standalone-env Python rather than the one your shell finds. It installs requirements.txt into whichever interpreter ComfyUI really uses and then verifies the imports.
Detailer territory is where the heavy Python deps actually land: ultralytics for the YOLO detectors, segment-anything for SAM, opencv-python, onnxruntime. None of them are optional if you want the detector dropdowns to populate - and the pack's import graph is not defensive, so a failed insightface build can take the whole node set down with it, not just the face nodes.
Models are separate, as always: run the resource check to see what the bundled workflows need and let it fetch what's missing.
python3 custom_nodes/cmk_nodes/scripts/check_cmk_resources.py --models-root "/path/to/ComfyUI-shared"
Requirements for the UI: Vue Nodes / Nodes 2.0 must be enabled, and for live previews during sampler and refiner runs, set ComfyUI's Execution → Live preview method to auto. This node is CMK/Developer/ - internal infrastructure, absent from the Flow Browser catalogue.
The one honest warning
A detector will sometimes decide a rock is a face. Detailer modules get blamed for artefacts that came from the mask, so when the output looks wrong, preview the SEGS before you start tuning the denoise. And keep in mind the bundle caveat: the pipe now carries detailer settings that aren't visible on the canvas. If the detailer is behaving like it's using settings you replaced, check which CMK Pipe Set Detailer actually sits on the wire feeding it.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | CMK_PIPE | — | |
| model | MODEL | — | |
| clip | CLIP | — | |
| conditioning_pos | CONDITIONING | — | |
| conditioning_neg | CONDITIONING | — | |
| detailer_enable | BOOLEAN | true | — |
| steps | INT | 201–200 | — |
| cfg | FLOAT | 7.00–30 | — |
| sampler | COMBO | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 | |
| scheduler | COMBO | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 | |
| sam_modelopt | SAM_MODEL | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipe | CMK_PIPE | — |