Nodes/ComfyUI Impact Pack/CustomSamplerDetailerHookProvider
ComfyUI Node Runs on cloud

CustomSamplerDetailerHookProvider

Run a detailer with a sampler that isn't in its dropdown

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
CustomSamplerDetailerHookProvider
  • sampler
  • DETAILER_HOOK

Impact Pack's detailer nodes pick their sampler from a sampler_name dropdown - the standard ComfyUI list, euler, dpm_2, and so on. That's fine until you want to detail with a sampler that isn't a string in that list at all, but a proper SAMPLER object built elsewhere in your graph - the kind that comes out of KSamplerSelect or one of the newer sampler packs (RES4LYF's higher-order solvers, for one, which ship as connectable SAMPLER outputs rather than dropdown entries). Per the pack's own description: "Apply a hook that allows you to use a custom sampler in the Detailer nodes."

This is the bridge between the detailer's fixed dropdown and ComfyUI's broader SAMPLER-object ecosystem. Without it, a detailer simply can't reach a sampler that only exists as a node output.

How it works

You connect a SAMPLER-typed input to this node, and it wraps that sampler into a DETAILER_HOOK. When you attach that hook to a detailer, the detailer uses your supplied sampler for its refine pass instead of resolving one from the sampler_name string. One thing worth knowing if you combine hooks: per the README, "when using DetailerHookCombine, the sampler from the first hook is applied" - so if you chain this hook with others, put it first if the custom sampler is the one you actually want to take effect.

The input and output

  • sampler (SAMPLER, required) - the sampler object to use for the detail pass. Build it with KSamplerSelect, or take it from whatever pack provides the specific sampler you want the detailer to run.

Output is a single DETAILER_HOOK - wire it into the detailer_hook input of the detailer node doing the refining.

How to install it

Ships with the Impact Pack. ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack comfyui-impact-pack
cd comfyui-impact-pack
python -m pip install -r requirements.txt   # ComfyUI's python; python_embeded on portable

then restart. This node itself needs nothing extra - but whatever pack you're pulling the SAMPLER from (RES4LYF or otherwise) is a separate install you'll need alongside Impact Pack.

Common issues & troubleshooting

Nothing to plug into the sampler input. This node doesn't provide a sampler itself, only a way to route one into a detailer. You need something upstream actually emitting a SAMPLER type - KSamplerSelect is the stock ComfyUI way, or a dedicated sampler-provider node from whichever custom sampler pack you're using.

Combined it with another hook and the custom sampler didn't take. Check ordering into DetailerHookCombine - per the README, the first hook's sampler wins when hooks are combined, so if this one isn't listed first, whatever sampler the other hook implies (or the detailer's own default) can end up used instead.

Not sure you need this at all. If the sampler you want is already in the detailer's own sampler_name dropdown, you don't - just pick it there directly. This node earns its place specifically when the sampler you want lives outside that string list, as a connectable SAMPLER object from another node.

CategoryImpactPack/Detailer

Inputs (1)

NameTypeDefaultDescription
samplerSAMPLER

Outputs (1)

NameTypeDescription
DETAILER_HOOKDETAILER_HOOK