CivArchive
    Qwen Edit - face swap, head swap, anything swap workflow - v2 pixel-perfect
    NSFW
    Preview 107028290
    Preview 107028294
    Preview 107028901

    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.

    Description

    FAQ

    Comments (10)

    angelfive036698Oct 28, 2025
    CivitAI

    I think he recognizes the mask, but he doesn't wear a red mask on his face. Why is that?

    Luntrix
    Author
    Oct 28, 2025

    he? who is "he"? why is what? Can't understand this sentence

    axuuhyt945Jan 12, 2026

    @Luntrix He is Comfyui with the workflow

    kissonatorNov 12, 2025
    CivitAI

    That's so smart! -Thanks!

    sir_noise525Nov 29, 2025
    CivitAI

    I'm sure you put a lot of work into it, and I appreciate that, but all I'm getting are blurry, indistinct, and poor-quality heads. I've been trying for two hours. The results are consistently bad. I'm at a loss.

    Luntrix
    Author
    Nov 29, 2025

    Hum, must be something wrong with your workflow then. I never got blurry results.

    sir_noise525Nov 29, 2025

    @Luntrix Strange, I didn't change the workflow and tried it with Q8 gguf on a 3090.

    Ses_AIMar 2, 2026
    CivitAI

    Have you tested it with 2511? I also get strange results with mask not fully removed, like it has redness in final result

    ApchXiMar 21, 2026
    CivitAI

    Nice work!!!!

    themaverick4000591Apr 5, 2026
    CivitAI

    Nice work, Love U

    Workflows
    Other

    Details

    Downloads
    2,903
    Platform
    CivitAI
    Platform Status
    Available
    Created
    10/21/2025
    Updated
    5/1/2026
    Deleted
    -

    Files

    qwenEditFaceSwapHeadSwap_v2PixelPerfect.zip