Skip to content

How-ToGPU

How to Colourise Black-and-White Photos Locally with DDColor

DDColor is a free, open-source AI model that adds colour to old black-and-white photos on your own PC, so nothing gets uploaded. Using the developers' documentation and code, we explain how to install it, which of its four models to choose, how to colourise a whole folder and how to use its web demo or ComfyUI node.

By , Systems & Technical Editor

5 min read

How to Colourise Black-and-White Photos Locally with DDColor

Old family photos are some of the most rewarding things to run through AI, but uploading them to an online colouriser means handing your pictures to someone else's server. DDColor is a free, open-source colourisation model you can run on your own PC instead. This guide is based on the DDColor developers' own documentation and code.

What DDColor is

DDColor is the official PyTorch implementation of an ICCV 2023 research paper, "DDColor: Towards Photo-Realistic Image Colorization via Dual Decoders", by researchers at Alibaba Group's DAMO Academy. The developers say it can provide "vivid and natural colorization for historical black and white old photos", and it can even recolour landscapes from anime-style games to look more realistic.

The code is released under the Apache 2.0 licence. Training and inference code arrived in May 2023, a lightweight "tiny" model followed in December 2023 and Hugging Face support was added in January 2024. The GitHub repository was last updated in January 2026, so it's still more actively looked after than DeOldify, the older colouriser whose repository was archived in 2024. We compare the two in DDColor vs DeOldify.

What you need

  • Python. The README lists Python 3.7 or newer and PyTorch 1.7 or newer, and recommends creating a conda environment with Python 3.9 (Miniconda or Anaconda provides conda). It doesn't list supported operating systems, but it's standard Python and PyTorch code.

  • Git, to download the code.

  • Optionally, an NVIDIA graphics card. The inference script uses a CUDA GPU if PyTorch can see one and otherwise falls back to the CPU. The README's install command uses PyTorch's CUDA 11.8 build. The developers don't publish a minimum GPU or VRAM figure, so see our guide to how much VRAM you need if you're also planning heavier AI work. A mid-range card such as the MSI RTX 5060 8GB Ventus 2X OC is a sensible starting point for photo AI tools like this (our suggestion, not a tested result).

Step 1: Download DDColor and set up Python

Open a terminal (on Windows, the Anaconda Prompt if you installed Miniconda or Anaconda) and run:

git clone https://github.com/piddnad/DDColor
cd DDColor
conda create -n ddcolor python=3.9
conda activate ddcolor
pip install torch==2.2.0 torchvision==0.17.0 --index-url https://download.pytorch.org/whl/cu118
pip install -r requirements.txt

These are the commands from the README. The extra requirements.train.txt packages and setup.py develop step are only needed if you want to train your own model, so you can skip them.

Step 2: Choose a model

DDColor has four pretrained models, all hosted on Hugging Face:

Model

What the developers say

ddcolor_modelscope (default)

DDColor-L trained on ImageNet with an extra data-cleaning step. The developers recommend it by default for images outside ImageNet

ddcolor_artistic

DDColor-L trained on ImageNet plus private data, including many high-quality artistic images. Trained without colourfulness loss, so there may be fewer odd colour artefacts. Use it to try different results

ddcolor_paper

The model from the research paper. The developers say to use it only if you want to reproduce the paper's images

ddcolor_paper_tiny

DDColor-T, the most lightweight version

For family photos, start with ddcolor_modelscope, then try ddcolor_artistic on any picture you're not happy with. If you're running on the CPU or an older PC, ddcolor_paper_tiny is the lightweight option.

Step 3: Colourise a folder of photos

Put your scans in a folder, for example C:\photos\bw, then run:

python scripts/infer.py --model_name ddcolor_modelscope --input C:\photos\bw --output C:\photos\colour

The script downloads the chosen model from Hugging Face the first time, then processes every image in the input folder. If you leave out --output, results go in a results folder inside DDColor. There's also an --input_size option, which defaults to 512, to set the size the model works at. Change --model_name to ddcolor_artistic or ddcolor_paper_tiny to compare models on the same folder.

If you've already downloaded a model file, use --model_path instead of --model_name and point it at the .pt file. Add --model_size tiny when you're using the tiny model.

Step 4 (optional): Use the web interface

If you'd rather drag and drop photos than use the command line, DDColor includes a Gradio demo with a before-and-after slider. It loads the default model from a fixed path, modelscope/damo/cv_ddcolor_image-colorization/pytorch_model.pt, so download that first. From the DDColor folder, run pip install modelscope, then start python and paste the README's download snippet:

