CMK Refiner Prepare SDXL -Pipe-
The SDXL refiner's second pass, wired so you can't plug it in wrong
- MODEL
- PROCESS
- SAMPLED
- LOG
- REFINER
- LOG
- diagnostic
You wanted the SDXL refiner: the base model lays in the composition for the first ~80% of steps, then a refiner checkpoint takes over on the still-noisy latent and touches up everything the base is bad at - faces, skin, fine texture. In stock ComfyUI that's an Advanced KSampler with add_noise: disable, a second checkpoint, and a step split you have to remember. Get the split wrong and you either get no refiner at all or a fully repainted image. This node is that whole second pass pre-wired.
What it actually does
CMK Refiner Prepare SDXL -Pipe- takes the finished first pass as SAMPLED - the latent plus the context of the pass that produced it - and builds a REFINER pipe: your refiner checkpoint, CLIP-encoded positive and negative conditioning, the first-pass latent, and the step maths already done. The REFINER output goes into exactly one consumer, CMK Refiner -Pipe-, which runs the pass and gives you both images back through a boundary cache.
Two things are worth knowing about the mechanism. First, the refiner decodes the first-pass latent to an image so the comparison view has something to show you, but it does not re-encode; the refiner works on the original latent. Second, the step split is a percentage, not a step number. start_without_instantid defaults to 80 and start_with_instantid to 90, and the node picks whichever applies by reading the InstantID flag out of PROCESS. You don't choose. That's the house style: the author's stated rule is that every decision the user has to make is a loss.
The inputs you'll actually touch
MODELis the refiner's model pipe - feed it from its ownCMK Checkpoint VAE Loader -Pipe-, not the base model's. The refiner is allowed its own checkpoint; the shared model line stays untouched for later modules.PROCESS,SAMPLED,LOGare the three pipes plus the log.SAMPLEDin,REFINERout.sampling_source(1st pass/Local settings) inherits steps, sampler and scheduler from the first pass. Leave it alone unless you deliberately want the refiner to sample differently.use_prompt_lora_from_sampler(default on) anduse_lora_from_1st_pass(default off) decide where prompt and LoRA come from. If you setuse_lora_from_1st_pass, the first pass's LoRA stack is reapplied here; otherwiselora_name/strength_model/strength_clipapply one local LoRA. The default isNone, deliberately, because a base SDXL LoRA slapped on a refiner architecture produces shape-mismatch walls.prompt_pos_input/prompt_neg_inputare the two optional string inputs if you want the refiner looking at something else than the first pass did.
Outputs are REFINER, LOG and diagnostic. Wire REFINER into CMK Refiner -Pipe-, thread LOG onward, and ignore diagnostic unless something's off - it's the structured payload the Visualizer and the log blocks read.
Installing
Manager: search CMK Flow, install the CMKFlow entry, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/CMKFlow/cmk_nodes.git cmk_nodes
python3 cmk_nodes/scripts/install_cmk_requirements.py # look for "CMK dependency check: OK"
Model weights are not in the pip package - run scripts/check_cmk_resources.py to see what the shipped workflows expect. And note the odd one: CMK requires ComfyUI's Vue Nodes / Nodes 2.0 setting. Most packs in 2026 are still recovering from that frontend, this one leans on it for dropdowns and auto-sizing.
Where people get burned
The refiner checkpoint is a separate download from your base model, and it has to match the base family - mixing an SDXL refiner with an SD1.5 base produces noise, not an error. The other trap is sampling (default lcm): that's the sampling mode, not the sampler. If you're running a normal non-LCM SDXL checkpoint and someone set that mode, your output goes soft. zsnr and pag_scale are advanced knobs; PAG in particular is a real quality lever but it costs speed, so don't touch it while you're still dialling in the split.
Inputs (21)
| Name | Type | Default | Description |
|---|---|---|---|
| MODEL | CMK_MODEL_PIPE | — | |
| PROCESS | CMK_PROCESS_SDXL | — | |
| SAMPLED | CMK_SAMPLED_PIPE | — | |
| LOG | CMK_LOG_PIPE | — | |
| use_prompt_lora_from_sampler | BOOLEAN | true | — |
| use_lora_from_1st_pass | BOOLEAN | false | — |
| lora_name | COMBO | None | 1 options: None |
| strength_model | FLOAT | 1.00-20–20 | — |
| strength_clip | FLOAT | 1.00-20–20 | — |
| sampling_source | COMBO | 1st pass | Inherit steps, sampler and scheduler from the first pass. |
| steps | INT | 251–200 | — |
| start_without_instantid | FLOAT | 800–100 | Refiner start used when InstantID is disabled. |
| start_with_instantid | FLOAT | 900–100 | Refiner start used automatically when InstantID is enabled. |
| cfg | FLOAT | 4.80–10 | — |
| sampler | COMBO | euler | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| sampling | COMBO | lcm | 3 options: eps, v_prediction, lcm |
| zsnr | BOOLEAN | false | — |
| pag_scale | FLOAT | 2.500–20 | — |
| scheduler | COMBO | simple | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| prompt_pos_inputopt | STRING | — | |
| prompt_neg_inputopt | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| REFINER | CMK_REFINER_PIPE | — |
| LOG | CMK_LOG_PIPE | — |
| diagnostic | CMK_DIAGNOSTIC | — |