Nodes/ComfyUI_FreeU_V2_advanced/FreeU S (Fourier) Adaptive Cap (Simple)
ComfyUI Node

FreeU S (Fourier) Adaptive Cap (Simple)

The FreeU half that stops itself from over-cooking

By Shiba-2-shiba·Created 2 years ago·Updated 10 months ago· 2
FreeU S (Fourier) Adaptive Cap (Simple)
  • model
  • MODEL
s11.20
s20.70
s_start_percent0.600
s_end_percent1.000
enable_captrue
adaptive_captrue
verbose_loggingfalse

FreeU's skip-connection dampening has a known dark side: crank the Fourier scaling too far and your sharp, detailed image turns into a waxy oil painting. This node is the S (skip / Fourier) half of FreeU V2, scoped to run late in sampling, with a built-in over-attenuation cap that catches the damage while it's happening and backs the strength off. It's the pack's smartest node and the one you'll reach for when plain FreeU makes your images look like someone ran a sharpening filter through pudding.

What it does differently

Stock FreeU filters the skip features once and hopes. This node filters, then measures the result: it computes the low-frequency vs high-frequency energy ratio before and after the Fourier filter, and if the ratio dropped past a hardcoded threshold (35% at the 1280-channel block, 70% at 640ch), it decides the filter over-attenuated and re-runs it with a weaker scale - up to three iterations. adaptive_cap makes the correction smarter by scaling the fix in proportion to how far past the threshold you went. The whole thing is the "Simple" version, so the author hid the fine-tuning (radius ratio, boost, thresholds) as class constants in the source; what you get on the UI is the stuff that matters.

The inputs

  • s1 (default 1.2) and s2 (default 0.7) - the Fourier scale for the 1280- and 640-channel blocks. Below 1.0 damps high frequencies, which is the usual direction.
  • s_start_percent (0.6) and s_end_percent (1.0) - the timestep window. Note the defaults: this node does nothing in the first 60% of sampling by design. It's meant to pair with the pack's FreeU_B_Scaling node, which handles the early phase.
  • enable_cap (true) - the over-attenuation safety net. Turn it off if you want raw, uncapped FreeU and you're comfortable babysitting the artifacts.
  • adaptive_cap (true) - whether the cap factor scales with how badly it over-shot.
  • verbose_logging (false) - prints the sigma, channel count, and LF/HF energy stats so you can actually see what the cap is doing.

Output is a patched MODEL that goes straight into the KSampler.

Wiring it up

The pack's README's recommended recipe: B1B2 in the first half of generation, S1S2 in the second. So the workflow looks like CheckpointLoader → FreeU_B_Scaling → this node → KSampler. The two split nodes deliberately pass each other's target tensor through untouched - the B node leaves skip features alone, this one leaves the backbone alone - so they compose cleanly in a chain.

Troubleshooting

  • Nothing happens until late in the pass - that's the 0.6 start default, not a bug. Lower s_start_percent if you want it active earlier.
  • "Over-attenuation detected" warnings in the console - that's the cap working, not a crash. If they spam constantly, your s1/s2 are too aggressive and the node is saving you from yourself.
  • Waxy output with the cap on - either the thresholds are too generous for your model or the cap isn't catching it; raise s2 toward 1.0 (less dampening) rather than fighting it.

Install is the same as the rest of the pack - ComfyUI Manager search "ComfyUI_FreeU_V2_timestepadd", or git clone https://github.com/Shiba-2-shiba/ComfyUI_FreeU_V2_timestepadd into custom_nodes/, then restart. No extra dependencies, no models to fetch, and it needs a reasonably current ComfyUI (it uses the new V3 node API).

Categorymodel_patches/unet

Inputs (8)

NameTypeDefaultDescription
modelMODEL
s1FLOAT1.200–10
s2FLOAT0.700–5
s_start_percentFLOAT0.6000–1
s_end_percentFLOAT1.0000–1
enable_capBOOLEANtrue
adaptive_capBOOLEANtrue
verbose_loggingBOOLEANfalse

Outputs (1)

NameTypeDescription
MODELMODEL