Model reference · open weights
Kolors-Inpainting is an open-weight image model from Kwai-Kolors. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | Kwai-Kolors |
|---|---|
| Type | Image models |
| Task | Text→image |
| Parameters (lead) | 2.6B |
| Runs with | diffusers |
| Released | 2024-07-24 |
| Popularity | 43 downloads / month |
| Licence | Open weights |
About
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 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.
| Model | Average Overall Satisfaction | Average Inpainting Artifacts | Average Visual Appeal | Average Text Faithfulness |
|---|---|---|---|---|
| SDXL-Inpainting | 2.573 | 1.205 | 3.000 | 4.299 |
| Kolors-Inpainting | 3.493 | 0.204 | 3.855 | 4.346 |
The comparison results of SDXL-Inpainting and Kolors-Inpainting are as follows:
The dependencies and installation are basically the same as the Kolors-BaseModel.
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
huggingface-cli download --resume-download Kwai-Kolors/Kolors-Inpainting --local-dir weights/Kolors-Inpainting
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/"
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys kolors-inpainting for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (kolors-inpainting below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/images/generations \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"kolors-inpainting","prompt":"a red bicycle","size":"1024x1024"}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.