
A memory-efficient implementation for upscaling videos in ComfyUI using non-diffusion upscaling models. This custom node is designed to handle large video frame sequences without memory bottlenecks.
This node brings the power of non-diffusion upscaling models like ESRGAN to video processing in ComfyUI. While these models have long been the gold standard for image upscaling, applying them to video has been challenging due to memory constraints. This implementation solves those challenges with smart memory management strategies.
Non-diffusion upscalers like ESRGAN (Enhanced Super-Resolution Generative Adversarial Network) and its variants offer significant advantages for video processing:
Unlike diffusion-based upscalers that generate entirely new content, non-diffusion models like ESRGAN focus on enhancing what’s already there, making them perfect for video where consistency between frames is critical.
This node works wonderfully with models from OpenModelDB, a community-driven database of specialized AI upscaling models. OpenModelDB hosts hundreds of models trained for specific purposes:
Simply download models from OpenModelDB and place them in your ComfyUI upscale_models folder to use them with this node.
cd ComfyUI/custom_nodes/
git clone https://github.com/ShmuelRonen/ComfyUI-VideoUpscale_WithModel
auto: Automatically selects the best strategy based on available VRAMkeep_loaded: Keeps model on GPU for maximum speed (uses most VRAM)load_unload_each_frame: Loads/unloads model between frames (balanced approach)cpu_only: Processes everything on CPU (minimal VRAM usage)This strategy keeps the upscale model on the GPU for the entire processing duration. It’s the fastest option but uses the most VRAM. Best for high-end GPUs with plenty of memory.
This balanced approach loads the model to GPU for processing each frame, then moves it back to CPU. It offers a good compromise between speed and memory usage, ideal for mid-range GPUs.
This strategy processes everything on the CPU without using GPU memory. It’s the slowest option but uses minimal VRAM, making it suitable for systems with limited GPU resources or CPU-only setups.
Load Video → Video_Upscale_With_Model → Free_Video_Memory → VAE Decode → Save Video
Free_Video_Memory node can be placed after this node to ensure thorough memory cleanup.MIT License