Cobra: Efficient Line Art COlorization with BRoAder References

Junhao Zhuang, Lingen Li, Xuan Ju, Zhaoyang Zhang, Chun Yuan +1 more
4/16/2025
cs.CV

No official code found. Best implementation: zhuang2002/Cobra (253 stars, Apache-2.0, last commit 2025-12-10).

Abstract

The comic production industry requires reference-based line art colorization with high accuracy, efficiency, contextual consistency, and flexible control. A comic page often involves diverse characters, objects, and backgrounds, which complicates the coloring process. Despite advancements in diffusion models for image generation, their application in line art colorization remains limited, facing challenges related to handling extensive reference images, time-consuming inference, and flexible control. We investigate the necessity of extensive contextual image guidance on the quality of line art colorization. To address these challenges, we introduce Cobra, an efficient and versatile method that supports color hints and utilizes over 200 reference images while maintaining low latency. Central to Cobra is a Causal Sparse DiT architecture, which leverages specially designed positional encodings, causal sparse attention, and Key-Value Cache to effectively manage long-context references and ensure color identity consistency. Results demonstrate that Cobra achieves accurate line art colorization through extensive contextual reference, significantly enhancing inference speed and interactivity, thereby meeting critical industrial demands. We release our codes and models on our project page: https://zhuang2002.github.io/Cobra/.

View on arXivView PDF

Code Implementations(1)

zhuang2002/CobraCommunity75%
Apache-2.0

[SIGGRAPH 2025] Official code of the paper "Cobra: Efficient Line Art COlorization with BRoAder References". Cobra:利用更广泛参考图实现高效线稿上色

25320Python, MakefileApr 16, 202510 months agoApache-2.0
automatic-colorizationcolorizationcomputer-visionimage-colorization

Cite this paper

@article{zhuang2025cobra,
  title  = {Cobra: Efficient Line Art COlorization with BRoAder References},
  author = {Junhao Zhuang and Lingen Li and Xuan Ju and Zhaoyang Zhang and Chun Yuan and Ying Shan},
  year   = {2025},
  eprint = {2504.12240},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.12240v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.12240.svg)](https://codeofpaper.com/paper/2504.12240)

Discussion