from modelscope.hub.snapshot_download import snapshot_download
snapshot_download('damo/cv_ddcolor_image-colorization', cache_dir='./modelscope')

Exit Python, then install the demo's extra packages and start it:

pip install gradio gradio_imageslider
python demo/gradio_app.py

Gradio prints a local web address in the terminal for you to open in your browser.

Alternative: DDColor in ComfyUI

If you already use ComfyUI, the ComfyUI-DDColor custom node by kijai adds DDColor to your workflows. You choose a model from a drop-down, and it's downloaded automatically into the node's checkpoints folder. The node's README admits the right model input size seems to vary by model and image, and suggests trying 256, 512 or 1024. The node hasn't been updated since May 2024. See our guide to installing custom nodes with ComfyUI Manager if you haven't added nodes before.

Tips for better results

  • Scan at a good resolution and keep the original. Colourisation is a guess about colours the photo never recorded, so always keep the untouched black-and-white file.

  • Restore before you colourise. If faces are blurred or damaged, try CodeFormer face restoration first, then colourise the restored copy. Our best local AI photo restoration tools guide covers scratch removal and other clean-up tools.

  • Try more than one model. The developers describe ddcolor_artistic as an alternative for different results, and the developers' Model Zoo notes say the colourfulness loss used in training can sometimes cause unpleasant colour blocks, such as red artefacts.

  • Don't treat the colours as history. The AI is choosing likely colours, not recovering real ones. If you know a uniform, car or dress was a particular colour, you may need to correct it in a photo editor.

Other ways to colourise photos

DDColor isn't the only option. Photoshop's Colorize neural filter lets you place colour pins by hand, and DeOldify has a Windows app that runs without a GPU. We round them up in the best AI photo colourisation software.

The bottom line

DDColor is a free, Apache 2.0-licensed way to colourise black-and-white photos on your own PC, with four pretrained models, a simple folder-based script, an optional browser interface and a ComfyUI node. Setup needs Python and a few terminal commands, and a CUDA-capable NVIDIA card helps, but the script falls back to the CPU. Forge PC hasn't tested its output, so try the default and artistic models on your own scans and keep the originals.

In this article

Sources

  1. 01piddnad, DDColor README on GitHub
  2. 02piddnad, DDColor Model Zoo
  3. 03piddnad, DDColor inference script
  4. 04arXiv, DDColor: Towards Photo-Realistic Image Colorization via Dual Decoders
  5. 05kijai, ComfyUI-DDColor on GitHub

About the author

Marcus Thorne

Systems & Technical Editor

Marcus writes Forge PC's step-by-step build, troubleshooting and system optimisation guides. His background spans Windows kernel and power-state diagnostics, UEFI/BIOS configuration, NVMe storage arrays, ATX 3.1 power delivery and running local AI and LLM workloads on consumer graphics cards.

More from Marcus Thorne

Read next

Best GPU for Blender in 2026

Best Picks

Best GPU for Blender in 2026

Building or upgrading a PC for Blender rendering? The GPU and its VRAM matter most. We pick the RTX 5070 Ti, RTX 5090, RTX 5060 Ti 16GB, Arc B580, RX 9070 XT and Radeon AI PRO R9700 using the Blender manual, official specs and Puget Systems' credited test results.

Hannah Vance8 min

DLAA vs DLSS: Which NVIDIA Setting Should You Use?

Versus

DLAA vs DLSS: Which NVIDIA Setting Should You Use?

DLAA and DLSS Super Resolution use the same NVIDIA AI model but do opposite jobs: DLSS renders at a lower resolution and upscales for more frames, while DLAA stays at native resolution and uses AI purely for anti-aliasing. Using NVIDIA's documentation, we compare image quality goals, performance, RTX support and models, and show how to enable DLAA with the NVIDIA app.

Callum Reid5 min

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

How-To

How to Set Up PCSX2 on Windows: Play Your PS2 Games on PC

PCSX2 can play much of the PlayStation 2 library on a Windows PC at higher resolutions than the original console. Using PCSX2's official documentation, we explain the hardware you need, how to install it, how to dump the BIOS from your own PS2 and your game discs, which renderer to choose, how to save safely and what to check if games run slowly.

Marcus Thorne8 min

Best Local AI Video Translation and Dubbing Tools in 2026

Best Picks

Best Local AI Video Translation and Dubbing Tools in 2026

Free AI tools can now transcribe a video, translate it and dub it into another language on your own PC. We pick the best: pyVideoTrans, VideoLingo, OpenCreator (formerly KrillinAI) and SoniTranslate, comparing offline use, languages, voices, setup, licences and hardware from each project's official docs.

Hannah Vance5 min