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.