🎨 Cobra:
Efficient Line Art COlorization with BRoAder References
Project Page | ArXiv Preprint | GitHub Repository
NOTE: Each time you switch the input style, the corresponding model will be reloaded, which may take some time. Please be patient.
Welcome to the demo of Cobra. Follow the steps below to explore the capabilities of our model:
- Choose your input style: either line + shadow or line only.
- Upload your image: Click the 'Upload' button to select the image you want to colorize.
- Preprocess the image: Click the 'Preprocess' button to extract the line art from your image.
- (Optional) Obtain color values and add color hints: Upload an image to the left area and click to get color values; then, add color hints to the line art on the right.
- Upload reference images: Upload several reference images to help guide the colorization process.
- (Optional) Set inference parameters: Adjust the inference settings as needed.
- Run: Click the Colorize button to start the process.
⏱️ ZeroGPU Time Limit: Hugging Face ZeroGPU has an inference time limit of 180 seconds. You may need to log in with a free account to use this demo. Large sampling steps might lead to timeout (GPU Abort). In that case, please consider logging in with a Pro account or running it on your local machine.
注意:每次切换输入样式时,相应的模型将被重新加载,可能需要一些时间。请耐心等待。
欢迎使用 Cobra 演示。请按照以下步骤探索我们模型的能力:
- 选择输入样式:线条+阴影或仅线条。
- 上传您的图像:点击“上传”按钮选择您想要上色的图像。
- 预处理图像:点击“预处理”按钮从您的图像中提取线稿。
- (可选)获取颜色值并添加颜色提示:上传一张图像到左侧区域,点击获取颜色值;然后,为右侧的线稿添加颜色提示。
- 上传参考图像:上传多个参考图像以帮助引导上色过程。
- (可选)设置推理参数:根据需要调整推理设置。
- 运行:点击 上色 按钮开始处理。
⏱️ ZeroGPU时间限制:Hugging Face ZeroGPU 的推理时间限制为 180 秒。您可能需要使用免费帐户登录以使用此演示。大采样步骤可能会导致超时(GPU 中止)。在这种情况下,请考虑使用专业帐户登录或在本地计算机上运行。
Load Model
Line Drawing Extraction
Color Selection 🎨 (Left) and Hint Placement 💡 (Right) - Click with Mouse 🖱️
Retrieval and Colorization
Quick Examples
| Image to Colorize | Reference Images (Upload multiple) | Model Name | Random Seed | Inference Steps | Top K (Total Reference Images: 4K) |
|---|
If Cobra is helpful, please help to ⭐ the Github Repo. Thanks!
📧 Contact
If you have any questions, please feel free to reach me out at zhuangjh23@tsinghua.org.cn.
📝 Citation
If our work is useful for your research, please consider citing:
@misc{zhuang2025cobra,
title={Cobra: Efficient Line Art COlorization with BRoAder References},
author={Junhao Zhuang, Lingen Li, Xuan Ju, Zhaoyang Zhang, Chun Yuan and Ying Shan},
year={2025},
eprint={****.***},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org},
}