Qwen-Image ControlNet Model Patch - After
Qwen-Image ControlNet Model Patch - Before

The Qwen-Image ControlNet Model Patch workflow is designed to provide enhanced control over image generation through the use of Qwen-Image models. This workflow integrates several advanced nodes, including KSampler, CLIPTextEncode, and QwenImageDiffsynthControlnet, to allow for precise manipulation of image attributes such as canny, depth, and inpainting. By leveraging the ModelPatchLoader node, users can apply patches to models, enabling dynamic adjustments and improved image quality. This workflow is particularly useful for artists and designers who need to generate images with specific stylistic or thematic elements, as it allows for detailed customization using ControlNet techniques.

Technically, the workflow operates by first loading the necessary models and reference images, then processing these inputs through a series of nodes that encode, decode, and apply the desired transformations. The VAELoader and UNETLoader nodes play a crucial role in managing the image data, while the CLIPLoader and CLIPTextEncode nodes handle text-based prompts to guide the image generation process. The integration of the QwenImageDiffsynthControlnet node allows for the application of ControlNet models to refine image details, making this workflow a powerful tool for generating high-quality, customized images.

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.

image_qwen_image_controlnet_patch.json
Fetching workflow JSON…

Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

// Install (beta)
npm i @comfyorg/sdk

// Run "Qwen-Image ControlNet Model Patch" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("image_qwen_image_controlnet_patch_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("71", "image", asset); // LoadImage

wf.setInput("6", "text", "your prompt here"); // CLIPTextEncode

const job = await client.run(wf);
await job.getOutputs("60")[0].toFile("output.png"); // SaveImage

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

FAQ

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates