Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-Reference-Based-Video-Colorization

ComfyUI Extension: ComfyUI-Reference-Based-Video-Colorization

Repo Name

ComfyUI-Reference-Based-Video-Colorization

Author
jonstreeter (Account age: 1470 days)
Nodes
View all nodes(1)
Latest Updated
2025-11-21
Github Stars
0.03K

How to Install ComfyUI-Reference-Based-Video-Colorization

Install this extension via the ComfyUI Manager by searching for ComfyUI-Reference-Based-Video-Colorization
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Reference-Based-Video-Colorization in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-Reference-Based-Video-Colorization Description

ComfyUI-Reference-Based-Video-Colorization uses a chosen color image to colorize grayscale photos and videos, with ColorMNet and Deep Exemplar helping keep colors consistent across video frames.

ComfyUI-Reference-Based-Video-Colorization Introduction

ComfyUI-Reference-Based-Video-Colorization adds color to black-and-white images and videos using a color image that you choose as a reference. Instead of asking a model to invent a palette entirely on its own, you give it a visual guide: for example, a color photograph showing the clothing, scenery, or overall mood you want in the finished footage.

The extension brings two colorization methods into ComfyUI: ColorMNet and Deep Exemplar. Each has nodes for a single image and for a sequence of video frames. For video, both methods are designed to help colors remain consistent as the scene changes from frame to frame. You can try the same reference with both methods, compare the results, and choose the look that suits your project.

A useful reference does not have to be an exact copy of your subject. It should, however, show similar objects or scenery and the colors you want to carry into your work. Try several references when a particular color choice matters.

<p align="center"> <img src="assets/Header Screenshot.png" alt="ComfyUI reference-based video colorization workflow" width="100%"/>

See it in action

<video width="100%" controls> <source src="assets/ColorizationSample.mp4" type="video/mp4"> Your browser does not support the video tag. <a href="assets/ColorizationSample.mp4">View the colorization sample video instead.

The sample shows ColorMNet colorizing black-and-white footage with color-matching post-processing.

How ComfyUI-Reference-Based-Video-Colorization Works

Think of the reference image as a color guide and the black-and-white footage as the scene to paint. The extension looks for visual relationships between them, then applies colors from the reference to the grayscale image or frames. A reference featuring a green landscape, for example, can help guide the color of similar scenery in your footage.

Video introduces an extra challenge: if every frame is colored independently, an object may change color as it moves. The two methods address this in different ways:

  • ColorMNet uses a memory-based approach. It draws on information across frames to help maintain a coherent result over time. It also uses DINOv2 image features to help interpret visual content.
  • Deep Exemplar uses an exemplar, meaning your reference image, to guide colorization. Its video node can propagate information between frames to improve continuity.

Neither method guarantees historically accurate colors. The reference is an artistic guide, so the choice of image can substantially change the result.

A basic workflow

  1. Load a black-and-white video as frames, or load a single grayscale image.
  2. Load a color reference image.
  3. Connect both inputs to the corresponding ColorMNet or Deep Exemplar node.
  4. Set the target width and height, then run a short test.
  5. Review the colorized output and, for video, check whether colors stay steady across frames.
  6. Try another reference or method if the palette or consistency is not what you want.

For video, the supplied example is Workflows/Colorize_Video_Workflow.json. It uses a VHS Video Loader for input and VHS Video Combine for export. For one image, use Workflows/ColorMNet_Image_Workflow.json, which loads the target and reference images, runs ColorMNetImage, and saves the result.

ComfyUI-Reference-Based-Video-Colorization Features

ColorMNet video and image nodes

ColorMNet Video (ColorMNet/Video) accepts grayscale video_frames and a color reference_image. It outputs colorized_frames and a performance_report.

  • target_width and target_height set the output dimensions. A smaller test render can help you assess a reference before committing to a larger render.
  • memory_mode controls the quality and memory trade-off. Start with balanced; use low_memory when memory is limited, or try high_quality when you can devote more memory to the render.
  • use_fp16 enables half-precision processing and is on by default. The author recommends it as a speed-oriented setting.
  • use_torch_compile enables a PyTorch 2.0+ optimization. It is off by default, and the first run can take longer while compilation warms up.

ColorMNet Image (ColorMNet/Image) accepts a grayscale image and a reference_image, then outputs a colorized_image and performance_report. It has the same target-size, FP16, and compilation controls, but no video memory-mode setting.

Deep Exemplar video and image nodes

Deep Exemplar Video (DeepExemplar/Video) accepts grayscale video_frames and a reference_image. It outputs colorized_frames and a performance_report.

  • frame_propagate is on by default and uses information from frames to support more consistent video color. Turn it off if you want frames processed independently.
  • use_half_resolution is on by default and reduces internal processing resolution to save memory. Turn it off when you want to test a quality-focused render and have enough memory.
  • use_torch_compile and use_sage_attention are optional speed settings, both off by default. SageAttention applies only to Deep Exemplar.
  • Weighted Least Squares (WLS) filtering is available for smoother results. Its lambda and sigma settings affect the filtering behavior; compare short previews before applying changes to a full video.

Deep Exemplar Image (DeepExemplar/Image) accepts image_to_colorize and reference_image, then outputs colorized_image and performance_report. It provides target-size, compilation, and SageAttention settings.

