artokun/comfyui-mcp/qwen-image-edit
Claude Code and agent skill by artokun/comfyui-mcp
- community
Checking that the SKILL.md file is still in the repository.
Build Qwen Image Edit workflows covering model loading, conditioning, LoRAs, prompt patterns, and XY plot testing
Install
npx vskill@latest install artokun/comfyui-mcp/qwen-image-editSKILL.md
The same SKILL.md was published earlier as artokun/comfyui-mcp/qwen-image-edit.
Qwen Image Edit Workflows
Overview
Qwen Image Edit uses a vision-language model (Qwen2.5-VL) to edit images based on natural language instructions. The model "sees" the source image through CLIP conditioning and generates an edited version.
Models
Required Components
| Component | Node | Model Name | Notes | |
|---|---|---|---|---|
| UNET | UNETLoader | qwen_image_edit_2511_bf16.safetensors | Official 2511 edit model (bf16) | |
| CLIP | CLIPLoader (type=qwen_image) | qwen_2.5_vl_7b_fp8_scaled.safetensors | Shared across all Qwen models | |
| VAE | VAELoader | qwen_image_vae.safetensors | Qwen-specific VAE |
Alternative UNET Models
| Model | Path | Focus | |
|---|---|---|---|
qwenImageEditRemix_v10 | qwenImageEditRemix_v10.safetensors | Community remix, general editing | |
qwenUltimateRealism_v11 | Qwen/imageized/qwenUltimateRealism_v11.safetensors | Product photography, hyper-realistic | |
copaxTimeless | Qwen/realistic/copaxTimeless_qwenUltraRealistic.safetensors | Ultra-realistic portraits | |
qwnImageEdit_v16Bf16 | Qwen/abliterated/qwnImageEdit_v16Bf16.safetensors | Abliterated (uncensored) |
Conditioning Nodes
TextEncodeQwenImageEditPlusAdvance_lrzjason (Recommended)
From the qweneditutils custom node pack. The Advanced variant is preferred because it:
- Outputs a LATENT directly (no need for separate EmptyLatentImage)
- Has separate VL-resize and non-resize image slots for fine control
- Supports target_size control for output resolution
- Includes a pad/center/disabled crop method with pad_info output
Key advantage: Output [1] (latent) eliminates the need for a separate EmptyLatentImage or VAEEncode node. The Advanced node handles latent creation internally at the correct resolution.
Other Conditioning Variants
- TextEncodeQwenImageEditPlus (built-in) accepts up to three optional reference images (
image1,image2, andimage3) and outputs only CONDITIONING. Supply the sampler latent separately using the workflow for your model. - TextEncodeQwenImageEditPlus_lrzjason: 5 image inputs, resize toggles, but less control than Advance
- TextEncodeQwenImageEditPlusPro_lrzjason: Per-image VL resize selection via
vl_resize_indexsstring,main_image_indexcontrol
Lightning LoRAs (Fast Generation)
4-Step Lightning (2511 Edit)
Settings: steps=4, cfg=1.0, sampler=euler, scheduler=simple, denoise=1.0
4-Step Lightning (General Qwen)
For non-edit models (txt2img, 2512):
Qwen-Image-Lightning-4steps-V1.0.safetensors(strength 1.0)
8-Step Lightning
Qwen-Image-Lightning-8steps-V1.0.safetensors, higher detail than 4-step
Sampler Settings
| Preset | Steps | CFG | Sampler | Scheduler | Denoise | LoRA | |
|---|---|---|---|---|---|---|---|
| Lightning 4-step (2511 edit) | 4 | 1.0 | euler | simple | 1.0 | 2511-Lightning-4steps | |
| Lightning 8-step | 8 | 1.0 | euler | simple | 1.0 | Lightning-8steps | |
| Standard edit | 40 | 4.0 | euler | simple | 0.75 | none | |
| Quality edit | 50 | 4.0 | euler | simple | 0.5-0.8 | none |
The sub-1.0 denoise rows REQUIRE a `VAEEncode` latent. A denoise low enough toshorten the sampling schedule — which 0.5-0.8 certainly is — keeps part of theincoming latent, so that latent has to BE the source image. Wirelatent_imagefromaVAEEncodeof the source (or from a node that emits a source-derived latent, likeTextEncodeQwenImageEditPlusAdvance_lrzjasonoutput [1]). Pairing these rows with anEmptyLatentImageruns clean and returns a flat, near-uniform field — an empty latenthas no source content to preserve. Feeding the reference throughTextEncodeQwenImageEditPlusdoes not rescue it: that image rides on CONDITIONING,which steers denoising but never seeds the sampler's starting state.
Denoise for editing: Lower denoise = closer to source — provided the latent IS the source. 0.5-0.8 range for standard editing on a VAEEncode latent. Lightning uses 1.0 (model handles fidelity internally).
Resolutions
**This table is for Qwen-Image TEXT-TO-IMAGE. Do not pick an edit graph's outputsize from it.** An edit graph's geometry is decided by the SOURCE image, not by you— see "Resolution on an edit graph" below. Choosing 1104x1472 here for an edit was#2681.
Qwen-Image operates at ~1.6 megapixels natively:
| Aspect | Resolution | Use Case | |
|---|---|---|---|
| Square | 1328x1328 | General | |
| Portrait 3:4 | 1104x1472 | Portraits | |
| Portrait 9:16 | 928x1664 | Phone format | |
| Landscape 4:3 | 1472x1104 | Landscape scenes | |
| Landscape 16:9 | 1664x928 | Widescreen | |
| Video-ready | 832x480 | For WAN 2.2 FLF pipeline |
For video pipelines: Use 832x480 to match WAN 2.2's default resolution.
Resolution on an edit graph
TextEncodeQwenImageEdit and TextEncodeQwenImageEditPlus do not take a size. They scale every reference image to a hard-coded int(1024 * 1024) px — ~1.05 MP, at the source's own aspect ratio — VAE-encode it, and hand it to the model as a reference latent (comfy_extras/nodes_qwen.py).
The model then lays the reference tokens and the tokens it is generating on one shared, centred coordinate grid (comfy/ldm/qwen_image/model.py, process_img), so reference position (i, j) and output position (i, j) mean the same place only when the two grids are the same size. That is the whole reason the official templates run the one image through FluxKontextImageScale and then feed the sampler a VAEEncode of that scaled image — both branches then see the same pixels at the same ~1 MP scale and the same aspect. Every PREFERRED_KONTEXT_RESOLUTIONS entry is ~1.05 MP for the same reason.
It is agreement to within the encoder's round-to-8, not exact equality, and the difference is worth knowing precisely. FluxKontextImageScale snaps to a preferred pair; the encoder then renormalises that to its own 1,048,576 px budget. For 12 of the 18 preferred pairs the two land on the same latent grid. For the other 6 — 688x1504, 800x1328, 832x1248 and their landscape mirrors — the reference lands one latent row or column off: at 800x1328 the sampler's grid is 100x166 and the reference's is 99x165. ComfyUI's own bundled 2511 template does exactly this, so a sub-patch offset is evidently fine in practice. The failure this page is about is one of SCALE, not of rounding — an empty latent at 1104x1472 sits 1.24x away linearly, not one row.
So on an edit graph you do not choose a resolution — you inherit one:
- Right:
LoadImage->FluxKontextImageScale-> (TextEncodeQwenImageEditPlus
and VAEEncode) -> KSampler latent_image.
- Wrong: an
EmptyLatentImageat a size from the table above. Its dimensions are
literals; the reference's are computed from the source when the graph runs. At 1104x1472 (1.63 MP) against a 1.05 MP reference the grids are 1.24x apart linearly, the model cannot copy detail across them, and it re-synthesises the subject instead — materials come back looking plastic/CGI and printed detail comes back as a generic shape (#2681). Nothing errors; the image just is not the edit you asked for.
create_workflow (action:"validate") now flags this pairing as edit_reference_empty_latent.
Prompt Patterns
Edit Instructions (Natural Language)
Multi-Angle LoRA (qwen-image-edit-2511-multiple-angles-lora)
Uses <sks> token with structured angle/distance prompts:
Template: <sks> {direction} view {angle} shot {distance}
Directions: front, front-right quarter, right side, back-right quarter, back, back-left quarter, left side, front-left quarter Angles: low-angle, eye-level, elevated, high-angle Distances: close-up, medium shot, wide shot
Negative Conditioning
Always use ConditioningZeroOut for negative conditioning with Qwen edit:
Complete Workflow: Lightning Edit (Advanced Node)
Uses TextEncodeQwenImageEditPlusAdvance_lrzjason, which outputs the latent directly, so no EmptyLatentImage is needed.
Key connections:
"latent_image": ["6", 1]: KSampler gets its latent directly from the Advanced node's output [1]"positive": ["6", 0]: conditioning_with_full_ref from output [0]"vl_resize_image1": ["5", 0]: source image goes into VL-resize slot (downscaled for vision encoder)
Simpler Alternative (Phr00t v2)
If qweneditutils custom node is unavailable, use the built-in TextEncodeQwenImageEditPlus with a separate EmptyLatentImage:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/qwen-image-edit/SKILL.md
Popularity
- Repository stars
- 651
- Repository forks
- 101
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/artokun/comfyui-mcp/qwen-image-edit)