Difforum · Detail Guard
The Two-Second Fix for Frames That Went Soft
- image
- image
Unsharp, contrast, grain. That's the node. If you were hoping for something cleverer, Difforum has one of those too - but this is the one you'll add to a graph when the output looks flat and you want it fixed before your coffee cools.
Why soft frames are inevitable here
Every warp plus VAE round-trip in a feedback loop costs a little high-frequency detail. Over 200 frames that compounds into mush, and it's the classic Deforum complaint. The pack's engine has an in-loop detail guard for exactly this (re-sharpen, then inject a touch of fresh noise so the sampler has something to resolve), and the render options expose it. This node is the post version: applied once to finished frames, when you didn't catch it in the loop or you're treating a clip from somewhere else entirely.
The four dials
sharpen(0.3) - unsharp mask amount. It's a blur-and-difference: result = image + amount × (image − blur). 0 is off, and past about 1.0 you're into halos and crunchy edges that read as AI upscaling rather than detail.contrast(1.0) - a plain multiplier. 1.0 is neutral, 1.05–1.15 is a tasteful lift, 1.5 is a look.grain(0) - film grain amount, 0 to 0.5. This is off by default, which is the right call, but it's the most useful control in the node.grain_mode-gaussianfor fine film grain,plasmafor soft organic noise (a multi-scale, Perlin-ish field rather than per-pixel randomness).
Why grain deserves its own paragraph
Grain is the cheapest single move for making generated footage read as captured. Real cameras have noise, and the community's standard recipe for "why do AI videos look fake" is post-production, not a better model - the frequently-cited stack is motion blur, a little camera shake, grain, chromatic aberration and vignetting. Difforum gives you the shake in the camera presets and the grain here.
Plasma mode is the interesting one for footage. Pure per-pixel gaussian grain on a video boils visibly between frames, because each frame gets different randomness; the smooth multi-scale field is spatially and temporally calmer and holds up better as a moving texture. If gaussian grain looks like TV static on your clip, switch modes before you lower the amount.
Inputs and output
image in, image out - a single image or a whole batch, treated frame by frame. No side inputs, no models.
Install
ComfyUI Manager → search "Difforum", or:
cd ComfyUI/custom_nodes && git clone https://github.com/chillithebillis/Difforum.git difforum
Restart. The base numpy install covers it; this is pure torch maths.
Where people get burned
Sharpening after grain, or rather sharpening a lot - the two compound, and grain sharpened hard is a noise field with an outline. If you want both, keep sharpen modest.
The other mistake is using this to fix a fundamentally soft render. Unsharp masking cannot invent detail that wasn't captured; it makes existing structure more visible, which is different. If a clip is mush because the model invented new content every frame, Detail Guard will happily add contrast and grain to the mush and make it crunchier mush. The in-loop detail guard plus a lower energy is the actual answer, and it's cheaper than re-sharpening a bad clip.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | An image or a batch of frames. | |
| sharpen | FLOAT | 0.300–2 | Unsharp amount. |
| contrast | FLOAT | 1.000.5–2 | Contrast multiplier. |
| grain | FLOAT | 0.0000–0.5 | Film grain amount. |
| grain_mode | COMBO | gaussian | gaussian = fine film grain, plasma = soft organic noise. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |