Nodes/Diffusion-Model-Detailer/Detailer (UNet Patch)
ComfyUI Node

Detailer (UNet Patch)

The Detailer node that isn't the Detailer you think it is

By cody-schultz-DS·Created about a year ago·Updated about a year ago· 4
Detailer (UNet Patch)
  • model
  • MODEL
scaling_factor0.250
scaling_narrowness7.0

First, the name trap, because it'll bite you in Manager. When people say "detailer" in ComfyUI they almost always mean Impact Pack's FaceDetailer or ADetailer - the detect-the-face-and-inpaint-it machines that rescued a billion ruined portraits. This is not that. This "Detailer (UNet Patch)" is a tiny, single-node pack by Yo1up that does something much stranger: it patches your checkpoint so the sampler injects a little extra noise mid-generation for more detail, or scrubs noise out for a smoother image. No detection, no masking, no inpainting. Two sliders and a model in, a model out. That's the whole pack, and that's fine.

What it actually does

Every diffusion step, your UNet predicts the noise to remove from a noisy latent. This node wraps that forward pass and quietly lies to the model about what timestep it's on. Positive scaling_factor tells the UNet the latent is noisier than it really is, so it leaves more high-frequency structure in - which reads as "more detail." Negative values do the opposite and push the image smoother. It has zero trainable parameters, so it's not a LoRA and it isn't training anything; it's a schedule tweak applied at inference, and the model clone it patches only affects the branch of the workflow you wire it into.

The interesting part is the schedule. The effect doesn't smear across all steps evenly - it follows a sine wave over your sampling progress, raised to the power of scaling_narrowness. At scaling_narrowness 7 (the default) the effect peaks hard in the middle of sampling and fades out at the start and end, where composition and final clean-up happen. Drop narrowness toward 0 and it applies everywhere at full strength. It's the same school of thinking as scheduler selection and Karras's mid-schedule emphasis - you're redistributing where denoising effort lands, just at a finer grain.

The inputs that matter

You set exactly two things, plus the model:

  • model - the MODEL output from your Load Checkpoint node.
  • scaling_factor - strength and direction. Default 0.25, range −1 to 1. Positive adds detail, negative smooths. Start at 0.25 and move in small steps; the node multiplies your input by 0.05 internally, so 0.25 is deliberately gentle.
  • scaling_narrowness - how tight the affected window is. 0 hits every step; higher values pinch the peak toward mid-sampling (default 7, max 14).

The output is a single MODEL, which replaces the checkpoint's model wire going into your KSampler:

Load Checkpoint ──model──► Detailer (UNet Patch) ──model──► KSampler

Installing it

ComfyUI Manager: search Diffusion-Model-Detailer, hit install, restart. Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/Yo1up/Diffusion-Model-Detailer

then restart ComfyUI. That's it - no requirements.txt, no model weights to hunt down, no heavy dependencies. The whole implementation is one Python file using ComfyUI's built-in set_model_unet_function_wrapper API. It's about the cheapest experiment you can run in ComfyUI.

Where it breaks expectations

Keep the expectations honest, because this is where people get burned. It's a subtle knob - at the default it's more "slightly crisper textures" than a transformation, and if you're here to rescue a mangled face, you want Impact Pack, not this. And because it perturbs the timestep mid-run, changing it re-rolls the sampling: nudging the slider changes the image, same as swapping a scheduler would. Treat it as a creative tuning knob, not a deterministic sharpener.

The author's own README carries a lovely caveat - it should work on "theoretically any diffusion model," with an "I don't know" appended. Treat that honestly. The sigma-wiggling trick makes sense for DDPM-style models like SD 1.5, SDXL, and the Pony/Illustrious fine-tunes; on flow-matching models (Flux, Z-Image, and friends) the denoising trajectory is nearly straight, so there's far less for a mid-schedule noise boost to fix. It's also worth keeping ComfyUI updated - the code leans on the modern model-patcher API and matches your current timestep against the sampler's sigma list to locate mid-run, so an old patched-up install is the most likely place for it to silently do nothing.

Categorymodel_patches/details

Inputs (3)

NameTypeDefaultDescription
modelMODEL
scaling_factorFLOAT0.250-1–1Positive values increase detail, negative values reduce detail.
scaling_narrownessFLOAT7.00.1–14Controls the focus of the scaling effect within the sampling process (higher = narrower peak).

Outputs (1)

NameTypeDescription
MODELMODEL