Scale-Locked Detailer Hook Provider
Getting scale-lock inside FaceDetailer — experimental, and the author says so
- lock_mask
- manifold_mask
- detailer_hook
Here's the situation this node exists for: your high-res output still drifts on the bits that matter most - faces, hands, body - and the fix everyone reaches for is Impact Pack's FaceDetailer: detect the region, crop it, resample it at proper resolution, paste it back. But FaceDetailer's crop pass is its own little sampling run, and a public guider node in ComfyUI does not make FaceDetailer use it. That's the gap this node plugs - it's a DETAILER_HOOK provider that gets the scale-lock correction running inside the FaceDetailer crop lifecycle, restricted to the masked region.
Now the part you should actually trust: the README calls this experimental, and it's duck-typed rather than source-verified against a live Impact Pack checkout. The author validated that it imports and compiles, not that it runs perfectly against the current Impact Pack internals. Impact Pack's hook contracts move around (it's GPL-3.0, actively maintained, and its detection/crop machinery is load-bearing infrastructure - the KB's impact-pack panel calls it "infrastructure rather than a topic"). So treat this node as promising glue, not a settled integration.
How it works
Wire the detailer_hook output into a FaceDetailer's hook input. The hook captures the FaceDetailer crop mask via post_upscale(...), then drives the masked residual/manifold correction through its own sampler path - pre_ksample(...) plus a custom sampler/runtime integration. The live path is that sampler-driven one; the post_encode(...) / pre_decode(...) pair is inert, and the README says so. Any lock_mask / manifold_mask you supply gets intersected with the FaceDetailer support mask, so the correction stays inside the crop region.
The inputs that matter
The provider dropped the sampler-runtime controls that didn't participate in the live hook path - so the exposed knobs are the ones that genuinely affect the masked correction:
target_megapixels(1.0) - the planner resolution for the correction's low-res branch.lock_strength/lock_strength_start/lock_strength_endandcoarse_cutoff- the residual lock level, envelope, and coarse cutoff, same as the rest of the pack.mid_band_cutoff/mid_band_strength- the medium-scale shape lock.manifold_enabledand the manifold group - off by default; the more experimental companding controls.nested_noise_strength(0.35) - high-frequency detail freedom.lock_mask/manifold_mask(optional) - intersected with the FaceDetailer mask.add_noise,pin_anchors,sampler_guard,warn_if_inactive_sampler- the runtime plumbing.sampler_guarddefaults towarnbecause the pack only trusts a conservative safe-set of samplers.
Output is a single detailer_hook (DETAILER_HOOK).
Install
Same pack, same story - no extra deps, no model downloads.
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-ScaleLockedResidualDiffusion
Restart ComfyUI, or use ComfyUI Manager and search ComfyUI-ScaleLockedResidualDiffusion. You'll also need Impact Pack installed for the DETAILER_HOOK contract and FaceDetailer itself.
Troubleshooting
- Compatibility: this provider's input signature changed when the inert detailer-only sampler/runtime controls were removed. Older saved workflows using the previous input surface will fail to load cleanly and need re-wiring to the current inputs.
- Hook does nothing: if Impact Pack's internals moved, the duck-typed hook can silently stop participating. Check that your Impact Pack is current, and confirm the hook is actually on the FaceDetailer's hook input - a hook sitting in your graph but never attached is the classic silent no-op.
- Sampler warnings:
warn_if_inactive_samplerandsampler_guardexist because the correction only works through its custom sampler path; if it can't engage, you get told instead of a mysterious result.
Set expectations: this is the newest, least-proven node in the pack, and the author is honest about it. If you need a rock-solid detail pass today, FaceDetailer alone is still the dependable move - this is the option to try when you want the detailer's crop to also stop the identity drift, and you're comfortable being the one who tests it.
Inputs (40)
| Name | Type | Default | Description |
|---|---|---|---|
| target_megapixels | FLOAT | 1.000.1–16 | — |
| lock_strength | FLOAT | 0.850–1 | — |
| lock_strength_start | FLOAT | 0.950–1 | — |
| lock_strength_end | FLOAT | 0.250–1 | — |
| lock_schedule | COMBO | 10 options: linear, cosine, flat, smoothstep, smootherstep, ease_in, +4 | |
| lock_schedule_hold | FLOAT | 0.000–0.95 | — |
| lock_schedule_power | FLOAT | 2.00.1–8 | — |
| coarse_cutoff | FLOAT | 0.330.05–1 | — |
| mid_band_cutoff | FLOAT | 0.600.05–1 | — |
| mid_band_strength | FLOAT | 0.350–2 | — |
| mid_band_strength_start | FLOAT | 1.000–1 | — |
| mid_band_strength_end | FLOAT | 0.000–1 | — |
| mid_band_schedule | COMBO | 11 options: linked, linear, cosine, flat, smoothstep, smootherstep, +5 | |
| mid_band_schedule_hold | FLOAT | 0.000–0.95 | — |
| mid_band_schedule_power | FLOAT | 2.00.1–8 | — |
| manifold_enabled | BOOLEAN | false | — |
| manifold_strength | FLOAT | 0.450–1 | — |
| manifold_strength_start | FLOAT | 1.000–1 | — |
| manifold_strength_end | FLOAT | 0.000–1 | — |
| manifold_schedule | COMBO | 10 options: linear, cosine, flat, smoothstep, smootherstep, ease_in, +4 | |
| manifold_schedule_hold | FLOAT | 0.000–0.95 | — |
| manifold_schedule_power | FLOAT | 2.00.1–8 | — |
| manifold_cutoff | FLOAT | 0.180.05–1 | — |
| manifold_radial_strength | FLOAT | 1.000–3 | — |
| manifold_anisotropy | FLOAT | 0.150–2 | — |
| manifold_translation_strength | FLOAT | 1.000–3 | — |
| manifold_anchor_mix | FLOAT | 0.180–1 | — |
| manifold_mean_anchor_mix | FLOAT | 0.120–1 | — |
| manifold_contrast_restore | FLOAT | 0.100–1 | — |
| manifold_energy_tether | FLOAT | 0.000–1 | — |
| manifold_channel_tether | FLOAT | 0.000–1 | — |
| manifold_energy_gain_cap | FLOAT | 1.751–4 | — |
| manifold_max_shift_px | FLOAT | 3.00–64 | — |
| nested_noise_strength | FLOAT | 0.350–4 | — |
| add_noise | BOOLEAN | true | — |
| pin_anchors | BOOLEAN | true | — |
| sampler_guard | COMBO | 3 options: warn, error, off | |
| warn_if_inactive_sampler | BOOLEAN | true | — |
| lock_maskopt | MASK | — | |
| manifold_maskopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| detailer_hook | DETAILER_HOOK | — |