Nodes/Reference-Based Video Colorization/Deep Exemplar Video Colorization (Original)
ComfyUI Node

Deep Exemplar Video Colorization (Original)

Deep Exemplar

By jonstreeter·Created 10 months ago·Updated 9 months ago· 25
Deep Exemplar Video Colorization (Original)
  • video_frames
  • reference_image
  • colorized_frames
  • performance_report
frame_propagatetrue
use_half_resolutiontrue
target_width768
target_height432
use_torch_compilefalse
use_sage_attentionfalse

DeepExColorVideoNode is the "original" half of the Reference-Based Video Colorization pack: the Deep Exemplar-based Video Colorization method from CVPR 2019, wrapped for ComfyUI. It's the older sibling to ColorMNet, and "older" here is a compliment - this is the technique that spent years as the go-to reference-based colorizer before the 2024 memory-based methods came along, and it still produces clean, temporally stable results with far less VRAM pressure than its modern stablemate.

Mechanically it's a textbook exemplar pipeline: a VGG19 network pulls multi-scale features from both your reference image and each grayscale frame, then a non-local attention network matches up "this patch of gray looks like this colored patch in the reference" and transfers the color. Two things keep it watchable as video. frame_propagate (on by default) feeds the previous frame's colorization forward to inform the current one, which is what stops colors from popping between frames. And a WLS (weighted least squares) filter smooths the result so you don't get that splotchy, patchy colorization look older methods are known for.

The inputs that matter

  • video_frames and reference_image - same roles as ColorMNet: grayscale batch and the color image that owns the palette.
  • frame_propagate - keep it on unless you're debugging flicker; it's the temporal-consistency backbone.
  • use_half_resolution - on by default, and it's a great default. The node processes at half resolution then upscales, roughly doubling speed with barely visible quality loss. Only flip it off for the final high-quality render.
  • target_width / target_height - output size, rounded to a multiple of 32 because VGG19 needs it.
  • use_torch_compile and use_sage_attention - the two speed knobs, and unlike on ColorMNet these actually do something. torch.compile compiles the VGG, non-local, and color networks; expect a 30-60 second warmup on the first frame, then a real 10-25% gain. SageAttention gives a bigger boost but needs pip install sageattention and a CUDA GPU, and it quietly falls back to standard attention if the package is missing.

Outputs are colorized_frames (IMAGE, into VHS Video Combine) and performance_report (STRING), the same benchmarking text blob as the rest of the pack.

Installing and running

Same pack, same install: ComfyUI Manager → search "Deep Exemplar Video Colorization", or

cd ComfyUI/custom_nodes/
git clone https://github.com/jonstreeter/ComfyUI-Reference-Based-Video-Colorization.git
cd ComfyUI-Reference-Based-Video-Colorization/
pip install -r requirements.txt

The Deep Exemplar checkpoints (the non-local net, color net, and VGG19 weights) download automatically on first use - the video node triggers a ~200MB download from the original project's release. Models and code here are subject to the original Deep Exemplar license rather than the pack's MIT wrapper, so don't assume commercial freedom from the repo's own license badge.

The one choice you have to make is which method to use for a given clip, and the honest answer is: try both. They're in the same pack precisely so you can A/B them. Deep Exemplar is the lighter, more predictable option - great on modest GPUs and long clips, and its half-resolution mode makes it the one I reach for when I just want the footage colored without babysitting VRAM. ColorMNet tends to win on fine texture and edge detail where you have the memory to spare. The performance_report output exists so you can make that call with numbers instead of vibes.

CategoryDeepExemplar/Video

Inputs (8)

NameTypeDefaultDescription
video_framesIMAGEBatch of video frames to be colorized
reference_imageIMAGEColor reference image that provides the color palette
frame_propagateBOOLEANtrueEnable temporal propagation: use previous frame's colorization to inform current frame (improves consistency)
use_half_resolutionBOOLEANtrueProcess at half resolution for speed, then upscale (2x faster with minimal quality loss)
target_widthINT76816–4096Output width (will be adjusted to nearest multiple of 32)
target_heightINT43216–4096Output height (will be adjusted to nearest multiple of 32)
use_torch_compileBOOLEANfalseEnable torch.compile optimization for 10-25% speedup (may increase first-run compilation time)
use_sage_attentionBOOLEANfalseEnable SageAttention for faster attention computation (requires sageattention package)

Outputs (2)

NameTypeDescription
colorized_framesIMAGE
performance_reportSTRING