We're actively working on improvements and new features. To stay informed:
📌 Track Active Development: Visit Issues to see active development, report bugs, and request new features
💬 Join the Community: Learn from others, share your workflows, and get help in the Discussions
🔮 Next Model Survey: We're looking for community input on the next open-source super-powerful generic restoration model. Share your suggestions in Issue #164
🚀 Updates
2025.11.09 - Version 2.5.5
💾 Memory: Fixed RAM leak for long videos - On-demand reconstruction with lightweight batch indices instead of storing full transformed videos, fixed release_tensor_memory to handle CPU/CUDA/MPS consistently, and refactored batch processing helpers
2025.11.08 - Version 2.5.4
🎨 Fix: AdaIN color correction - Replace .view() with .reshape() to handle non-contiguous tensors after spatial padding, resolving "view size is not compatible with input tensor's size and stride" error
🔴 Fix: AMD ROCm compatibility - Add cuDNN availability check in Conv3d workaround to prevent "ATen not compiled with cuDNN support" error on ROCm systems (AMD GPUs on Windows/Linux)
2025.11.08 - Version 2.5.3
🍎 Fix: Apple Silicon MPS device handling - Corrected MPS device enumeration to use "mps" instead of "mps:0", resolving invalid device errors on M-series Macs
🪟 Fix: torch.mps AttributeError on Windows - Add defensive checks for torch.mps.is_available() to handle PyTorch versions where the method doesn't exist on non-Mac platforms
2025.11.07 - Version 2.5.0 🎉
⚠️ BREAKING CHANGE: This is a major update requiring workflow recreation. All nodes and CLI parameters have been redesigned for better usability and consistency. Watch the latest video from AInVFX for a deep dive and check out the usage section.
📦 Official Release: Now available on main branch with ComfyUI Manager support for easy installation and automatic version tracking. Updated dependencies and local imports prevent conflicts with other ComfyUI custom nodes.
🎨 ComfyUI Improvements
Four-Node Modular Architecture: Split into dedicated nodes for DiT model, VAE model, torch.compile settings, and main upscaler for granular control
Global Model Cache: Models now shared across multiple upscaler instances with automatic config updates - no more redundant loading
ComfyUI V3 Migration: Full compatibility with ComfyUI V3 stateless node design
RGBA Support: Native alpha channel processing with edge-guided upscaling for clean transparency
Improved Memory Management: Streaming architecture prevents VRAM spikes regardless of video length
Flexible Resolution Support: Upscale to any resolution divisible by 2 with lossless padding approach (replaced restrictive cropping)
Enhanced Parameters: Added uniform_batch_size, temporal_overlap, prepend_frames, and max_resolution for better control
🖥️ CLI Enhancements
Batch Directory Processing: Process entire folders of videos/images with model caching for efficiency
Single Image Support: Direct image upscaling without video conversion
Smart Output Detection: Auto-detects output format (MP4/PNG) based on input type
Enhanced Multi-GPU: Improved workload distribution with temporal overlap blending
Unified Parameters: CLI and ComfyUI now use identical parameter names for consistency
🎯 Unified Debug System: New structured logging with categories, timers, and memory tracking. enable_debug now available on main node
⚡ Smart FP8 Optimization: FP8 models now keep native FP8 storage, converting to BFloat16 only for arithmetic - faster and more memory efficient than FP16
📦 Model Registry: Multi-repo support (numz/ & AInVFX/), auto-discovery of user models, added mixed FP8 variants to fix 7B artifacts
💾 Model Caching: cache_model moved to main node, fixed memory leaks with proper RoPE/wrapper cleanup
🚀 Performance: Better memory management with torch.cuda.ipc_collect(), improved RoPE handling
2025.07.17
🛠️ Add 7B sharp Models: add 2 new 7B models with sharpen output
2025.07.11
🎬 Complete tutorial released: Adrien from AInVFX created an in-depth ComfyUI SeedVR2 guide covering everything from basic setup to advanced BlockSwap techniques for running on consumer GPUs. Perfect for understanding memory optimization and upscaling of image sequences with alpha channel! Watch the tutorial
2025.09.07
🛠️ Blockswap Integration: Big thanks to Adrien Toupet from AInVFX for this :), useful for low VRAM users (see usage section)
✅ Refactored the code for better sharing with the community, feel free to propose pull requests
🛠️ Removed flash attention dependency (thanks to luke2642 !!)
2025.06.24
🚀 Speed up the process until x4
2025.06.22
💪 FP8 compatibility !
🚀 Speed Up all Process
🚀 less VRAM consumption (Stay high, batch_size=1 for RTX4090 max, I'm trying to fix that)
🛠️ Better benchmark coming soon
2025.06.20
🛠️ Initial push
🎯 Features
Core Capabilities
High-Quality Diffusion-Based Upscaling: One-step diffusion model for video and image enhancement
Temporal Consistency: Maintains coherence across video frames with configurable batch processing
Multi-Format Support: Handles RGB and RGBA (alpha channel) for both videos and images
Any Video Length: Suitable for any video length
Model Support
Multiple Model Variants: 3B and 7B parameter models with different precision options
FP16, FP8, and GGUF Quantization: Choose between full precision (FP16), mixed precision (FP8), or heavily quantized GGUF models for different VRAM requirements
Automatic Model Downloads: Models are automatically downloaded from HuggingFace on first use
Memory Optimization
BlockSwap Technology: Dynamically swap transformer blocks between GPU and CPU memory to run large models on limited VRAM
VAE Tiling: Process large resolutions with tiled encoding/decoding to reduce VRAM usage
Intelligent Offloading: Offload models and intermediate tensors to CPU or secondary GPUs between processing phases
GGUF Quantization Support: Run models with 4-bit or 8-bit quantization for extreme VRAM savings
Performance Features
torch.compile Integration: Optional 20-40% DiT speedup and 15-25% VAE speedup with PyTorch 2.0+ compilation
Multi-GPU CLI: Distribute workload across multiple GPUs with automatic temporal overlap blending
Model Caching: Keep models loaded in memory for faster batch processing
Flexible Attention Backends: Choose between PyTorch SDPA (stable, always available) or Flash Attention 2 (faster on supported hardware)
Quality Control
Advanced Color Correction: Five methods including LAB (recommended for highest fidelity), wavelet, wavelet adaptive, HSV, and AdaIN
Noise Injection Controls: Fine-tune input and latent noise scales for artifact reduction at high resolutions
Configurable Resolution Limits: Set target and maximum resolutions with automatic aspect ratio preservation
Workflow Features
ComfyUI Integration: Four dedicated nodes for complete control over the upscaling pipeline
Standalone CLI: Command-line interface for batch processing and automation
Debug Logging: Comprehensive debug mode with memory tracking, timing information, and processing details
Progress Reporting: Real-time progress updates during processing
🔧 Requirements
Hardware
With the current optimizations (tiling, BlockSwap, GGUF quantization), SeedVR2 can run on a wide range of hardware:
Minimal VRAM (8GB or less): Use GGUF Q4_K_M models with BlockSwap and VAE tiling enabled
Moderate VRAM (12-16GB): Use FP8 models with BlockSwap or VAE tiling as needed
High VRAM (24GB+): Use FP16 models for best quality and speed without memory optimizations
Software
ComfyUI: Latest version recommended
Python: 3.12+ (Python 3.12 and 3.13 tested and recommended)
PyTorch: 2.0+ for torch.compile support (optional but recommended)
Triton: Required for torch.compile with inductor backend (optional)
Flash Attention 2: Provides faster attention computation on supported hardware (optional, falls back to PyTorch SDPA)
Complete walkthrough of version 2.5 by Adrien from AInVFX, covering the new 4-node architecture, GGUF support, memory optimizations, and production workflows:
Note: This tutorial covers the previous single-node architecture. While the UI has changed significantly in v2.5, the core concepts about BlockSwap and memory management remain valuable.
Node Setup
SeedVR2 uses a modular node architecture with four specialized nodes:
1. SeedVR2 (Down)Load DiT Model
SeedVR2 (Down)Load DiT Model
Configure the DiT (Diffusion Transformer) model for video upscaling.
torch_compile_args: Connect to SeedVR2 Torch Compile Settings node for 20-40% speedup
BlockSwap Explained:
BlockSwap enables running large models on GPUs with limited VRAM by dynamically swapping transformer blocks between GPU and CPU memory during inference. Here's how it works:
What it does: Keeps only the currently-needed transformer blocks on the GPU, while storing the rest on CPU or another device
When to use it: When you get OOM (Out of Memory) errors during the upscaling phase
How to configure:
Set offload_device to cpu or another GPU
Start with blocks_to_swap=16 (half the blocks)
If still getting OOM, increase to 24 or 32 (3B) / 36 (7B)
Enable swap_io_components for maximum VRAM savings
If you have plenty of VRAM, decrease or set to 0 for faster processing
Example Configuration for Low VRAM (8GB):
model: seedvr2_ema_3b-Q8_0.gguf
device: cuda:0
offload_device: cpu
blocks_to_swap: 32
swap_io_components: True
2. SeedVR2 (Down)Load VAE Model
SeedVR2 (Down)Load VAE Model
Configure the VAE (Variational Autoencoder) model for encoding/decoding video frames.
Parameters:
model: VAE model selection
ema_vae_fp16.safetensors: Default and recommended
device: GPU device for VAE inference (e.g., cuda:0)
offload_device: Device to offload VAE model when not actively processing
none: Keep model on inference device (default, fastest)
cpu: Offload to system RAM (reduces VRAM)
cuda:X: Offload to another GPU (good balance if available)
cache_model: Keep VAE model loaded on offload_device between workflow runs
Requires offload_device to be set
encode_tiled: Enable tiled encoding to reduce VRAM usage during encoding phase
Enable if you see OOM errors during the "Encoding" phase in debug logs
encode_tile_size: Encoding tile size in pixels (default: 1024)
Applied to both height and width
Lower values reduce VRAM but may increase processing time
encode_tile_overlap: Encoding tile overlap in pixels (default: 128)
Reduces visible seams between tiles
decode_tiled: Enable tiled decoding to reduce VRAM usage during decoding phase
Enable if you see OOM errors during the "Decoding" phase in debug logs
decode_tile_size: Decoding tile size in pixels (default: 1024)
decode_tile_overlap: Decoding tile overlap in pixels (default: 128)
torch_compile_args: Connect to SeedVR2 Torch Compile Settings node for 15-25% speedup
VAE Tiling Explained:
VAE tiling processes large resolutions in smaller tiles to reduce VRAM requirements. Here's how to use it:
Run without tiling first and monitor the debug logs (enable enable_debug on main node)
If OOM during "Encoding" phase:
Enable encode_tiled
If still OOM, reduce encode_tile_size (try 768, 512, etc.)
If OOM during "Decoding" phase:
Enable decode_tiled
If still OOM, reduce decode_tile_size
Adjust overlap (default 128) if you see visible seams in output (increase it) or processing times are too slow (decrease it).
Example Configuration for High Resolution (4K):
encode_tiled: True
encode_tile_size: 1024
encode_tile_overlap: 128
decode_tiled: True
decode_tile_size: 1024
decode_tile_overlap: 128
3. SeedVR2 Torch Compile Settings (Optional)
SeedVR2 Torch Compile Settings
Configure torch.compile optimization for 20-40% DiT speedup and 15-25% VAE speedup.
Requirements:
PyTorch 2.0+
Triton (for inductor backend)
Parameters:
backend: Compilation backend
inductor: Full optimization with Triton kernel generation and fusion (recommended)
cudagraphs: Lightweight wrapper using CUDA graphs, no kernel optimization
mode: Optimization level (compilation time vs runtime performance)
default: Fast compilation with good speedup (recommended for development)
reduce-overhead: Lower overhead, optimized for smaller models
max-autotune: Slowest compilation, best runtime performance (recommended for production)
max-autotune-no-cudagraphs: Like max-autotune but without CUDA graphs
fullgraph: Compile entire model as single graph without breaks
False: Allow graph breaks for better compatibility (default, recommended)
True: Enforce no breaks for maximum optimization (may fail with dynamic shapes)
dynamic: Handle varying input shapes without recompilation
False: Specialize for exact input shapes (default)
True: Create dynamic kernels that adapt to shape variations (enable when processing different resolutions or batch sizes)
dynamo_cache_size_limit: Max cached compiled versions per function (default: 64)
Higher = more memory, lower = more recompilation
dynamo_recompile_limit: Max recompilation attempts before falling back to eager mode (default: 128)
Safety limit to prevent compilation loops
Usage:
Add this node to your workflow
Connect its output to the torch_compile_args input of DiT and/or VAE loader nodes
First run will be slow (compilation), subsequent runs will be much faster
When to use:
torch.compile only makes sense when processing multiple batches, long videos, or many tiles
For single images or short clips, the compilation time outweighs the speed improvement
Best suited for batch processing workflows or long videos
Recommended Settings:
For development/testing: mode=default, backend=inductor, fullgraph=False
For production: mode=max-autotune, backend=inductor, fullgraph=False
4. SeedVR2 Video Upscaler (Main Node)
SeedVR2 Video Upscaler
Main upscaling node that processes video frames using DiT and VAE models.
Required Inputs:
image: Input video frames as image batch (RGB or RGBA format)
dit: DiT model configuration from SeedVR2 (Down)Load DiT Model node
vae: VAE model configuration from SeedVR2 (Down)Load VAE Model node
Parameters:
seed: Random seed for reproducible generation (default: 42)
Same seed with same inputs produces identical output
resolution: Target resolution for shortest edge in pixels (default: 1080)
Maintains aspect ratio automatically
max_resolution: Maximum resolution for any edge (default: 0 = no limit)
Automatically scales down if exceeded to prevent OOM
batch_size: Frames per batch (default: 5)
CRITICAL REQUIREMENT: Must follow the 4n+1 formula (1, 5, 9, 13, 17, 21, 25, ...)
Why this matters: The model uses these frames for temporal consistency calculations
Minimum 5 for temporal consistency: Use 1 only for single images or when temporal consistency isn't needed
Match shot length ideally: For best results, set batch_size to match your shot length (e.g., batch_size=21 for a 20-frame shot)
VRAM impact: Higher batch_size = better quality and speed but requires more VRAM
If you get OOM with batch_size=5: Try optimization techniques first (model offloading, BlockSwap, GGUF models...) before reducing batch_size or input resolution, as these directly impact quality
uniform_batch_size (default: False)
Pads the final batch to match batch_size for uniform processing
Prevents temporal artifacts when the last batch is significantly smaller than others
Example: 45 frames with batch_size=33 creates [33, 33] instead of [33, 12]
Recommended when using large batch sizes and video length is not a multiple of batch_size
Increases VRAM usage slightly but ensures consistent temporal coherence across all batches
temporal_overlap: Overlapping frames between batches (default: 0)
Used for blending between batches to reduce temporal artifacts
Range: 0-16 frames
prepend_frames: Frames to prepend (default: 0)
Prepends reversed frames to reduce artifacts at video start
Automatically removed after processing
Range: 0-32 frames
color_correction: Color correction method (default: "wavelet")
lab: Full perceptual color matching with detail preservation (recommended for highest fidelity to original)
wavelet: Frequency-based natural colors, preserves details well
wavelet_adaptive: Wavelet base + targeted saturation correction
Shows memory usage, timing information, and processing details
Highly recommended for troubleshooting OOM issues
Output:
Upscaled video frames with color correction applied
Format (RGB/RGBA) matches input
Range [0, 1] normalized for ComfyUI compatibility
Typical Workflow Setup
Basic Workflow (High VRAM - 24GB+):
Load Video Frames
↓
SeedVR2 Load DiT Model
├─ model: seedvr2_ema_3b_fp16.safetensors
└─ device: cuda:0
↓
SeedVR2 Load VAE Model
├─ model: ema_vae_fp16.safetensors
└─ device: cuda:0
↓
SeedVR2 Video Upscaler
├─ batch_size: 21
└─ resolution: 1080
↓
Save Video/Frames
Low VRAM Workflow (8-12GB):
Load Video Frames
↓
SeedVR2 Load DiT Model
├─ model: seedvr2_ema_3b-Q8_0.gguf
├─ device: cuda:0
├─ offload_device: cpu
├─ blocks_to_swap: 32
└─ swap_io_components: True
↓
SeedVR2 Load VAE Model
├─ model: ema_vae_fp16.safetensors
├─ device: cuda:0
├─ encode_tiled: True
└─ decode_tiled: True
↓
SeedVR2 Video Upscaler
├─ batch_size: 5
└─ resolution: 720
↓
Save Video/Frames
High Performance Workflow (24GB+ with torch.compile):
Load Video Frames
↓
SeedVR2 Torch Compile Settings
├─ mode: max-autotune
└─ backend: inductor
↓
SeedVR2 Load DiT Model
├─ model: seedvr2_ema_7b_sharp_fp16.safetensors
├─ device: cuda:0
└─ torch_compile_args: connected
↓
SeedVR2 Load VAE Model
├─ model: ema_vae_fp16.safetensors
├─ device: cuda:0
└─ torch_compile_args: connected
↓
SeedVR2 Video Upscaler
├─ batch_size: 81
└─ resolution: 1080
↓
Save Video/Frames
🖥️ Run as Standalone (CLI)
The standalone CLI provides powerful batch processing capabilities with multi-GPU support and sophisticated optimization options.
Prerequisites
Choose the appropriate setup based on your installation:
Option 1: Already Have ComfyUI with SeedVR2 Installed
If you've already installed SeedVR2 as part of ComfyUI (via ComfyUI installation), you can use the CLI directly:
bash
1# Navigate to your ComfyUI directory2cd ComfyUI
34# Run the CLI using standalone Python (display help message)5# Windows:6.venv\Scripts\python.exe custom_nodes\seedvr2_videoupscaler\inference_cli.py --help
7# Linux/macOS:8.venv/bin/python custom_nodes/seedvr2_videoupscaler/inference_cli.py --help
--compile_fullgraph: Compile entire model as single graph (faster but less flexible) (default: False)
--compile_dynamic: Handle varying input shapes without recompilation (default: False)
--compile_dynamo_cache_size_limit: Max cached compiled versions per function (default: 64)
--compile_dynamo_recompile_limit: Max recompilation attempts before fallback (default: 128)
Model Caching (batch processing):
--cache_dit: Cache DiT model between files (single GPU only, speeds up directory processing)
--cache_vae: Cache VAE model between files (single GPU only, speeds up directory processing)
Multi-GPU:
--cuda_device: CUDA device id(s). Single id (e.g., '0') or comma-separated list '0,1' for multi-GPU
Debugging:
--debug: Enable verbose debug logging
Multi-GPU Processing Explained
The CLI's multi-GPU mode automatically distributes the workload across multiple GPUs with intelligent temporal overlap handling:
How it works:
Video is split into chunks, one per GPU
Each GPU processes its chunk independently
Chunks overlap by --temporal_overlap frames
Results are blended together seamlessly using the overlap region
Example for 2 GPUs with temporal_overlap=4:
GPU 0: Frames 0-50 (includes 4 overlap frames at end)
GPU 1: Frames 46-100 (includes 4 overlap frames at beginning)
Result: Frames 0-100 with smooth transition at frame 48
Best practices:
Set --temporal_overlap to 2-8 frames for smooth blending
Higher overlap = smoother transitions but more redundant processing
Use --prepend_frames to reduce artifacts at video start
batch_size should divide evenly into chunk sizes for best results
⚠️ Limitations
Model Limitations
Batch Size Constraint: The model requires batch_size to follow the 4n+1 formula (1, 5, 9, 13, 17, 21, 25, ...) due to temporal consistency architecture. All frames in a batch are processed together for temporal coherence, then batches can be blended using temporal_overlap. Ideally, set batch_size to match your shot length for optimal quality.
Performance Considerations
VAE Bottleneck: Even with optimized DiT upscaling (BlockSwap, GGUF, torch.compile), the VAE encoding/decoding stages can be the bottleneck, especially for high resolutions. The VAE is slow. Use large batch_size to mitigate this.
VRAM Usage: While the integration now supports low VRAM systems (8GB or less with proper optimization), VRAM usage varies based on:
Input/output resolution (larger = more VRAM)
Batch size (higher = more VRAM but better temporal consistency and speed)