ComfyUI-SeedVR2_VideoUpscaler Official release of for ComfyUI that enables high-quality video and image upscaling. Can run as too, see section. ## ๐ Quick Access - - - - - - - - - - - ## ๐ Future Releases We're actively working on improvements and new features. To stay informed: - : Visit to see active development, report bugs, and request new features - : Learn from others, share your workflows, and get help in the - : We're looking for community input on the next open-source super-powerful generic restoration model. Share your suggestions in ## ๐ Updates - ๐พ - 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 - ๐จ - Replace with to handle non-contiguous tensors after spatial padding, resolving "view size is not compatible with input tensor's size and stride" error - ๐ด - Add cuDNN availability check in Conv3d workaround to prevent "ATen not compiled with cuDNN support" error on ROCm systems (AMD GPUs on Windows/Linux) - ๐ - Corrected MPS device enumeration to use instead of , resolving invalid device errors on M-series Macs - ๐ช - Add defensive checks for to handle PyTorch versions where the method doesn't exist on non-Mac platforms ๐ โ ๏ธ : 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 for a deep dive and check out the section. : 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 - : Split into dedicated nodes for DiT model, VAE model, torch.compile settings, and main upscaler for granular control - : Models now shared across multiple upscaler instances with automatic config updates - no more redundant loading - : Full compatibility with ComfyUI V3 stateless node design - : Native alpha channel processing with edge-guided upscaling for clean transparency - : Streaming architecture prevents VRAM spikes regardless of video length - : Upscale to any resolution divisible by 2 with lossless padding approach (replaced restrictive cropping) - : Added , , , and for better control ### ๐ฅ๏ธ CLI Enhancements - : Process entire folders of videos/images with model caching for efficiency - : Direct image upscaling without video conversion - : Auto-detects output format (MP4/PNG) based on input type - : Improved workload distribution with temporal overlap blending - : CLI and ComfyUI now use identical parameter names for consistency - : Auto-display help, validation improvements, progress tracking, and cleaner output ### โก Performance & Optimization - : 20-40% DiT speedup and 15-25% VAE speedup with full graph compilation - : Adaptive memory clearing (5% threshold), separate I/O component handling, reduced overhead - : Tensor offload support for accumulation buffers, separate encode/decode configuration - : Eliminated unnecessary conversions, maintains bfloat16 precision throughout for speed and quality - : Replaced einops rearrange with native PyTorch ops for 2-5x faster transforms ### ๐ฏ Quality Improvements - : New perceptual color transfer method with superior color accuracy (now default) - : HSV saturation matching, wavelet adaptive, and hybrid approaches - : Seed-based reproducibility with phase-specific seeding strategy - : Hann window blending for smooth transitions between batches ### ๐พ Memory Management - : Independent device configuration for DiT, VAE, and tensors (CPU/GPU/none) - : Completes each phase (encodeโupscaleโdecodeโpostprocess) for all batches before moving to next, minimizing model swaps - : Phase-specific resource management with proper tensor memory release - : Per-phase memory monitoring with summary display ### ๐ง Technical Improvements - : Added full GGUF support for 4-bit/8-bit inference on low-VRAM systems - : Fixed VRAM leaks, torch.compile compatibility, non-persistent buffers - : Full MPS (Metal Performance Shaders) support for Apple Silicon Macs - : Conditional FSDP imports for PyTorch ROCm 7+ support - : Fixes PyTorch 2.9+ cuDNN memory bug (3x usage reduction) - : Graceful fallback to SDPA when flash-attn unavailable ### ๐ Code Quality - : Split monolithic files into focused modules (generation_phases, model_configuration, etc.) - : Extensive docstrings with type hints across all modules - : Early validation, clear error messages, installation instructions - : Unified indentation, better categorization, concise messages - ๐ฏ : New structured logging with categories, timers, and memory tracking. now available on main node - โก : FP8 models now keep native FP8 storage, converting to BFloat16 only for arithmetic - faster and more memory efficient than FP16 - ๐ฆ : Multi-repo support (numz/ & AInVFX/), auto-discovery of user models, added mixed FP8 variants to fix 7B artifacts - ๐พ : moved to main node, fixed memory leaks with proper RoPE/wrapper cleanup - ๐งน : New modular structure (, , ), removed legacy code - ๐ : Better memory management with , improved RoPE handling - ๐ ๏ธ Add 7B sharp Models: add 2 new 7B models with sharpen output - ๐ฌ Complete tutorial released: Adrien from 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! - ๐ ๏ธ Blockswap Integration: Big thanks to from for this :), useful for low VRAM users (see section) - ๐ ๏ธ Can run as with see - ๐ Speed Up the process and less VRAM used - ๐ ๏ธ Fixed memory leak on 3B models - โ Can now interrupt process if needed - โ Refactored the code for better sharing with the community, feel free to propose pull requests - ๐ ๏ธ Removed flash attention dependency (thanks to !!) - ๐ Speed up the process until x4 - ๐ช 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 - ๐ ๏ธ Initial push ## ๐ฏ Features ### Core Capabilities - : One-step diffusion model for video and image enhancement - : Maintains coherence across video frames with configurable batch processing - : Handles RGB and RGBA (alpha channel) for both videos and images - : Suitable for any video length ### Model Support - : 3B and 7B parameter models with different precision options - : Choose between full precision (FP16), mixed precision (FP8), or heavily quantized GGUF models for different VRAM requirements - : Models are automatically downloaded from HuggingFace on first use ### Memory Optimization - : Dynamically swap transformer blocks between GPU and CPU memory to run large models on limited VRAM - : Process large resolutions with tiled encoding/decoding to reduce VRAM usage - : Offload models and intermediate tensors to CPU or secondary GPUs between processing phases - : Run models with 4-bit or 8-bit quantization for extreme VRAM savings ### Performance Features - : Optional 20-40% DiT speedup and 15-25% VAE speedup with PyTorch 2.0+ compilation - : Distribute workload across multiple GPUs with automatic temporal overlap blending - : Keep models loaded in memory for faster batch processing - : Choose between PyTorch SDPA (stable, always available) or Flash Attention 2 (faster on supported hardware) ### Quality Control - : Five methods including LAB (recommended for highest fidelity), wavelet, wavelet adaptive, HSV, and AdaIN - : Fine-tune input and latent noise scales for artifact reduction at high resolutions - : Set target and maximum resolutions with automatic aspect ratio preservation ### Workflow Features - : Four dedicated nodes for complete control over the upscaling pipeline - : Command-line interface for batch processing and automation - **Debug...