Nodes/CMK Flow/CMK Mask Detailer · Process
ComfyUI Node

CMK Mask Detailer · Process

Running CMK's Standalone Detailer

By CMKFlow·Created 3 months ago·Updated a day ago· 6
CMK Mask Detailer · Process
  • MODEL
  • MASK DETAILER PROCESS
  • LOG
  • VISUAL
  • MODEL
  • MASK DETAILER PROCESS
  • IMAGE
  • LOG
  • VISUAL
  • diagnostic
◄seed0►
◄steps20►
◄cfg7.0►
◄sampler_name▾►
◄scheduler▾►
◄denoise0.45►
◄mask_expand8►
◄mask_feather12►

This is the node you reach for when one region of an otherwise-fine image is a smear and you'd rather paint the mask yourself than trust a detector. Small hand, mangled ear, a logo that came out as alien glyphs - paint it, run one masked pass over it at proper resolution, paste it back.

CMK Mask Detailer · Process is that single node. It takes the process object built by Mask Detailer · Prepare and a set of sampling parameters, and returns a finished image.

The mechanism, precisely

It doesn't hand your image to an inpainting checkpoint. It does what the whole detailer category does, and it does it in four steps you can trace in the source:

  1. It grows your mask by mask_expand pixels and converts it into SEGS - the same segment-container concept Impact Pack popularised, but CMK ships its own engine (engine/native_detailer.py), so you do not need Impact Pack installed.
  2. SEGSDetailer crops each region, resamples it at guide_size=512 up to max_size=1024, with force_inpaint=True.
  3. That crop is re-sampled with your seed, steps, CFG, sampler, scheduler and denoise, using the positive and negative conditioning baked into the prepare step.
  4. SEGSPaste composites the refined crops back with feather=mask_feather pixels of blend.

Because it forces inpaint and a noise mask, this is a masked img2img, which means every rule in the inpainting playbook applies unchanged.

The knobs worth caring about

  • denoise - default 0.45. This is the single most important number on the node. Low values polish and sharpen; high values redraw. Past roughly 0.6 you're asking the model to invent a hand, and it will invent a hand-shaped object.
  • mask_expand - default 8. Grows the mask outward. Too tight and the paste seams land right on the feature's edge; too generous and you start re-rendering healthy pixels that didn't need help.
  • mask_feather - default 12. Blend radius on paste-back. If you can see a square, this is the number to raise.
  • cfg (7.0), steps (20), sampler_name, scheduler - the usual. Match your main render's sampler family rather than mixing; a different sampler on the crop shows up as a texture mismatch.
  • seed - fixed by default (control_after_generate: "fixed"), which is a small mercy given how much ComfyUI's seed-widget-after-generate behaviour has burned everyone at least once.

Outputs

MODEL (unchanged, passed through), MASK DETAILER PROCESS with the result written in, IMAGE (the composited image), LOG and VISUAL.

Wire IMAGE to whatever saves or displays your work. Wire VISUAL to CMK Visualizer and you get a proper before/after of exactly the masked region - which is worth doing, because masked passes are the kind of change that's easy to over-apply and hard to see. The node registers its provider with status="completed" and a before/after channel pair specifically for that comparison.

Install

Manager → search CMK Flow → install the CMKFlow entry → restart. Manual, with ComfyUI shut down:

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. Models are separate: scripts/check_cmk_resources.py --models-root ... audits what the shipped workflows need. For this node you need an SDXL-family checkpoint and its VAE, nothing exotic.

Common issues

The output looks identical to the input. Either the mask is empty (check the Visualizer, or the Intake status line) or denoise is so low that the pass truly isn't changing anything. 0.45 on a small region is a subtle change by design.

The patch is visibly a patch. Raise mask_feather, raise mask_expand, and check that cfg matches your main render. This is the classic bbox-vs-blend problem from the broader detailing literature, and it's almost always a mask-edge issue rather than a model issue.

"invalid process family." Something other than Mask Detailer · Prepare produced that object. Process validates the type field and refuses anything else - the same anti-mis-wiring discipline the rest of the pack uses.

No boundary cache here, on purpose. Unlike the Flow detailer modules, this standalone path skips the dependency-manifest caching, so it re-runs every time you queue. It's the tool, not the accelerator.

CategoryCMK/Flow/Mask Detailer

Inputs (12)

NameTypeDefaultDescription
MODELCMK_MODEL_PIPE—
MASK DETAILER PROCESSCMK_MASK_DETAILER_PROCESS—
seedINT00–18446744073709550000—
stepsINT201–10000—
cfgFLOAT7.00–100—
sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
denoiseFLOAT0.450.01–1—
mask_expandINT80–128—
mask_featherINT120–128—
LOGoptCMK_LOG_PIPE—
VISUALoptCMK_VISUAL_PIPE—

Outputs (6)

NameTypeDescription
MODELCMK_MODEL_PIPE—
MASK DETAILER PROCESSCMK_MASK_DETAILER_PROCESS—
IMAGEIMAGE—
LOGCMK_LOG_PIPE—
VISUALCMK_VISUAL_PIPE—
diagnosticCMK_DIAGNOSTIC—