Nodes/ComfyUI-ScaleLockedResidualDiffusion/Scale-Locked Detailer Hook Provider
ComfyUI Node

Scale-Locked Detailer Hook Provider

Getting scale-lock inside FaceDetailer — experimental, and the author says so

By xmarre·Created 6 months ago·Updated 6 months ago· 2
Scale-Locked Detailer Hook Provider
  • lock_mask
  • manifold_mask
  • detailer_hook
target_megapixels1.00
lock_strength0.85
lock_strength_start0.95
lock_strength_end0.25
lock_schedule
lock_schedule_hold0.00
lock_schedule_power2.0
coarse_cutoff0.33
mid_band_cutoff0.60
mid_band_strength0.35
mid_band_strength_start1.00
mid_band_strength_end0.00
mid_band_schedule
mid_band_schedule_hold0.00
mid_band_schedule_power2.0
manifold_enabledfalse
manifold_strength0.45
manifold_strength_start1.00
manifold_strength_end0.00
manifold_schedule
manifold_schedule_hold0.00
manifold_schedule_power2.0
manifold_cutoff0.18
manifold_radial_strength1.00
manifold_anisotropy0.15
manifold_translation_strength1.00
manifold_anchor_mix0.18
manifold_mean_anchor_mix0.12
manifold_contrast_restore0.10
manifold_energy_tether0.00
manifold_channel_tether0.00
manifold_energy_gain_cap1.75
manifold_max_shift_px3.0
nested_noise_strength0.35
add_noisetrue
pin_anchorstrue
sampler_guard
warn_if_inactive_samplertrue

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_end and coarse_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_enabled and 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_guard defaults to warn because 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_sampler and sampler_guard exist 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.

Categorysampling/scale_locked/impact

Inputs (40)

NameTypeDefaultDescription
target_megapixelsFLOAT1.000.1–16
lock_strengthFLOAT0.850–1
lock_strength_startFLOAT0.950–1
lock_strength_endFLOAT0.250–1
lock_scheduleCOMBO10 options: linear, cosine, flat, smoothstep, smootherstep, ease_in, +4
lock_schedule_holdFLOAT0.000–0.95
lock_schedule_powerFLOAT2.00.1–8
coarse_cutoffFLOAT0.330.05–1
mid_band_cutoffFLOAT0.600.05–1
mid_band_strengthFLOAT0.350–2
mid_band_strength_startFLOAT1.000–1
mid_band_strength_endFLOAT0.000–1
mid_band_scheduleCOMBO11 options: linked, linear, cosine, flat, smoothstep, smootherstep, +5
mid_band_schedule_holdFLOAT0.000–0.95
mid_band_schedule_powerFLOAT2.00.1–8
manifold_enabledBOOLEANfalse
manifold_strengthFLOAT0.450–1
manifold_strength_startFLOAT1.000–1
manifold_strength_endFLOAT0.000–1
manifold_scheduleCOMBO10 options: linear, cosine, flat, smoothstep, smootherstep, ease_in, +4
manifold_schedule_holdFLOAT0.000–0.95
manifold_schedule_powerFLOAT2.00.1–8
manifold_cutoffFLOAT0.180.05–1
manifold_radial_strengthFLOAT1.000–3
manifold_anisotropyFLOAT0.150–2
manifold_translation_strengthFLOAT1.000–3
manifold_anchor_mixFLOAT0.180–1
manifold_mean_anchor_mixFLOAT0.120–1
manifold_contrast_restoreFLOAT0.100–1
manifold_energy_tetherFLOAT0.000–1
manifold_channel_tetherFLOAT0.000–1
manifold_energy_gain_capFLOAT1.751–4
manifold_max_shift_pxFLOAT3.00–64
nested_noise_strengthFLOAT0.350–4
add_noiseBOOLEANtrue
pin_anchorsBOOLEANtrue
sampler_guardCOMBO3 options: warn, error, off
warn_if_inactive_samplerBOOLEANtrue
lock_maskoptMASK
manifold_maskoptMASK

Outputs (1)

NameTypeDescription
detailer_hookDETAILER_HOOK