Nodes/Reference-Based Video Colorization/ColorMNet Video Colorization (New)
ComfyUI Node

ColorMNet Video Colorization (New)

ColorMNet Video

By jonstreeter·Created 10 months ago·Updated 9 months ago· 25
ColorMNet Video Colorization (New)
  • video_frames
  • reference_image
  • colorized_frames
  • performance_report
target_width768
target_height432
memory_modebalanced
feature_encoderresnet50
use_fp16true
use_torch_compilefalse
text_guidance
text_guidance_weight0.30

ColorMNet Video is the headline node in jonstreeter's Reference-Based Video Colorization pack, and it does exactly what the name promises: you feed it a batch of grayscale frames plus one color reference photo, and it paints your footage with that palette. No diffusion step, no prompt juggling, no inpainting per frame - just a purpose-built network transferring color in a way that doesn't flicker between frames. It's the tool you want for old family films, silent-era footage, or any archival B&W clip you want to "restore" without inventing a look from scratch.

The model behind it is ColorMNet (2024), a memory-based approach that propagates features across time. The trick that keeps it temporally consistent: earlier colorized frames feed a memory bank that informs later ones, instead of each frame being colorized in isolation and stitched together. The encoder that extracts features is your choice - and this is where the node gets interesting. The default is resnet50, but the README and the node's own tooltips point you to dinov2_vitb, claiming 40-60% better results, with dinov2_vitl for max quality if your VRAM allows. There's even a clip_vitb option that opens up the two optional inputs, text_guidance and text_guidance_weight, so you can nudge colorization with a phrase like "warm sunset colors" instead of relying purely on the reference image.

The inputs that actually matter

You'll set most of these once and leave them alone:

  • video_frames - your grayscale batch [N, H, W, 3], straight from a VHS Video Loader or any frame-list source.
  • reference_image - the color image that defines the palette. This is the lever that matters most. Semantically similar references beat abstract ones: for a 1940s street scene, a reference with that era's muted, slightly faded palette will look far more convincing than a modern high-saturation photo.
  • target_width / target_height - output resolution; must be multiples of 32 (the node nudges them automatically). The 768x432 default is a solid speed/quality balance for video.
  • memory_mode - balanced (default), low_memory for long clips, high_quality for the last 5% of quality on short ones.
  • use_fp16 - on by default, near-zero quality cost, noticeably faster. Leave it.

The output colorized_frames (IMAGE) wires into VHS Video Combine to write your clip; performance_report (STRING) is a text blob of FPS and per-frame timing you can preview or dump to file if you're benchmarking the two methods in this pack against each other.

Installing and the honest gotchas

Install from ComfyUI Manager by searching "Deep Exemplar Video Colorization" (the pack title), or manually:

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 ~500MB ColorMNet checkpoint downloads automatically on first run, so the first execution of this node is slow regardless of what you feed it. Two CUDA extensions (py-thin-plate-spline, Pytorch-Correlation-extension) get installed from git on node load; if the build fails on Windows you need Visual Studio Build Tools with the C++ workload and CUDA_HOME set - but the node still works without them, just slower.

Two things that will save you a headache. First, if you get No module named 'model.network' on load, you've pulled an older revision - update the pack; the alias that fixes that import is in current code. Second, don't bother with use_torch_compile here. The README advertises 15-25%, but the code itself logs that ColorMNet is already running custom CUDA kernels, so compilation is essentially a no-op that just eats first-run time. That knob matters on the Deep Exemplar nodes in the same pack, not this one.

One more thing worth knowing before you build a product on it: the ColorMNet model weights are CC BY-NC-SA 4.0 - non-commercial. Fine for personal restoration projects, a real problem if you're charging clients.

CategoryColorMNet/Video

Inputs (10)

NameTypeDefaultDescription
video_framesIMAGEBatch of video frames to be colorized [N, H, W, 3]
reference_imageIMAGEColor reference image that provides the color palette
target_widthINT76864–2048Output width - must be multiple of 32 (will be adjusted automatically)
target_heightINT43264–2048Output height - must be multiple of 32 (will be adjusted automatically)
memory_modeCOMBObalancedMemory management strategy: 'low_memory' for large videos, 'high_quality' for best results, 'balanced' for general use
feature_encoderCOMBOresnet50Feature extraction model: resnet50 (ColorMNet default), vgg19 (fast), dinov2_vitb (recommended, 40-60% better), dinov2_vitl (best quality), clip_vitb (text-guided)
use_fp16BOOLEANtrueUse half-precision (FP16) for faster processing with lower VRAM usage (minimal quality impact)
use_torch_compileBOOLEANfalseEnable torch.compile optimization for 15-25% speedup (increases first-run compilation time)
text_guidanceoptSTRINGText prompt to guide colorization (only for clip_vitb encoder). Examples: 'warm sunset colors', 'vibrant anime style', 'cold winter landscape'
text_guidance_weightoptFLOAT0.300–1How much the text guidance influences colorization (0=no effect, 1=maximum effect)

Outputs (2)

NameTypeDescription
colorized_framesIMAGE
performance_reportSTRING