Progress and performance reports

The nodes provide progress feedback while processing. Their optional performance reports show measurements such as total time, time per frame, and frames per second (FPS), along with relevant settings. Connect performance_report to a text display node when you want to compare two runs. FPS is most useful when comparing similar clips and resolutions on the same computer.

The author reports speed improvements of 15–25% from torch.compile after its initial warmup and 20–30% faster attention operations with SageAttention where available. These are optimization estimates, not guaranteed improvements to an entire render.

ComfyUI-Reference-Based-Video-Colorization Models

The extension offers two colorization methods, not a list of interchangeable model variants:

MethodBest reason to try itAvailable nodes
ColorMNet (2024)You want a memory-based approach to maintaining color across video frames, or you want to compare its result with Deep Exemplar.Video and image
Deep Exemplar (2019)You want the classic reference-based approach, with optional frame propagation and smoothing controls for video.Video and image

For a fair comparison, feed both methods the same grayscale content and reference image. Look beyond a single attractive frame: check faces, clothing, backgrounds, and moving objects throughout the clip. There is no single setting or method that will suit every reference and scene.

The models are downloaded automatically on first use according to the original documentation. The ColorMNet checkpoint, Deep Exemplar checkpoints, and supporting model files are stored within the extension’s checkpoints/ and data/ directories. The first run may therefore take longer than later runs.

Model-use rights matter: the extension’s implementation is licensed under MIT, but the original README identifies the ColorMNet model as CC BY-NC-SA 4.0, for non-commercial use, and says the Deep Exemplar model is subject to its original project license. Check the applicable model terms before using output in a commercial project.

What's New with ComfyUI-Reference-Based-Video-Colorization

The supplied README lists recent changes but does not provide version numbers or release dates. They are described here without assigning them to a particular release:

  • Corrected ColorMNet pipeline normalization. The pipeline now matches the stated training setup more closely, using luminance-only input for the encoder and normalized color-component masks. This is a behind-the-scenes correction to how ColorMNet prepares its inputs.
  • Automatic handling of two ColorMNet CUDA dependencies. The node now attempts to install py-thin-plate-spline and the PyTorch correlation extension when it loads. The original README says the nodes can still run without them, though potentially more slowly.
  • A new single-image sample workflow. Workflows/ColorMNet_Image_Workflow.json provides a shorter starting point when you want to colorize a still image rather than assemble a video workflow.

Troubleshooting ComfyUI-Reference-Based-Video-Colorization

The colors do not match the look I wanted

  1. Try a reference with subjects or scenery more similar to your source.
  2. Choose a reference that clearly shows the palette you want, rather than one whose important colors are hard to see.
  3. Test a few references on a short clip or single image before processing the full video.
  4. Compare ColorMNet and Deep Exemplar; the same reference may produce different results.

Colors change noticeably between video frames

  1. Check several consecutive frames, not just the first and last.
  2. In Deep Exemplar Video, confirm that frame_propagate is enabled.
  3. Try ColorMNet Video as a comparison, since it uses memory across frames.
  4. If the reference is a poor visual match for objects in the footage, test a more similar image.

Processing runs out of memory or is too slow

  1. Lower target_width and target_height for a test render. The original README suggests 768 × 432 as a starting balance between speed and quality.
  2. For ColorMNet, try memory_mode=low_memory.
  3. For Deep Exemplar Video, leave use_half_resolution enabled.
  4. Process a shorter clip to test your settings.
  5. For later runs, consider use_fp16 where available or use_torch_compile if your PyTorch version supports it. Remember that compilation can make the first run slower.

An optional acceleration feature is unavailable

  1. Turn off use_torch_compile or use_sage_attention and try the render again.
  2. torch.compile requires PyTorch 2.0 or newer. SageAttention requires a compatible CUDA-enabled setup and the sageattention package.
  3. For ColorMNet’s optional CUDA extensions, consult the project documentation if automatic setup fails. On Windows, the original README notes that compiling them may require Visual Studio Build Tools with Desktop development with C++ and a correctly configured CUDA_HOME.
  4. Run a short test after changing one setting at a time so you can tell which change helped.

Frequently asked questions

Can I colorize one photograph instead of a video?
Yes. Both methods include image nodes. The supplied single-image example workflow uses ColorMNet.

Do I need a color version of the exact same frame?
The reference is a guide, not necessarily an exact matching frame. A visually similar image with the desired palette is a good place to start.

Which method should I choose first?
Start with either method and a short test. ColorMNet offers memory modes; Deep Exemplar offers frame propagation and half-resolution controls. Judge the result on your own footage.

Why is my first run taking longer?
The models download automatically on first use, and enabling torch.compile adds an initial compilation warmup.

Can I use the results commercially?
Do not assume the extension’s MIT license covers its models. Review the ColorMNet and Deep Exemplar model licenses for your intended use.

For a visual reference while troubleshooting, compare your setup with the workflow screenshot and the sample video.

Learn More about ComfyUI-Reference-Based-Video-Colorization

ComfyUI-Reference-Based-Video-Colorization Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-Reference-Based-Video-Colorization detailed guide | ComfyUI