Model reference · open weights
Qwen-Image-ControlNet-Union 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) | 1.8B |
| Runs with | diffusers |
| Based on | Qwen/Qwen-Image |
| Released | 2025-08-20 |
| Popularity | 7k downloads / month |
| Licence | Open weights |
About
This repository provides a unified ControlNet that supports 4 common control types (canny, soft edge, depth, pose) for Qwen-Image.
import torch
from diffusers.utils import load_image
# https://github.com/huggingface/diffusers/pull/12215
# pip install git+https://github.com/huggingface/diffusers
from diffusers import QwenImageControlNetPipeline, QwenImageControlNetModel
base_model = "Qwen/Qwen-Image"
controlnet_model = "InstantX/Qwen-Image-ControlNet-Union"
controlnet = QwenImageControlNetModel.from_pretrained(controlnet_model, torch_dtype=torch.bfloat16)
pipe = QwenImageControlNetPipeline.from_pretrained(
base_model, controlnet=controlnet, torch_dtype=torch.bfloat16
)
pipe.to("cuda")
# canny
# it is highly suggested to add 'TEXT' into prompt if there are text elements
control_image = load_image("conds/canny.png")
prompt = "Aesthetics art, traditional asian pagoda, elaborate golden accents, sky blue and white color palette, swirling cloud pattern, digital illustration, east asian architecture, ornamental rooftop, intricate detailing on building, cultural representation."
controlnet_conditioning_scale = 1.0
# soft edge
# control_image = load_image("conds/soft_edge.png")
# prompt = "Photograph of a young man with light brown hair jumping mid-air off a large, reddish-brown rock. He's wearing a navy blue sweater, light blue shirt, gray pants, and brown shoes. His arms are outstretched, and he has a slight smile on his face. The background features a cloudy sky and a distant, leafless tree line. The grass around the rock is patchy."
# controlnet_conditioning_scale = 1.0
# depth
# control_image = load_image("conds/depth.png")
# prompt = "A swanky, minimalist living room with a huge floor-to-ceiling window letting in loads of natural light. A beige couch with white cushions sits on a wooden floor, with a matching coffee table in front. The walls are a soft, warm beige, decorated with two framed botanical prints. A potted plant chills in the corner near the window. Sunlight pours through the leaves outside, casting cool shadows on the floor."
# controlnet_conditioning_scale = 1.0
# pose
# control_image = load_image("conds/pose.png")
# prompt = "Photograph of a young man with light brown hair and a beard, wearing a beige flat cap, black leather jacket, gray shirt, brown pants, and white sneakers. He's sitting on a concrete ledge in front of a large circular window, with a cityscape reflected in the glass. The wall is cream-colored, and the sky is clear blue. His shadow is cast on the wall."
# controlnet_conditioning_scale = 1.0
image = pipe(
prompt=prompt,
negative_prompt=" ",
control_image=control_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_union_result.png")
You can adjust control strength via controlnet_conditioning_scale.
We strongly recommend using detailed prompts, especially when include text elements. For example, use "a poster with text 'InstantX Team' on the top" instead of "a poster".
For multiple conditions inference, please refer to PR.
ComfyUI offers native support for Qwen-Image-ControlNet-Union. Check the blog for more details.
Liblib AI offers native support for Qwen-Image-ControlNet-Union. Visit for online inference.
We find that the model was unable to preserve some details without explicit 'TEXT' in prompt, such as small font text.
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-union for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (qwen-image-controlnet-union 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-union","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.