ComfyUI Node

pre_QwenEdit

Deprecated one-node Qwen-Image-Edit setup

By cardenluoĀ·Created 2 years agoĀ·Updated 18 days agoĀ· 309
pre_QwenEdit
  • context
  • image
  • mask
  • context
  • positive
  • latent
ā—„ref_edittrueā–ŗ
ā—„mask_conditrueā–ŗ
ā—„model_shift3.00ā–ŗ
ā—„smoothness0.0ā–ŗ
ā—„posā–ŗ

Filed under the pack's Deprecated category, so treat this as a "here's what it used to do" reference rather than a recommendation. The README's changelog mentions a dedicated "General Control QwenEdit Stack" of newer nodes for multi-image reference and union-controlnet work with Qwen-Image-Edit - that's almost certainly what superseded this one, though it isn't one of the nodes covered on comfy.icu today. If you're setting up a fresh Qwen-Image-Edit workflow, look for that stack in the current pack rather than reaching for this node.

What it did

Qwen-Image-Edit is the instruction-editor everyone reaches for now: hand it an image and a sentence - "remove the watermark," "change her dress to blue" - and it does the edit without a mask, because it dual-encodes the input both semantically (via its own vision-language encoder) and pixel-wise (via the VAE). This node bundled the basic version of that into one preset: an image, an optional mask, a text prompt (pos), and a couple of Qwen-specific tuning knobs, producing conditioning and a latent ready for the sampler.

The inputs and outputs that matter

  • image (optional) - the picture you're editing.
  • pos (optional, multiline text) - your edit instruction, plain language, no mask required for the core behavior.
  • mask (optional) - if you want to constrain the edit to a region rather than let the whole frame re-render.
  • ref_edit (default true) - whether the input image is treated as a reference for the edit rather than pure noise; leaving this on is the normal editing mode.
  • mask_condi (default true) - whether the mask, when present, is fed in as conditioning (closer to the modern InpaintModelConditioning pattern) rather than a crude post-hoc composite. This is the difference between the model actually reasoning about the masked region versus just being told to leave it alone.
  • model_shift (default 3, range 0–100) - Qwen-Image-Edit's timestep shift. This is the flow-matching-era replacement for the old scheduler-tuning habit: it controls how sampling effort splits between overall composition and fine detail, and it's genuinely model-specific - 3 is a reasonable starting point but not universal, so don't assume the default is right for every edit.
  • smoothness (default 0, range 0–10) - mask edge feathering. Higher values soften the transition between edited and untouched pixels; 0 gives you a harder boundary.
  • Outputs: context passthrough, positive (CONDITIONING), and latent.

How to install it (for archival purposes)

Search ComfyUI-Apt_Preset in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/cardenluo/ComfyUI-Apt_Preset.git

install.bat is the Windows dependency installer; on Linux or Mac, read what it runs and pip-install those commands yourself. You'll also need the actual Qwen-Image-Edit weights - the 20B model is out of reach for most consumer cards at full precision, so a community GGUF quantization plus a Lightning step-reduction LoRA is the realistic way to run it locally.

Common issues & troubleshooting

Edits shift pixels outside the region you meant to touch. This is a known, structural limit of Qwen-Image-Edit itself, not a bug in this node: the model re-emits the whole frame rather than patching a region, so unedited areas come back close but not byte-identical, and the drift compounds over a chain of edits. If you need pixel-exact preservation outside the edit, this preset's built-in mask_condi path isn't enough - you want a proper crop-and-stitch pass around the model instead.

model_shift at the default doesn't seem to be doing much, or over-corrects. It's model- and content-specific; treat 3 as a starting point to nudge up or down rather than a value to leave untouched, especially if the edit reads as either too conservative or too aggressive in how much detail it reworks.

The node is missing after updating the pack. Expected - it's deprecated and may get removed from newer releases entirely. Pin an older commit of ComfyUI-Apt_Preset if an existing workflow depends on it, or migrate to the pack's current QwenEdit stack.

CategoryApt_Preset/🚫Deprecated/🚫

Inputs (8)

NameTypeDefaultDescription
contextRUN_CONTEXT—
imageoptIMAGE—
maskoptMASK—
ref_editoptBOOLEANtrue—
mask_condioptBOOLEANtrue—
model_shiftoptFLOAT3.000–100—
smoothnessoptFLOAT0.00–10—
posoptSTRING—

Outputs (3)

NameTypeDescription
contextRUN_CONTEXT—
positiveCONDITIONING—
latentLATENT—