Extensions/ComfyUI-SeedVR2-V100
ComfyUI Extension

ComfyUI-SeedVR2-V100

Run SeedVR2 video upscalers on Tesla V100 (Volta) — fixes the fully-black-output fp16 bug with an FP16Safe-style txt-residual patch.

By duckyman-ai·Created a day ago·Updated a day ago· 0
duckyman-ai/ComfyUI-SeedVR2-V100
Nodes—
On cloudLocal install
Stars0
Updateda day ago
Readme

ComfyUI-SeedVR2-V100

Run ByteDance SeedVR2 video/image upscalers on Tesla V100 (Volta, sm_70) — fixing the fully-black-output problem that makes SeedVR2 checkpoints unusable on Volta cards.

Validated on ComfyUI 0.39.0 / torch 2.9.1+cu126 / 2× Tesla V100-SXM2-32GB.

The problem

On V100, SeedVR2 checkpoints (seedvr2_7b_fp8_e4m3fn, seedvr2_7b_int8_convrot, …) complete without any error and produce a completely black video (every frame YAVG≈16). The same workflow works fine on modern GPUs.

Root cause (diagnosed empirically)

Layer-by-layer tracing of the NaDiT forward in fp16:

  1. The txt residual register accumulates values above the fp16 max (65,504). The first non-finite values appear inside block 3 of the transformer.
  2. The fused rms_adaln kernel turns INF → NaN at blocks.4.ada.txt.
  3. NaN propagates through every subsequent block → the VAE decodes NaN → the encoder clamps it to black.

Everything else is healthy on Volta: SDPA (mem-efficient backend) matches fp32 math to ~0.05%, windowed var-attention is exact, VAE encode/decode are clean. Only the txt residual overflows — the same class of bug that MiniMax-H3 has on V100 (which ComfyUI-MiniMaxH3-FP16Safe fixes for that model).

The fix

Two loader nodes (drop-in replacements for UNETLoader + you can delete any FP16Safe wrapper):

⭐ SeedVR2 Loader (V100 fp16-safe) — recommended

fp16 weights (15.7 GB — fits a 32 GB card with room for activations) plus a ~30-line patch of NaMMSRTransformerBlock.forward:

  • the txt residual register is kept in fp32 (tiny: ~122 tokens × 3072),
  • when it enters the RMSNorms it is prescaled by a power of two so every fp16 value stays finite. RMSNorm is scale-invariant — norm(x·s) = norm(x) — so the math is unchanged.

Validation vs a full-fp32 run: 0 NaN, cosine similarity 0.999, visually identical output.

SeedVR2 Loader (V100 fp32) — fallback

Forces fp32 compute (model_options={"dtype": float32}). Bulletproof but the 7B model takes ~28 GB → clips longer than ~3-4 s at 0.4 MP need SeedVR2TemporalChunk.

Both loaders also keep the SeedVR2 VAE causal caches on the GPU instead of host RAM (+6% decode speed; RAM-rich hosts otherwise pay PCIe round-trips on every temporal slice).

Install

ComfyUI-Manager: search "SeedVR2 V100" (once listed in the registry).

Manual:

cd ~/ComfyUI/custom_nodes
git clone https://github.com/duckyman-ai/ComfyUI-SeedVR2-V100.git
# restart ComfyUI

SeedVR2 Loader (V100 fp16-safe) node

Usage

  1. Replace UNETLoader (and any FP16Safe node) in the official SeedVR2 workflow with SeedVR2 Loader (V100 fp16-safe) — MODEL output goes straight into the KSampler.
  2. Short clips (≤ ~4 s at 0.4 MP): no chunking needed. Longer clips: enable the TemporalChunk/Merge switches.
  3. Upscale factor lives in the Resize node before SeedVR2 (×2 is the model's design sweet spot; ~×2.2 for 1080×1920 from 480×864 works well).

Benchmarks (Tesla V100-SXM2-32GB, 480×864 ×192f → 960×1728, warm model)

| Path | Result | Time | |---|---|---| | Stock fp8/fp16 loader | black video | ~14 min | | fp32 loader + TemporalChunk | correct | 18:31 | | fp16-safe loader | correct | 9:15 (steady state) |

Known limits / notes

  • fp8 compute does not exist on sm_70; fp8 checkpoints are dequantized to fp16 at load (that is what this plugin fixes the numerics of).
  • int8_convrot checkpoints should be avoided on Volta (they OOM easily; use the fp8_e4m3fn file).
  • The block patch is class-scoped to NaMMSRTransformerBlock (SeedVR2 only) and is a no-op for fp32 models, so other workflows are unaffected.
  • VAE decode (~7 min of the 9) is conv3d-bound on Volta — that is the hardware, not a bug. Shorter clips / lower upscale factors scale accordingly.

License

MIT