SMC Self-Anchor Detailer Hook Provider
Put a self-anchor correction inside FaceDetailer, no second model pass.
- profile
- detailer_hook
SMC Self-Anchor Detailer Hook Provider (class SMCSelfAnchorDetailerHookProvider) is the pack's integration with ComfyUI Impact Pack - the same pack that gives you FaceDetailer, which remains the default way ComfyUI people fix small faces. The node produces a DETAILER_HOOK you plug into FaceDetailer or Detailer (SEGS), and the hook quietly corrects high-res drift inside the detailer's own pipeline.
If you've detailed a crop with FLUX.2 Klein and watched it come back zoomed-out, washed out, or mismatched against the source frame, you know the failure this targets. The detailer's upscale-then-sample loop is exactly where that drift gets born - so hooking a correction into that loop is a sensible place to fight it. This is the practical middle ground between "do nothing" and "build a full two-pass anchor workflow."
How the hook works
The class implements Impact Pack's DetailerHook interface with two lifecycle callbacks:
post_upscale- fires after the detailer upscales the detected crop. The hook snapshots that upscaled crop and stores it as the self-anchor.post_decode- fires after sampling and VAE decode. The hook runs the affine compand path (stable_manifold_compandwith the stored anchor, the decoded pixels as target, and the anchor as the boundary-tether original) and returns the corrected pixels, which the detailer then pastes back.
So the "anchor" is the detailer's own post-upscale crop - no extra model pass, no separate low-res generation. That's the honest trade-off, and the README states it plainly: this is a "practical fallback," not a replacement for a true separate low-resolution anchor branch. It corrects the drift that happens within the hook's surface, which is a real chunk of the problem but not all of it.
Inputs and output
profile(optional,SMC_PROFILE) - tune the correction via SMC Affine Profile. Leave it unconnected and the affine defaults are used.- Output:
detailer_hook- wire into thedetailer_hookinput of FaceDetailer or Detailer (SEGS) in Impact Pack.
Install - the one node with a real dependency
The pack itself is dependency-free, but this node requires ComfyUI-Impact-Pack. Install both:
cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack
git clone https://github.com/xmarre/ComfyUI-StableManifoldCompander
# restart ComfyUI
Or install both via ComfyUI Manager. If Impact Pack is missing, the node raises a clear RuntimeError telling you exactly that - it's a hard requirement, not a soft one, because the hook subclasses Impact Pack's own DetailerHook class.
Gotchas
Three things bite people. First, the hook only helps if the drift is happening inside the detailer loop - it stores the upscaled crop as anchor, so if your source image was already drifted before the detailer touched it, you're anchoring to a bad reference. Second, profile tuning matters; at default strength the correction can be subtle, and there's no live preview, so iterate on a couple of face crops. Third, it's the affine path under the hood, which means max_expand is 0 - the hook can pull in, never push out. For localized radial drift in detail crops, the standalone anchor-guided SMC Compand remains the more powerful tool; use the hook when you want correction without restructuring your detailer workflow.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| profileopt | SMC_PROFILE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| detailer_hook | DETAILER_HOOK | — |