New "auto" option (now the default) on the Sampler's input_sr. detect_input_sr
finds the spectral cutoff cliff (steepest drop) and its dB confidence: effective
cutoff = that cliff if confident, else sr/2 — one rule that covers band-limited
(→ matched input_sr), full-band (→ 24000), and genuine low-rate files
(→ their rate). Rounds DOWN to the nearest supported Nyquist to avoid feeding
the model an empty band. Logs its decision. Falls back to 24000 when unsure.
Tests cover sharp 4/6/8/12 kHz cutoffs, full-band, genuine-8kHz, silence, stereo.
Verified end-to-end on the real model (8 kHz clip -> auto picks 16000).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Integer-valued combos break ComfyUI's arrow navigation: indexOf(value) fails
on the int/serialized-value mismatch, returns -1, and the widget snaps to
index 0 (8000) every click. Use string options ("8000".."24000"); the code
already does int(input_sr) everywhere, so behavior is unchanged. Updated the
example workflows' widgets_values to strings to match.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Reported as "darker", but a fixed-seed spectral A/B shows TF32 is tonally
neutral (centroid 564→565 Hz, HF>8k 0.00825→0.00833) — the perceived change
is the seed=0 random-noise confound, not TF32. Still, TF32 is only ~1.15x and
not bit-exact, so default it OFF for reference-fp32 output and let compile
(~2.1x, op fusion) be the headline speedup. apply_tf32 now also toggles
cuDNN conv-TF32 (PyTorch leaves it on by default), so off is genuinely fp32.
Docs updated with the seed-confound A/B guidance.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add two opt-in inference speedups to the Model Loader, validated to leave the
output perceptually identical (deviation at the fp32 rounding floor):
- tf32 (default on): TF32 matmul on Ampere+ (~1.15x).
- compile (opt-in): torch.compile the UNet (~2.1x). Stacks with TF32 to
~2.5x (measured 4.3s -> 1.7s on a 12s clip).
torch.compile needs a static shape (the model's adaptive-avg-pool can't trace
dynamic shapes), so the sampler pads every chunk to chunk_seconds — clips of
any length reuse one compiled graph (no per-length recompiles; verified an 8s
clip after a 12s clip ran in 0.9s with no recompile).
Researched + profiled first: CFG-batching, channel/chunk batching, and
channels_last gave ~0 gain because the GPU is already compute-bound at batch 1.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ComfyUI nodes for UniverSR (ICASSP 2026) — vocoder-free audio
super-resolution (8/12/16/24 kHz → 48 kHz) via flow matching.
- UniverSR Model Loader: presets auto-download to models/universr,
plus local dir / raw .pth (from_local) loading, with caching.
- UniverSR Super-Resolution: chunked overlap-add for long audio,
per-channel stereo, seed control with global-RNG isolation,
wet/dry blend, and an optional before/after spectrogram.
- Vendors the universr inference package under vendor/ (prefers an
installed copy); only extra dep beyond ComfyUI's stack is torchdiffeq.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>