SeedVR2 VAE Decode Distributed (Ray)
Decode Massive SeedVR2 Latents Across Multiple GPUs
- ray_actors
- samples
- IMAGE
SeedVR2 is ByteDance's one-step video restoration model, and it became famous for the wrong reason: as an image upscaler it's arguably the best thing in the ecosystem, adding detail without re-inventing the subject. The catch is that it's a heavy VAE-style model, and decoding big latents through it OOMs single cards. RaySeedVR2VAEDecodeDistributed is Raylight's answer: it tiles the spatial dimensions and decodes across your Ray workers, keeping the full temporal sequence on a single worker so the video doesn't come apart at the seams.
How it works, from the source: every Ray worker loads the SeedVR2 VAE (ray_vae_loader), then each worker decodes a spatial partial of the latent (ray_seedvr2_vae_decode_partial, with the job split by rank and world size), and finally the partials are recombined and finalized on worker zero. The tooltips are unusually honest about the design: tile_size is "spatial tile size in output pixels" and the explicit note is "the complete temporal sequence stays on one worker" - so this node scales across GPUs by splitting frames' spatial area, not by splitting time.
The inputs that matter:
samples- the SeedVR2 latent to decode.vae_name- pick the SeedVR2 VAE from yourComfyUI/models/vaefolder. No file there, no dropdown options; this is the one model you have to download yourself. (ByteDance ships SeedVR2 under Apache 2.0, which is also why the KB's upscaling essay recommends it even for commercial work.)tile_size(default 512) - spatial tile size in output pixels. Larger tiles = fewer seams but more VRAM per worker; this is your main VRAM knob.overlap(default 64) - how much neighboring tiles overlap, so seams blend instead of slicing. If you see tile boundaries in the decoded output, raise this.
Output is a plain IMAGE, ready for a preview or save node.
Where it fits
The natural pairing is the pack's own video upscaling flow: generate a latent in Raylight, then decode it with this node instead of the normal VAE decode when you're using a SeedVR2-based restoration path. The KB's upscaling essay is unambiguous that SeedVR2 is the incumbent detail-adder - on clean images use it straight, on genuinely damaged sources pair it with something like Qwen-Edit - and this node is how you run it big without a 24GB card.
Install
Standard raylight, plus one model file:
cd ComfyUI/custom_nodes
git clone https://github.com/komikndr/raylight
cd raylight
pip install -r requirements.txt
Then put the SeedVR2 VAE into ComfyUI/models/vae/. Restart, or install "raylight" via ComfyUI Manager.
Gotchas
- No model file = no dropdown. The
vae_nameenum is populated from your vae folder at load time; if the field is empty, that's a download problem, not a node problem. - It needs at least one Ray worker and will raise a
ValueErrorifray_actorshas none - make sureRay Init Actoris upstream and healthy. - Tiling is spatial-only. Very long temporal sequences won't get the memory relief you might expect from "multi-GPU VAE decode," because time stays on one worker by design. That's a correctness choice, not an oversight - splitting time across workers is how you get temporal seams.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| ray_actors | RAY_ACTORS | Ray Actor to submit the model into | |
| samples | LATENT | SeedVR2 latent samples to decode. | |
| vae_name | COMBO | Name of the SeedVR2 VAE model. | |
| tile_size | INT | 51264–4096 | Spatial tile size in output pixels. The complete temporal sequence stays on one worker. |
| overlap | INT | 640–4096 | Spatial overlap in output pixels. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |