Skip to content
WorkflowListedExternal
Open source

Qwen Edit - face swap, head swap, anything swap workflow — v2 pixel-perfect

Qwen Edit don't really like to do face swaps by prompting only. But there's way to force him to do this. Whole trick is around marking some area in image in red color (just blob, square) passing additional image that...

TaskImage editFamilyQwen-ImageVersionRelease 2335273 — qwen edit face swap p-p.jsonEstimated VRAMNot yet characterizedBgrade

Runtime profile

Access
External workflow
Status
Listed
Version
qwen edit face swap p-p.json
Source
Civitai
Updated
Oct 18, 2026

Source description

Qwen Edit don't really like to do face swaps by prompting only. But there's way to force him to do this. Whole trick is around marking some area in image in red color (just blob, square) passing additional image that would fit into that area (like face) and telling magic word "remove red area". Poor Qwen don't have a choice and have to put something in a place of red blob.

workflow uses rembg node to color masked area as red and openpose node to generate pose

you can use any color, will probably work

you can pass collage of 2-12 photos of person (in one image) with different perspectives and emotions (only face closeups)

you can use this trick to replace anything, like a hairstyle only, shoe, car (without openpose then)

all can be more automated with some face auto masking, but I want release simple stuff

if red is somehow passed to result image, like a red santa hat, make blob more round

it will come out plastic fantastic and not really matching the skin color, but light/shadows will be correct (skin tone matching anybody?)

you can add to prompt stuff like "wearing sunglasses", will totally work

if you mask 2 faces and pass 2 images (in one) of two different persons there's a good chance it will work (probably depends how distinct are those faces)

to increase quality you can cut out only face and torso (to provide body size context) and pass only that, then stitch it

you can use this red area trick to just perfectly inpaint/outpaint (no additional image)

In v2 I've added some stuff to use only masked area and leave rest of pixel untouched (exact same final image size). Sometimes qwen changes stuff outside red area, then this will not work.

You can try remove bypass on "Set Latent Noise Mask" and/or "ReferenceLatent Image 1" if things get weird, maybe it will help.

What you need

Model files
9.5 GiB known subtotal

Remaining hardware or download-size estimates are not available yet.

Requirements

Models

4

Node packs

4
  • comfyui_controlnet_aux

    Possible

    Node pack · Registry

  • comfyui-gguf

    Possible

    Node pack · Registry

  • Node pack · Registry

  • comfyui-rmbg

    Found

    Node pack · Registry

AI-generated commentary

AI-generated explanation based on source and configuration details. Suggestions are clearly labeled.

Purpose

  • Use this Qwen Edit workflow to swap faces or heads, replace another marked image element, or inpaint and outpaint. It takes an image, a marked area, and a prompt; swaps also use a reference image and produce an edited image.

Flow

  • For a swap, mark the target with a red blob or square, provide a fitting reference image, and include “remove red area” in the prompt. The workflow uses rembg to color the mask red and openpose to generate a pose.

Inputs and outputs

  • For a face swap, you can use one collage containing 2–12 close-up photos of the person from different perspectives and with different expressions.

  • For inpainting or outpainting, use the marked-area technique without a reference image. V2 includes an option to edit only the marked area while keeping the image dimensions unchanged.

Setup

  • The workflow names Qwen-Image-Edit-2509-Q5_K_S.gguf but gives no download URL for it, so confirm how you will obtain the file before setup.

    Suggestion

  • Before setup, confirm which installed packs provide comfyui_controlnet_aux and comfyui-gguf.

    Suggestion

Dependencies

  • The model files named for this workflow are qwen_2.5_vl_7b_fp8_scaled.safetensors, qwen_image_vae.safetensors, Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors, and Qwen-Image-Edit-2509-Q5_K_S.gguf.

  • The named node packs are comfyui_controlnet_aux, comfyui-gguf, comfyui-kjnodes, and comfyui-rmbg.

Configuration

  • You can add prompt details such as “wearing sunglasses.”

  • For body-size context, try using a cutout of only the face and torso, then stitch it.

    Suggestion · not verified

  • If things look odd, try removing the bypass on “Set Latent Noise Mask” or “ReferenceLatent Image 1.”

    Suggestion · not verified

Cautions

  • Swapped results can look plastic or miss the skin tone even when lighting and shadows look right. The marked-area-only option may fail if Qwen changes pixels outside the marked area.

  • If red appears in the result, try making the marked area rounder.

    Suggestion · not verified

Does this need to be edited?

Sign in to send an edit request.

Sources

1 source
CivitaiPrimaryVersion 2335273
civitai.com/models/2045000

Verified Oct 18

Source excerpts

3 excerpts

Source context: 6831 downloads · Type Workflows · Base model Other

Source context: 6021 downloads · Type Workflows · Base model Other

Source context: 5835 downloads · Type Workflows · Base model Other