Nodes/Fat Mex Nodes/Fat Mex Image Edit Sampler
ComfyUI Node

Fat Mex Image Edit Sampler

Tell Qwen-Image-Edit what to change. That's the whole workflow.

By FatMex·Created 7 months ago·Updated 7 months ago· 3
Fat Mex Image Edit Sampler
  • model
  • clip
  • vae
  • image1
  • image2
  • image3
  • images
  • latent
prompt
negative_promptugly, blurry, deformed, bad anatomy, low quality
seed0
preset_hintauto
steps0
cfg0.0
sampler_nameauto
schedulerauto
width1024
height1024
layers3

The old way of editing an image - paint a mask, hope the inpaint holds, re-roll forever - has mostly been replaced by telling a model what to change in a sentence. This node is that workflow, collapsed into one box: reference images in, an edit described in plain English, an edited image out.

It wraps the entire Qwen Image Edit stack - TextEncodeQwenImageEditPlus + EmptyQwenImageLayeredLatentImage + KSampler + VAEDecode - which is exactly why it's fiddly to build by hand and why you'd rather have it as a single node. Qwen-Image-Edit is the default open instruction editor of this era (Apache 2.0, no Kontext-style content policing), and it handles object removal, garment swaps, relighting, re-posing, and face edits from a sentence, no mask and no ControlNet.

How it works

Under the hood it replicates TextEncodeQwenImageEditPlus conditioning. Each reference image gets two jobs:

  1. A small 384×384 version goes into the vision-language encoder, so the Qwen2.5-VL text encoder actually sees the picture and understands "image 1" when you say it.
  2. A ~1MP reference latent is attached as identity conditioning, so the model has real pixel-level information about the subject, not just a fuzzy thumbnail.

It then builds the Qwen layered latent - a 5D tensor with layers + 1 layers, one per reference plus the output - samples, decodes, and keeps only the final layer (the intermediate ones are internal reconstruction passes).

The inputs that matter

  • prompt - describe the edit and refer to your references as "image 1", "image 2", "image 3". That's the contract: image1 is "image 1" in the prompt.
  • image1 / image2 / image3 - the references. One is often enough; three lets the model compose (subject + outfit + scene, for example).
  • layers - the Qwen layered-latent depth, default 3, "usually = number of images." If you use two references, 2-3 layers is right.
  • model, clip, vae - from the Fat Mex Model Loader, and here's the catch: load a Qwen Image Edit preset (2509 or 2511), not Klein.
  • width / height - output size; steps, cfg, preset_hint behave like the other samplers (0 / auto = preset defaults).

Outputs: images (the edit) and latent.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/FatMex/ComfyUI-FatMex-Nodes.git FatMex-Nodes
pip install -r FatMex-Nodes/requirements.txt

Or ComfyUI Manager → search "Fat Mex Nodes" → Install → restart. You'll also need the Qwen Image Edit model files in your ComfyUI/models/ folders (the loader presets name them exactly).

Where people get burned

  • Wrong model loaded. If you loaded a Klein or Z-Image preset, this node is sampling with an architecture that doesn't do layered Qwen editing. The model, clip, and vae inputs expect the Qwen Edit trio. This is the #1 cause of garbage output here.
  • Prompt says "image 2" but no image2 is connected. Referencing a picture you didn't wire in just confuses the encoder. Keep prompt references and connected inputs in sync.
  • It edits the whole canvas. Like all instruction editors, Qwen-Image-Edit takes the context and emits a new image - regions you didn't mention will drift slightly. For surgical, mask-locked changes you want the classic mask route; for "change the shirt / add sunglasses / different background," this is the right tool and the KB says most of the community moved to it.
  • Negative prompt is real here. Unlike the pack's inpaint variant (which zeroes the negative for quality), this node actually encodes your negative text - but on Qwen Edit models it's a light touch, so don't rely on it for structural fixes.
CategoryFat Mex

Inputs (17)

NameTypeDefaultDescription
modelMODELModel from Fat Mex Model Loader (Qwen Edit preset).
clipCLIPCLIP from Fat Mex Model Loader.
vaeVAEVAE from Fat Mex Model Loader.
promptSTRINGDescribe the edit. Reference images as 'image 1', 'image 2', etc.
negative_promptSTRINGugly, blurry, deformed, bad anatomy, low qualityWhat to avoid.
seedINT00–18446744073709550000
image1optIMAGEReference image 1 (e.g. the face to use).
image2optIMAGEReference image 2 (optional).
image3optIMAGEReference image 3 (optional).
preset_hintoptCOMBOauto8 options: auto, Klein 9B, Klein 9B True, Qwen Image Edit 2509, Qwen Image Edit 2511, Qwen Image 2512, +2
stepsoptINT00–100Override steps (0 = preset).
cfgoptFLOAT0.00–100
sampler_nameoptCOMBOauto45 options: auto, euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, +39
scheduleroptCOMBOauto10 options: auto, simple, sgm_uniform, karras, exponential, ddim_uniform, +4
widthoptINT102464–16384Output width.
heightoptINT102464–16384Output height.
layersoptINT30–16Qwen layered latent layers (usually = number of images).

Outputs (2)

NameTypeDescription
imagesIMAGE
latentLATENT