Nodes/ComfyUI-StableManifoldCompander/Stable Manifold Self-Anchor Detailer Hook
ComfyUI Node

Stable Manifold Self-Anchor Detailer Hook

The drift fix that lives inside FaceDetailer — self-anchor, honest about its limits

By xmarre·Created 6 months ago·Updated 6 months ago· 0
Stable Manifold Self-Anchor Detailer Hook
  • profile
  • detailer_hook

If you detail with Impact Pack's FaceDetailer on FLUX.2, you know the pattern: detect, crop, upscale, resample, paste - and the pasted crop never quite matches the source. It's zoomed out, relit, chroma-flattened; the pack's README is blunt that this is a signature FLUX.2 Klein failure mode. StableManifoldSelfAnchorDetailerHookProvider is the attempt to fix that inside the detail loop instead of as a separate post step. You plug its detailer_hook output into FaceDetailer's detailer_hook input and the correction runs automatically after upscale and after decode.

Worth understanding the mechanism before you trust it. It's a DetailerHook subclass (Impact's impact.hooks). When the detailer finishes upscaling the crop, the hook's post_upscale stores that upscaled crop plus the mask as a "self-anchor." After decode, post_decode runs the pack's stable_manifold_compand against that stored anchor - using the stored mask and the anchor itself as the original reference - and returns the corrected pixels for compositing.

Here's the honest catch, and the pack's own docs say it plainly: the "anchor" is the upscaled crop's pre-correction state, not a true low-res reference pass. It's correcting the crop against itself. That's why the author calls it a practical fallback rather than the full anchor-guided workflow. It genuinely fights the outward zoom and washout that appear within the crop's own upscale history, but it won't match what a proper two-pass low-res anchor branch does. Set expectations accordingly.

Inputs: one optional profile (SMC_PROFILE) - feed it from StableManifoldProfile to tune the correction, or omit it for pack defaults. Output: detailer_hook (DETAILER_HOOK). It only does anything in detailer nodes that accept hooks; FaceDetailer is the obvious one.

Installing

The pack itself, plus ComfyUI-Impact-Pack - this is the only node in the pack with an extra dependency. Install both, restart:

cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-StableManifoldCompander
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack

Or install both via ComfyUI Manager. There's no silent failure mode: if Impact isn't importable, the node raises a clear error telling you to install Impact or use the standalone compand nodes instead. No model files beyond what Impact already needs.

Gotchas

If results come out mushy or over-corrected, back off geometry_strength, anchor_pull, and max_shrink in the profile before touching anything else - those control how hard the pull is. And the honest real-world take: this is a niche pack with essentially zero community footprint, so treat the defaults as a starting point, not doctrine. A/B the hooked detailer against the unhooked one and keep the hook only if it's actually winning. Impact Pack is battle-tested; this early hook riding on it is not.

CategoryStableManifoldCompand/Impact

Inputs (1)

NameTypeDefaultDescription
profileoptSMC_PROFILE

Outputs (1)

NameTypeDescription
detailer_hookDETAILER_HOOK