Model reference · open weights
Qwen-Image-ControlNet-Inpainting is an open-weight image model from InstantX. 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 | InstantX |
|---|---|
| Type | Image models |
| Task | Image edit |
| Parameters (lead) | 2.1B |
| Runs with | diffusers |
| Based on | Qwen/Qwen-Image |
| Released | 2025-09-08 |
| Popularity | 4k downloads / month |
| Licence | Open weights |
About
This repository provides a ControlNet that supports mask-based image inpainting and outpainting for Qwen-Image.
You can find more use cases in this blog.
import torch
from diffusers.utils import load_image
# pip install git+https://github.com/huggingface/diffusers
from diffusers import QwenImageControlNetModel, QwenImageControlNetInpaintPipeline
base_model = "Qwen/Qwen-Image"
controlnet_model = "InstantX/Qwen-Image-ControlNet-Inpainting"
controlnet = QwenImageControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
pipe = QwenImageControlNetInpaintPipeline.from_pretrained(
base_model, controlnet=controlnet, torch_dtype=torch.bfloat16
)
pipe.to("cuda")
image = load_image("https://huggingface.co/InstantX/Qwen-Image-ControlNet-Inpainting/resolve/main/assets/images/image1.png")
mask_image = load_image("https://huggingface.co/InstantX/Qwen-Image-ControlNet-Inpainting/resolve/main/assets/masks/mask1.png")
prompt = "一辆绿色的出租车行驶在路上"
image = pipe(
prompt=prompt,
negative_prompt=" ",
control_image=image,
control_mask=mask_image,
controlnet_conditioning_scale=controlnet_conditioning_scale,
width=control_image.size[0],
height=control_image.size[1],
num_inference_steps=30,
true_cfg_scale=4.0,
generator=torch.Generator(device="cuda").manual_seed(42),
).images[0]
image.save(f"qwenimage_cn_inpaint_result.png")
ComfyUI offers native support for Qwen-Image-ControlNet-Inpainting. The official workflow can be found here. Make sure your ComfyUI version is >=0.3.59.
Liblib AI offers native support for Qwen-Image-ControlNet-Inpainting. Visit for online WebUI or ComfyUI inference.
This model is slightly sensitive to user prompts. Using detailed prompts that describe the entire image (both the inpainted area and the background) is highly recommended. Please use descriptive prompt instead of instructive prompt.
This model is developed by InstantX Team. All copyright reserved.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys qwen-image-controlnet-inpainting for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (qwen-image-controlnet-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":"qwen-image-controlnet-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.