Nodes/ComfyUI_StarNodes/⭐ Star Qwen Image Edit Inputs
ComfyUI Node

⭐ Star Qwen Image Edit Inputs

The right-sized, stitch-ready input for Qwen-Image-Edit

By Starnodes2024·Created 2 years ago·Updated 3 days ago· 102
⭐ Star Qwen Image Edit Inputs
  • image1
  • image2
  • image3
  • image4
  • stitched
  • latent
  • width
  • height
qwen_resolutionUse Best Ratio from Image 1
batch_size1
custom_width1024
custom_height1024

Qwen-Image-Edit is the instruction editor the community actually standardized on: Apache 2.0, no license paranoia, hand it a photo and a sentence and the change just happens. The one friction point that trips everyone up is resolution. The Edit model wants images at its own native sizes - roughly 1328×1328 at 1:1, 1664×928 at 16:9 - and feeding it a random 768×1024 crop is how you get drift, artifacts, or a sampler that quietly hates you.

StarQwenImageEditInputs is the input-normalizer for that workflow. You feed it your reference image (or up to four of them), tell it which ratio to use, and it hands back a ready-to-encode IMAGE, a VAE-encoded latent, and the width and height as plain integers for whatever math your graph needs downstream.

What it does under the hood

Three jobs, all of them the fiddly bookkeeping of a Qwen-Edit graph:

  1. Stitching. Give it multiple images and it composites them into one canvas (stitched). That's how multi-reference edits work - two outfit photos, a face plus a pose, whatever you need in one conditioning input.
  2. Resolution normalization. The qwen_resolution dropdown encodes the model's happy sizes, with a genuinely clever default: Use Best Ratio from Image 1 picks the closest native ratio to your input so you don't have to. There's also a Free Ratio (custom) option with custom_width/custom_height (16–8192, stepped by 16) when you know better.
  3. Encoding. It VAE-encodes the result into a latent - one less node you have to wire yourself.

batch_size (1–64) rides along for batched generations.

The inputs that matter

Honestly, just two: image1 (the required source) and qwen_resolution. Leave the custom dimensions alone until you have a reason; the presets exist because the model was tuned on them. The optional image2/image3/image4 are only there if you're doing multi-reference edits.

Wire the outputs like this: latent → your KSampler's latent input, stitched → wherever you want to see what went in, and width/height → any node that needs the dimensions (upscalers, aspect calcs). The IMAGE is optional preview; the latent is the real product.

Install

Standard for this pack, with one extra step. The pack itself is plain Python - but the README's whole point is that ComfyUI_StarBetaNodes is the retired beta repo and the nodes now ship in ComfyUI_StarNodes. Install that via ComfyUI Manager (search Starnodes) or git clone https://github.com/Starnodes2024/ComfyUI_StarNodes into custom_nodes, then restart.

The model is a separate download you still need: the Qwen-Image-Edit checkpoint (20B - grab a GGUF quant if you don't have the VRAM), its VAE, and the Qwen text encoder. ComfyUI Manager's model list or the HF repo will sort you out.

Where people get burned

Aspect mismatch is the classic one. If you pick a fixed ratio but your source image is a different shape, the node resizes to fit - so an off-ratio input can come out squished or with empty bands. That's what "Use Best Ratio from Image 1" is for; let it pick unless you have a strong reason not to. And if you see "missing model" errors, it's not the pack - it's the checkpoint/VAE/CLIP you haven't downloaded yet. This node fixes your input, not your model folder.

Category⭐StarNodes/Image And Latent

Inputs (8)

NameTypeDefaultDescription
image1IMAGE
qwen_resolutionCOMBOUse Best Ratio from Image 111 options: Use Best Ratio from Image 1, 1:1 (1328x1328), 16:9 (1664x928), 9:16 (928x1664), 4:3 (1472x1104), 3:4 (1104x1472), +5
batch_sizeINT11–64
custom_widthINT102416–8192
custom_heightINT102416–8192
image2optIMAGE
image3optIMAGE
image4optIMAGE

Outputs (4)

NameTypeDescription
stitchedIMAGE
latentLATENT
widthINT
heightINT