Latent Power Spectrum
The two numbers SPEED Sampler schedules by
- samples
- amplitude
- beta
- summary
If you've never heard of SPEED Sampler, you can skip this node and not miss it. If you're using one - the WAS suite's sampler that schedules its own resolution changes mid-sample - then Latent Power Spectrum is the instrument you calibrate it with. It measures the two properties of a latent that SPEED's scheduling is built on: how much signal it carries (amplitude) and how fast that signal falls off toward high frequencies (beta).
The mechanism is a power-law fit. Take a latent, run a Fourier transform over its spatial grid, average the power at each radius, and you get a radial power spectrum that approximately follows P(w) = A · w⁻ᵝ. That's a classic, near-universal description of natural images: lots of low-frequency energy, falling off as frequency rises, and how fast it falls is beta (typically around 2 for photographic content). This node fits that line and hands you A and β.
What you feed it matters more than any widget. samples should be a latent encoded from ordinary content through the model's own VAE - not noise, not a sample in progress. The tooltip is explicit: a batch or a whole video measures more steadily than a single frame. And the outputs split by how trustworthy they are: beta is steady across content and directly comparable to a published figure, while amplitude moves with the content and runs larger than published values - so when you tune SPEED's delta against this node, tune it against what this node reports, not against a number you read somewhere.
Two inputs trim the fit band. low (default 0.05) and high (default 0.5) are fractions of the highest frequency the latent can hold, marking where the fit starts and stops. The reasoning is in the tooltips and it's good reasoning: the very lowest frequencies rest on a handful of coefficients and don't follow the power law (skip them), and near the Nyquist limit the spectrum rolls off for reasons that belong to the encoder rather than the content (skip that too). Leave both at default unless you know the model misbehaves at the ends. The node raises an error if the band is empty, inverted, or the latent is too small to fit a line through - so a tiny latent and an aggressive band will tell you off rather than silently lying.
There's a summary string output as well - the fitted pair as text, for a note or a filename. The practical rhythm: encode a few representative images for the model you're sampling, wire this node in, and average the numbers over several frames rather than trusting a single measurement - the falloff settles quickly, but amplitude "moves with the content and wants more of it," as the node's own description puts it.
This is a niche, measurement-flavoured node in a suite full of them, and that's fine - it exists because SPEED Sampler's whole premise is adapting resolution to what the content actually contains, and you can't adapt to a number you never measured. If you're not running SPEED, ignore it; if you are, it's the calibration tool the sampler expects you to have.
Install
Ships in WAS Node Suite v3. ComfyUI Manager, search "WAS Node Suite", or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
Restart after. Needs ComfyUI 0.14.0+ and Python 3.10+. No pip packages, no model downloads - the FFT fit runs on ComfyUI's torch stack (v3 carries none of the v2 pack's install baggage).
Common issues
- Node errors on a small latent. The fit band is empty or the latent is too small to fit a line. Feed a bigger latent or widen
low/high. - Amplitude never matches a published figure. Expected - this node's amplitude runs larger and content-dependent. Tune SPEED's
deltaagainst your own measurement. - A single frame gives a jumpy reading. Average over a batch or video, as the tooltip advises.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | A latent from the model being sampled, encoded from ordinary content rather than noise. A batch or a whole video measures more steadily than a single frame. | |
| low | FLOAT | 0.050–0.9 | Where to start fitting, as a fraction of the highest frequency the latent can hold. The lowest frequencies rest on a handful of coefficients and do not follow the power law, so they are skipped. |
| high | FLOAT | 0.500.1–1 | Where to stop fitting, as a fraction of the highest frequency. Near that limit the spectrum rolls off for reasons to do with the encoder rather than the content. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| amplitude | FLOAT | The A of P(w) = A * w ** -beta. Wire to SPEED Sampler, and tune its delta against this rather than against a published figure: this runs larger, and it moves with the content measured. |
| beta | FLOAT | How fast the spectrum falls away. Steady across content and directly comparable to a published figure, unlike the amplitude. |
| summary | STRING | The fitted pair as text, for a note or a filename. |