CMK InstantID Face Detailer SDXL
A second InstantID pass, aimed at one crop
- MODEL
- PROCESS
- TARGET ROI
- SOURCE FACE
- LOG
- MODEL
- PROCESS
- IMAGE
- LOG
- diagnostic
InstantID's job in a normal CMK flow happens before the sampler: module 15 injects the identity while the whole image is being built. This node is the opposite case. It takes a cropped face region and runs a small img2img pass on it with InstantID conditioning applied, so a face that came out slightly wrong can be re-rendered with the reference identity still in the loop - without redoing the 1024px image around it.
The source is blunt about its scope: it's "a local InstantID Img2Img detailer; deliberately independent of module 15." You can use it inside the FaceRebuild chain, or standalone if you feed it a crop.
Why you'd want it
Detecting and re-rendering a face is settled practice at this point: the mask decides the region, the crop gets its own sampling pass at a resolution the model can resolve, and the result is composited back. Every detailer works this way - the crop is the whole trick, because a face occupying 70 pixels of a 1024px frame has no latent budget to spend.
What makes this one different from a FaceDetailer-style pass is identity. InstantID gives you an ArcFace embedding plus a keypoint ControlNet, so the re-render is pulled toward your reference person rather than drifting off toward whatever the checkpoint thinks a face looks like. The KB's InstantID panel has the honest framing: it gets close to a likeness and stops. That's still a lot better than a generic detailer pass on a crowd shot.
Inputs that matter
The four you wire: MODEL (a CMK_MODEL_PIPE), PROCESS (a CMK_RESULT_PROCESS), TARGET ROI (the crop, IMAGE) and SOURCE FACE (your reference face, IMAGE). Plus LOG.
Then the sampling controls:
SAMPLING START(default 6) - absolute img2img entry point. Earlier values allow more anatomical change; later values keep the existing structure and only clean it up. This is your denoise knob, expressed in steps instead of a 0–1 float.TOTAL STEPS(default 20). The start value is clamped below it, so an out-of-range entry silently becomes the last step rather than an error.IDENTITY STRENGTH(1.0) andPOSE STRENGTH(0.7) - how hard the ArcFace embedding and the keypoint ControlNet bite.cfg(4.5) andsampler/scheduler(euler_ancestral/karras).identity_noise(0.75) - noise applied to the unconditional InstantID face embedding, not to your latent.instantid_model,controlnet_model,provider- advanced. Note the provider default ships as CoreML; on a Windows or Linux CUDA box you wantCUDAthere.
Outputs are MODEL, PROCESS, IMAGE (the rebuilt ROI), LOG and a diagnostic payload you can preview.
Install
cd ComfyUI
git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py
Manager route: search CMK Flow (registry cmk-flow), install, restart. Then enable Vue Nodes / Nodes 2.0 - CMK's dynamic nodes fall back to plain LiteGraph without it, and this node has advanced toggles that live in that.
Weights are separate from the Python package:
python3 custom_nodes/cmk_nodes/scripts/check_cmk_resources.py --models-root "/path/to/ComfyUI-Shared"
Traps
It refuses to run without a PostProcess Boundary. The node checks process["result_contract"] == "family_neutral" and throws otherwise. You can't hand it a bare SDXL process context from the middle of the generation section; it wants the process object that comes out of the PostProcess Boundary, which is the pack's way of keeping SDXL/Z-Image/HYBRID paths from bleeding into each other.
Two different InsightFace model packs, and they're not interchangeable. The detector dropdown behind the FaceRebuild nodes reads whatever is inside models/insightface/models (buffalo_l is the usual one). InstantID's own face analysis, vendored in this pack, loads antelopev2 by name. antelopev2 is a manual download, so an InstantID error about a missing model usually means you only installed buffalo_l. Both are non-commercial weights - the library is permissive, the models are not.
A disabled FaceRebuild upstream bypasses this node entirely and passes the ROI through untouched, which is correct behaviour and very confusing if you didn't know it was there.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| MODEL | CMK_MODEL_PIPE | — | |
| PROCESS | CMK_RESULT_PROCESS | — | |
| TARGET ROI | IMAGE | — | |
| SOURCE FACE | IMAGE | — | |
| LOG | CMK_LOG_PIPE | — | |
| TOTAL STEPS | INT | 201–200 | — |
| SAMPLING START | INT | 60–199 | Absolute Img2Img sampling entry. Earlier values permit more anatomical change. |
| IDENTITY STRENGTH | FLOAT | 1.000–1 | — |
| POSE STRENGTH | FLOAT | 0.700–1 | — |
| instantid_model | COMBO | 1 options: | |
| controlnet_model | COMBO | 1 options: | |
| provider | COMBO | CoreML | 4 options: CoreML, CPU, CUDA, ROCM |
| cfg | FLOAT | 4.50–10 | — |
| identity_noise | FLOAT | 0.750–1 | — |
| sampler | COMBO | euler_ancestral | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | karras | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| MODEL | CMK_MODEL_PIPE | — |
| PROCESS | CMK_RESULT_PROCESS | — |
| IMAGE | IMAGE | — |
| LOG | CMK_LOG_PIPE | — |
| diagnostic | CMK_DIAGNOSTIC | — |