The Qwen-Image InstantX Inpainting ControlNet workflow is a powerful tool for professional image editing, specifically designed for tasks such as object replacement, text modification, background changes, and outpainting. At its core, the workflow utilizes the Qwen-Image model, which is renowned for its high-quality inpainting capabilities. The workflow integrates several nodes, including KSampler, CLIPTextEncode, and ControlNetInpaintingAliMamaApply, to facilitate detailed and precise image manipulations.
Technically, the workflow begins with uploading the necessary models and the image to be edited. Users can then define the areas for inpainting using the MaskEditor, which is accessed via the LoadImage node. The workflow employs the VAELoader and UNETLoader nodes to encode and decode images, ensuring that the edits blend seamlessly with the original image. The ControlNetLoader and ControlNetInpaintingAliMamaApply nodes are pivotal in applying the inpainting effects, allowing for intricate modifications while maintaining the image's overall coherence. This workflow is particularly useful for creative professionals seeking to enhance or alter images with precision and ease.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
GET https://comfy.org/workflows/download/15538e51d812.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run "Qwen-Image InstantX Inpainting ControlNet" (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("image_qwen_image_instantx_inpainting_controlnet_api.json")
asset = client.assets.from_file("input.png")
wf.set_input("71", "image", asset) # LoadImage
wf.set_input("6", "text", "The Queen, on a throne, surrounded by Knights, HD, Realistic, Octane Render, Unreal engine") # CLIPTextEncode
job = client.run(wf)
for output in job.get_outputs("189"): # SaveImage
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ
















