ComfyUI Node

Null Test (Full)

Align, gain-match, subtract, measure, and plot in a single ComfyUI node

By lucasgattas·Created 12 months ago·Updated 7 months ago· 60
Null Test (Full)
  • audio_ref
  • audio_proc
  • audio_proc_aligned_matched
  • audio_null
  • delay_ms
  • gain_db
  • metrics
  • image_waveforms
  • image_spectrograms
  • image_diffspec
align_max_shift_ms200
align_method
fractionaltrue
fir_len64
match_mode
least_squares_scalefalse
compute_corrtrue
compute_null_rmstrue
compute_null_lufstrue
compute_lsdtrue
compute_hf_residualfalse
draw_waveformstrue
draw_spectrogramstrue
draw_diffspectrue
n_fft2048
hop512

This is the node the Egregora pack is really building toward. Everything else - FlashSR, Fat Llama, the denoisers, the codecs - is a way to change audio. This node is how you find out whether the change was good. Feed it an original and a processed version of the same track, and it runs the entire null-test pipeline in one go: time-align (GCC-PHAT), gain-match (LUFS-I or RMS), subtract to get the residual, compute a pile of metrics, and draw the plots. Eight outputs, one click.

If you're new to this pack, this is where to start the verification workflow. Rather than hand-wiring the standalone Align, Gain Match, Null Test, and Plotter nodes together - which is exactly what the Full node does internally, in that order - you get the whole chain in one box. The individual nodes exist so you can isolate a step when something looks wrong; the Full node exists so you don't have to.

How it works, stage by stage

  1. Align - GCC-PHAT cross-correlation finds the time offset between the processed file and the reference (align_max_shift_ms default 200 ms search range), with fractional sub-sample correction (fractional on, fir_len 64) because processors rarely delay by whole samples.
  2. Gain match - matches the aligned audio's level to the reference using match_mode (LUFS-I default or RMS), so the subtraction isn't polluted by a loudness difference.
  3. Null - inverts the matched audio and adds it to the reference. What's left is the residual: pure silence means transparent processing.
  4. Measure - computes whatever metrics you've enabled: corr_coef, null_rms_dbfs, null_lufs, lsd_mean_db / lsd_p95_db, and hf_residual_db (high-frequency residual, off by default - turn it on if you suspect top-end damage).
  5. Plot - renders waveforms, spectrograms, and the difference spectrogram as IMAGE outputs.

The inputs that matter

  • audio_ref / audio_proc - the two required inputs: original and processed.
  • match_mode - LUFS-I is the right default for musical content.
  • compute_hf_residual - flip on when you're evaluating a codec or a spectral enhancer and want to see high-band damage specifically.
  • n_fft / hop - STFT resolution for LSD and plots; defaults are fine.

The outputs

Eight of them, and each has a job: audio_proc_aligned_matched (the corrected processed audio - feed it into other analysis if you want), audio_null (the residual - listen to it, that's the real verdict), delay_ms and gain_db (how much the processor shifted timing and level), metrics (the DICT with everything measured), and the three plot images. If you only look at two things, make it audio_null and metrics.

The take

The trap with null tests is interpreting a nonzero residual as "bad." It isn't - every processor leaves a residual; the question is what it sounds and looks like. A denoiser's residual is the noise it removed (you want that). A codec's residual is its characteristic artifact. Learn to recognize what each of your enhancement nodes leaves behind, and you'll stop asking "does it sound better?" and start asking "is the cost worth it?" That's the whole point of this pack.

CategoryEgregora/Analysis

Inputs (18)

NameTypeDefaultDescription
audio_refAUDIO
audio_procAUDIO
align_max_shift_msoptINT2000–5000
align_methodoptCOMBO1 options: gcc-phat
fractionaloptBOOLEANtrue
fir_lenoptINT6416–256
match_modeoptCOMBO2 options: LUFS-I, RMS
least_squares_scaleoptBOOLEANfalse
compute_corroptBOOLEANtrue
compute_null_rmsoptBOOLEANtrue
compute_null_lufsoptBOOLEANtrue
compute_lsdoptBOOLEANtrue
compute_hf_residualoptBOOLEANfalse
draw_waveformsoptBOOLEANtrue
draw_spectrogramsoptBOOLEANtrue
draw_diffspecoptBOOLEANtrue
n_fftoptINT2048512–8192
hopoptINT51264–4096

Outputs (8)

NameTypeDescription
audio_proc_aligned_matchedAUDIO
audio_nullAUDIO
delay_msFLOAT
gain_dbFLOAT
metricsDICT
image_waveformsIMAGE
image_spectrogramsIMAGE
image_diffspecIMAGE