Multi-Band Latent Apply
An EQ for your latent
- latent
- region_mask
- LATENT
Different from everything else in WAS Affine, Multi-Band Latent Apply doesn't use pattern masks at all. Instead of "apply scale/bias where a mask says so," it splits the latent into frequency bands and applies gains per band. Think of it as an equalizer for the latent: boost the high band for perceived detail, cut the low band to clean up flat areas, and use a region mask to do different EQ in the subject versus the background.
How it works
The node takes the FFT of the latent, builds a radial gain map with three bands separated by two crossover frequencies, multiplies the spectrum by the gains, and transforms back. The knobs:
- gain_low / gain_mid / gain_high - per-band gains, all default 1.0 (no-op).
- band_xover_low / band_xover_high - where the bands split, as normalized frequency radius. Defaults 0.25 and 0.6.
- region_mask (optional IMAGE) - with region_gain_low/mid/high as alternate gains inside the masked area. Feather with feather_px (in latent pixels) so the boundary doesn't cut hard.
- normalize_energy - rescale the output to the original standard deviation after shaping, so you change texture without changing brightness.
- frames_per_batch - for 5D video latents, process frames in chunks (0 = all) to keep memory sane; 4D image latents are auto-detected.
Output: LATENT.
Why reach for it
Two situations stand out. Video: per-frame, a single static gain map can clean or enhance every frame consistently - no mask regeneration needed, unlike the pattern nodes. And region work: boost high-frequency detail only inside a mask (the subject) while cutting it in the background, which is a cheaper, more controllable cousin of "detail everywhere + smooth skies" than fiddling with content-aware masks. Because it lives in the FFT of the latent, effects are subtler than pixel-space sharpening - you're shaping the noise structure, not drawing edges.
Installing
Part of WAS Affine by WASasquatch. ComfyUI Manager → Install Custom Nodes → search "WAS Affine" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was_affine
Restart ComfyUI. ComfyUI 1.0.0+, torch and numpy.
Common issues
All gains default to 1.0, so if you plug it in and change nothing, it does nothing - that's the intended safe state, not a bug. If you boost the high band hard, you can push the latent out of its comfortable range and get speckle or color shifts; normalize_energy is the first thing to flip on when that happens. And remember the crossovers are normalized frequency radius, so moving band_xover_low above band_xover_high inverts your bands - an easy silent mistake if you're dialing both at once.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | Existing latent to shape. Shape is auto-detected (4D image or 5D video). | |
| frames_per_batchopt | INT | 00–128 | For 5D video latents, process this many frames per batch (0 = all). |
| enable_multibandopt | BOOLEAN | true | Enable frequency-domain shaping of low/mid/high bands. |
| gain_lowopt | FLOAT | 1.000–4 | Low band gain. |
| gain_midopt | FLOAT | 1.000–4 | Mid band gain. |
| gain_highopt | FLOAT | 1.000–4 | High band gain. |
| band_xover_lowopt | FLOAT | 0.250–1 | Low/Mid crossover (normalized radius). |
| band_xover_highopt | FLOAT | 0.600–1 | Mid/High crossover (normalized radius). |
| region_maskopt | IMAGE | Optional mask [M,H,W,C] to apply alternate band gains inside the region. | |
| region_gain_lowopt | FLOAT | 1.000–4 | Alternate low-band gain in region. |
| region_gain_midopt | FLOAT | 1.000–4 | Alternate mid-band gain in region. |
| region_gain_highopt | FLOAT | 1.000–4 | Alternate high-band gain in region. |
| feather_pxopt | INT | 00–64 | Feather radius (latent pixels) for mask blending. |
| normalize_energyopt | BOOLEAN | false | Normalize output to original std after shaping. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |