Skip to content

PRIS-CV/ColourCrafter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recolour What Matters: Region-Aware Colour Editing via Token-Level Diffusion

Code release for "Recolour What Matters: Region-Aware Colour Editing via Token-Level Diffusion"

Project Page arXiv Hugging Face License

🔥 News

  • [2026/07/03] 🚀 We release the inference and training code.
  • [2026/06/18] 🎉 Ours paper is accepted to ECCV 2026.

Overview

Editing results of ColourCrafter under varying reference colours. Each row shows the input image and its edited outputs conditioned on different RGB references. As the reference colours vary smoothly from left to right, ColourCrafter produces continuous and precise recolouring with consistent structure and texture.

Method

Overview of the ColourCrafter pipeline. (1) Dataset construction: Using Flux.1-Kontext, we generate diverse image-colour pairs and employ a Vision-Language Model (VLM) to filter samples for consistency, fidelity, and realism. The corresponding RGB references are extracted to build the high-quality dataset ColourfulSet. (2) Training: The original image, target colour reference, and text prompt are jointly fed into the diffusion model, which is optimised with both Diffusion and Lab-space losses to enhance chromatic accuracy and perceptual consistency. (3) Inference: Given an input image, a RGB reference, and a prompt, ColourCrafter performs fine-grained, structure-preserving, and perceptually natural colour editing.

🚀 Quick Start

1. Clone the repository

git clone https://github.com/YangYuqi317/ColourCrafter.git

cd ColourCrafter

2. Create the environment

We recommend creating a new conda environment.

conda create -n ColourCrafter python=3.10
conda activate ColourCrafter

Install the required dependencies:

pip install torch==2.5.1 torchvision==0.20.1
pip install diffusers==0.36.0

3. Download pretrained checkpoints

Download the pretrained checkpoints from Hugging Face:

https://huggingface.co/black-forest-labs/FLUX.1-Kontext-dev

4. Run inference

python test_kontext.py 

🎓 Training

bash train.sh

📚 Citation

  @article{yang2026recolourmatters,
        title={Recolour What Matters: Region-Aware Colour Editing via Token-Level Diffusion}, 
        author={Yuqi Yang and Dongliang Chang and Yijia Ling and Ruoyi Du and Zhanyu Ma},
        journal={arXiv preprint arXiv:2603.18466}
        year={2026},
        url={https://arxiv.org/abs/2603.18466}, 
  }

About

[ECCV 2026] Code release for "Recolour What Matters: Region-Aware Colour Editing via Token-Level Diffusion"

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors