Nodes/FUDA – Fourier Domain Adaptation/FUDA + Channel Attention
ComfyUI Node

FUDA + Channel Attention

The same color transfer, with a spectral attention knob on top

By bemoregt·Created 6 months ago·Updated 6 months ago· 1
FUDA + Channel Attention
  • source_image
  • reference_image
  • adapted_image
beta0.090
alpha0.50
attention_strength0.50
reduction4

If you already know FUDA Image Adaptation - the same pack's core node that shifts one image's color and light toward a reference using nothing but FFTs - this is that node with one extra stage bolted on: a Fourier Transform Channel Attention pass that rescales the result channel-by-channel based on spectral energy. Think of it as the "make it pop" variant. Same two images in, same adapted_image out, plus an attention_strength dial to decide how much of that extra stage you actually want.

Why it exists

The FUDA paper argues that plain amplitude mixing handles the low-level style, but a richer recalibration of channels helps sharpen the discriminative features. In practice, for someone color-grading renders, this node is what you reach for when the plain FUDA result looks a touch flat - the attention pass reweights color channels so the adapted image doesn't just inherit the reference's palette, it re-emphasizes channels that carry more spectral energy. Whether you'll notice it depends on the images; sometimes it's a real difference, sometimes it's subtle enough that you can't tell it apart from the plain node. That's the nature of an untrained calibration step.

How it works

It runs the exact same Fourier amplitude mix as the core node (low-frequency reference amplitude blended into the source, source phase preserved), then adds one step: it FFTs the adapted image, computes each channel's spectral energy (mean squared amplitude across spatial dimensions), pushes that through a tiny two-layer MLP with a sigmoid to get per-channel weights, and multiplies the adapted image by those weights. Then it blends the attention-refined result with the raw adapted result according to attention_strength, so you can dial the whole thing down to nothing.

One thing worth knowing before you get excited about the word "attention": the MLP here is not trained. The code instantiates it fresh at runtime with random weights and runs it in inference mode - so the "learning" in the paper's FTCA module is not actually happening in this port. What you get is a deterministic-ish spectral-energy reweighting through an untrained network. It's a flavor knob, not learned magic. Don't expect it to fix a bad adaptation; expect it to give you a different, sometimes punchier, interpretation of it.

The dials

beta and alpha work exactly as in the core node (band size and blend weight - start at the 0.09 / 0.5 defaults and move one at a time). The two new ones:

  • attention_strength (0–1, default 0.5) - blends between the raw adaptation (0, which makes this node behave like plain FUDA) and the full FTCA-recalibrated output (1).
  • reduction (1–16, default 4) - the channel reduction ratio inside the attention MLP. Higher means fewer parameters in that little network. This is the least interesting knob in the pack; leave it at 4 unless you're curious.

Output is adapted_image, an IMAGE tensor, ready for Preview, Save, or the next node downstream.

Install and gotchas

Same story as the rest of the pack: no dependencies beyond what ComfyUI already ships, no model files. Install via ComfyUI Manager (search FUDA) or:

cd ComfyUI/custom_nodes
git clone https://github.com/bemoregt/ComfyUI_FUDA

Restart and the three nodes land under the FUDA category. The usual caveats apply: it's a brand-new, single-commit pack with zero community history, so there are no battle-tested failure reports yet - keep expectations reasonable. Feed it decoded IMAGE tensors, not latents. If the output looks off, the first thing to check is beta (too high pulls in texture and invites artifacts) and alpha (0 = no change). And if attention_strength at 0.5 feels like it's doing nothing, try 1.0 - or don't, because sometimes the honest answer is that plain FUDA was already doing the job.

CategoryFUDA

Inputs (6)

NameTypeDefaultDescription
source_imageIMAGE
reference_imageIMAGE
betaFLOAT0.0900.001–0.5
alphaFLOAT0.500–1
attention_strengthFLOAT0.500–10 = no attention, 1 = full FTCA recalibration.
reductionINT41–16Channel reduction ratio for attention MLP.

Outputs (1)

NameTypeDescription
adapted_imageIMAGE