DiffSynth: Qwen Image Inference
Qwen Image Inference — one node that does T2I, editing, inpainting and layer decomposition
- pipe
- input_image
- inpaint_mask
- blockwise_controlnet_inputs
- eligen_entity_masks
- edit_image
- layer_input_image
- context_image
- image
Look at the input list on this thing. It's the longest in the pack, and that's not bloat - Qwen-Image's ecosystem grew four jobs on one 20B backbone, and the pack exposes them all on a single node. You wire what you need and leave the rest unconnected.
prompt, seed, num_inference_steps, height, width, and pipe are required. Everything else is optional, including some genuinely interesting things.
The core five
Defaults are 30 steps at 1328×1328, the square everyone runs the base at - and resolution matters more here than on other models, because this family's whole selling point is rendering real text into the image. If you're on the Edit revisions instead of the base, the community habit is to keep the input size on a multiple of 112 to avoid positional offset and small artefacts. cfg_scale defaults to 4, which is correct for the base model and wrong the moment you stack a distilled LoRA on top: those want CFG near 1, and at CFG 4 you'll get the burnt, oversaturated look that guidance distillation is supposed to prevent.
Text-to-image
Wire nothing but the pipe, type a prompt, queue. That's it.
Instruction editing
edit_image takes an IMAGE - the thing you want changed - and the prompt describes the change in plain language ("Change the dress color to purple.", per the pack's own Qwen-Image-Edit template). This is the input that made the Qwen-Edit line the community's default open editor, and it's the same architecture as the base, so your loader is pointing at Qwen/Qwen-Image-Edit-2511 (or 2509) instead of Qwen/Qwen-Image.
Two flags belong to this mode. edit_image_auto_resize (default true) handles aspect-ratio mismatch for you; edit_rope_interpolation is the knob to reach for when you're editing at a resolution far from the model's native one and positional behavior starts going strange.
Inpainting and img2img
input_image plus denoising_strength gives you standard img2img. Add inpaint_mask and it becomes masked inpainting, with inpaint_blur_size and inpaint_blur_sigma softening the mask edge so the seam doesn't read as a cut. exponential_shift_mu is a schedule shifter for the flow-matching sampler - leave it at 0 unless you're working a specific problem.
The odd, interesting ones
eligen_entity_promptswitheligen_entity_masks- entity-level guidance. Per-entity masks plus per-entity text, so "the red car" and "the blue bike" don't bleed into each other.eligen_enable_on_negativeapplies the same machinery to the negative pass.layer_input_imageandlayer_num- the layered-image path, Qwen-Image-Layered's recursive decomposition idea, where an image is taken apart into RGBA layers rather than edited flat.blockwise_controlnet_inputsis a wildcard (*) socket, so it takes whatever the ControlNet path produces in DiffSynth's own terms. Expect to dig into DiffSynth-Studio's docs rather than the README here.tiled,tile_size(128) andtile_stride(64) - tiled decoding for high resolutions on tight VRAM. Lower stride means more overlap and more time.
Output is a single image, ready for a SaveImage or Preview.
Install
ComfyUI Manager → DiffSynth-ComfyUI → install → restart. Or:
pip install git+https://github.com/modelscope/DiffSynth-Studio.git
cd ComfyUI/custom_nodes && git clone https://github.com/modelscope/DiffSynth-ComfyUI.git
The fastest way to see it working is the pack's templates - Template tab in the sidebar, general_qwen_image_edit, featured_qwen_image_edit_2511_lightning, general_qwen_image_2512. Copy the model wiring, then start deleting inputs you don't need.
Where people get burned
CFG 4 on a distilled LoRA. Doubling the guidance pass on a model that already baked guidance in. Steps 4, CFG 1, and suddenly the 20B renders in seconds.
Editing at the wrong resolution. Qwen-Image is unusually resolution-sensitive because of the text rendering; a 512-wide edit will produce mush regardless of how good your instruction was.
Expecting the negative prompt to do heavy lifting at low CFG. Negative prompts need an unconditional pass to steer. Pushing cfg_scale down toward 1 makes the field progressively inert - write constraints as things you do want instead.
Wiring inputs from different modes at once. edit_image and input_image are separate paths. Connecting both is not "more control", it's an undefined request.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | DIFFSYNTH_PIPE | — | |
| prompt | STRING | — | |
| seed | INT | 00–4294967295 | — |
| num_inference_steps | INT | 301–200 | — |
| height | INT | 132864–4096 | — |
| width | INT | 132864–4096 | — |
| negative_promptopt | STRING | — | |
| cfg_scaleopt | FLOAT | 4.00–10000 | — |
| input_imageopt | IMAGE | — | |
| denoising_strengthopt | FLOAT | 1.00–10000 | — |
| inpaint_maskopt | IMAGE | — | |
| inpaint_blur_sizeopt | INT | 00–4294967295 | — |
| inpaint_blur_sigmaopt | FLOAT | 0.00–10000 | — |
| exponential_shift_muopt | FLOAT | 0.00–10000 | — |
| blockwise_controlnet_inputsopt | * | — | |
| eligen_entity_promptsopt | STRING | — | |
| eligen_entity_masksopt | IMAGE | — | |
| eligen_enable_on_negativeopt | BOOLEAN | false | — |
| edit_imageopt | IMAGE | — | |
| edit_image_auto_resizeopt | BOOLEAN | true | — |
| edit_rope_interpolationopt | BOOLEAN | false | — |
| zero_cond_topt | BOOLEAN | false | — |
| layer_input_imageopt | IMAGE | — | |
| layer_numopt | INT | 00–4294967295 | — |
| context_imageopt | IMAGE | — | |
| tiledopt | BOOLEAN | false | — |
| tile_sizeopt | INT | 1280–4294967295 | — |
| tile_strideopt | INT | 640–4294967295 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |