Model reference · open weights

Kolors-Inpainting

Image Kwai-Kolors Text→image 1 build Open weights 43 dl/mo

Kolors-Inpainting is an open-weight image model from Kwai-Kolors. Kolors-Inpainting (FP16) weighs 5.3 GB; the smallest configuration that runs it is RTX 3060 12 GB.

  • Kolors-Inpainting is a 2.6B parameter text-to-image model developed by Kwai-Kolors for image inpainting tasks.
  • It supports Chinese and English languages and is distributed under the apache-2.0 license.
  • The model utilizes a UNet with five additional input channels to process masked images and masks, and it was evaluated on a test set of 200 masked images.

Summary of the Kwai-Kolors/Kolors-Inpainting model card, 2026-10-01

What it is

Released byKwai-Kolors
Released2024-07-24
Parameters2.6B
VRAM5.3 GB for the weights

What it runs on

Memory and cards for Kolors-Inpainting (FP16)

5.3 GBweights, file size
5.0 GBworking memory, one 1024² image
537 MBruntime overhead
CardOne imageMemory
RTX 3060 12 GBtight11.6 GB
RTX 4060 Ti 16 GBfits15.4 GB
RTX 3090 24 GBfits23.4 GB
RTX 4090 24 GBfits23.4 GB
RTX 5090 32 GBfits31.0 GB
L40S 48 GBfits44.0 GB
A100 80 GBfits78.2 GB
H100 80 GBfits78.1 GB
RTX PRO 6000 Blackwell 96 GBfits93.8 GB
DGX Spark (GB10) 128 GB unifiedfits107 GB
H200 141 GBfits138 GB
B200 180 GBfits176 GB

From the model card

What Kwai-Kolors says about Kolors-Inpainting

Read the model card

📖 Introduction

We provide Kolors-Inpainting inference code and weights which were initialized with Kolors-Basemodel. Examples of Kolors-Inpainting results are as follows:

Model details

  • For inpainting, the UNet has 5 additional input channels (4 for the encoded masked image and 1 for the mask itself). The weights for the encoded masked-image channels were initialized from the non-inpainting checkpoint, while the weights for the mask channel were zero-initialized.
  • To improve the robustness of the inpainting model, we adopt a more diverse strategy for generating masks, including random masks, subject segmentation masks, rectangular masks, and masks based on dilation operations.

📊 Evaluation

For evaluation, we created a test set comprising 200 masked images and text prompts. We invited several image experts to provide unbiased ratings for the generated results of different models. The experts assessed the generated images based on four criteria: visual appeal, text faithfulness, inpainting artifacts, and overall satisfaction. Inpainting artifacts measure the perceptual boundaries in the inpainting results, while the other criteria adhere to the evaluation standards of the BaseModel. The specific results are summarized in the table below, where Kolors-Inpainting achieved the highest overall satisfaction score.

ModelAverage Overall SatisfactionAverage Inpainting ArtifactsAverage Visual AppealAverage Text Faithfulness
SDXL-Inpainting2.5731.2053.0004.299
Kolors-Inpainting3.4930.2043.8554.346

The comparison results of SDXL-Inpainting and Kolors-Inpainting are as follows:

🛠️ Usage

Requirements

The dependencies and installation are basically the same as the Kolors-BaseModel.

  1. Repository Cloning and Dependency Installation
apt-get install git-lfs
git clone https://github.com/Kwai-Kolors/Kolors
cd Kolors
conda create --name kolors python=3.8
conda activate kolors
pip install -r requirements.txt
python3 setup.py install
  1. Weights download link:
huggingface-cli download --resume-download Kwai-Kolors/Kolors-Inpainting --local-dir weights/Kolors-Inpainting
  1. Inference:
python3 inpainting/sample_inpainting.py ./inpainting/asset/3.png ./inpainting/asset/3_mask.png 穿着美少女战士的衣服,一件类似于水手服风格的衣服,包括一个白色紧身上衣,前胸搭配一个大大的红色蝴蝶结。衣服的领子部分呈蓝色,并且有白色条纹。她还穿着一条蓝色百褶裙,超高清,辛烷渲染,高级质感,32k,高分辨率,最好的质量,超级细节,景深

python3 inpainting/sample_inpainting.py ./inpainting/asset/4.png ./inpainting/asset/4_mask.png 穿着钢铁侠的衣服,高科技盔甲,主要颜色为红色和金色,并且有一些银色装饰。胸前有一个亮起的圆形反应堆装置,充满了未来科技感。超清晰,高质量,超逼真,高分辨率,最好的质量,超级细节,景深

# The image will be saved to "scripts/outputs/"

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

Running it yourself

Run it on a rented GPU

Rent a machine by the hour. Runs as it is with diffusers, on the machine, in Python.

# on your rented machine: pip install diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

pipe = DiffusionPipeline.from_pretrained("Kwai-Kolors/Kolors-Inpainting", torch_dtype=torch.bfloat16).to("cuda")
image = pipe(prompt="a red bicycle on a cobbled street").images[0]
image.save("/workspace/out.png")
Renting a GPU: connect, tunnels, Python
© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms