AutoGuidance Detailer Hook (Impact Pack)
Give the face detail pass its own bad model
- bad_model
- DETAILER_HOOK
If you already run AutoGuidance on your main pass (see the AutoGuidance CFG Guider article from this same pack), you'll have noticed most of its effect lives in composition and structure. The detail pass is a separate sampling run, and this node is how you give that run the same treatment - without rebuilding your detailer graph or editing Impact Pack source.
Impact Pack's FaceDetailer (and Detailer SEGS) detect a region, crop it, and re-render it at proper resolution in a fresh sampling pass. That pass runs plain CFG, and it's exactly where overcooking shows: hard, painted-on faces, that over-refined look. AutoGuidance's whole pitch is "less overcooked, same or better faithfulness," which is the detailer's problem in miniature. So the pack author shipped a DETAILER_HOOK that drops AutoGuidance into the detailer's sampling path at runtime - no file edits, just a hook.
How the hook works
This node is a hook provider, not a guider. Its output is a DETAILER_HOOK, which you wire into the hook input on FaceDetailer or Detailer (SEGS). When the detailer runs, the hook's pre_ksample builds an AutoGuidance guider on the fly - using the detailer's own model and its own cfg as the "good" side, and your bad_model as the weak reference - then patches ComfyUI's sampler long enough for that pass to use it.
That's why the inputs look different from the CFG Guider node: there's no good_model and no cfg, because the detailer already supplies both. The only model you bring is the bad one.
Inputs
bad_model(required) - the weak version of the same model. Same rule as the guider: same data distribution, just less trained. A weaker LoRA stack works.w_autoguide-1.0off, default2.0, higher is stronger.swap_mode-shared_safe_low_vram/shared_fast_extra_vram/dual_models_2x_vram. Same tradeoffs as the guider: shared modes are safe but slow, and dual mode needs two truly distinct model instances (copy the checkpoint file under a new name so ComfyUI doesn't dedupe the load).
The rest are the shared tuning set: ag_delta_mode, ag_combine_mode, ag_max_ratio, ag_allow_negative, ag_ramp_mode/power/floor, ag_post_cfg_mode. ag_max_ratio is the one to reach for first - it caps how hard the good-minus-bad push can go, and a detail pass is already aggressive. Note the debug toggles default to off here (unlike the guider, where they're on), so don't expect console spam.
Install
Same pack as the guider:
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-AutoGuidance
restart, and make sure Impact Pack is installed too. The hook imports impact.hooks lazily and falls back to a stub if Impact Pack is missing - so it won't crash your session, but the DETAILER_HOOK output also won't be a real hook. Effectively the pack is required.
What to watch for
The dual-instance requirement applies here just like it does to the guider: pick dual_models_2x_vram and both models have to be separate loads, or ComfyUI collapses them and the "bad" path becomes the good path. And the cost stacks - the detailer already doubles work on a small crop, and AutoGuidance adds a third model evaluation per step on top, so the shared swap modes can make face detailing painfully slow.
Honest take: this is a niche-of-a-niche. It assumes you've already bought into AutoGuidance and you care specifically about the detail pass. But if you have the VRAM for two SDXL models resident and the face pass is where you see the overcooking, this is the cleanest way to apply the idea there - one wire, no monkey-patching your own install.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| bad_model | MODEL | — | |
| w_autoguide | FLOAT | 2.001–5 | — |
| swap_mode | COMBO | shared_safe_low_vram | 3 options: shared_safe_low_vram, shared_fast_extra_vram, dual_models_2x_vram |
| ag_delta_modeopt | COMBO | bad_conditional | 4 options: bad_conditional, raw_delta, project_cfg, reject_cfg |
| ag_combine_modeopt | COMBO | sequential_delta | 2 options: sequential_delta, multi_guidance_paper |
| ag_max_ratioopt | FLOAT | 0.350–5 | — |
| ag_allow_negativeopt | BOOLEAN | true | — |
| ag_ramp_modeopt | COMBO | flat | 4 options: flat, detail_late, compose_early, mid_peak |
| ag_ramp_poweropt | FLOAT | 2.00.5–8 | — |
| ag_ramp_flooropt | FLOAT | 0.150–1 | — |
| ag_post_cfg_modeopt | COMBO | keep | 3 options: keep, apply_after, skip |
| safe_force_clean_swapopt | BOOLEAN | true | — |
| uuid_only_noopopt | BOOLEAN | false | — |
| debug_swapopt | BOOLEAN | false | — |
| debug_metricsopt | BOOLEAN | false | — |
| debug_metrics_allopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DETAILER_HOOK | DETAILER_HOOK | — |