CivArchive
    Qwen 2511 2509 Swap Anyting (head, face, body, outfit, etc..) - v3
    NSFW
    Preview 125463994
    Preview 125464070
    Preview 125464068
    Preview 125464096

    About Native Workflow; FIRST OF ALL UPDATE YOUR COMFYUI !!!

    This has been the best node I've tried so far. In my tests, I saw that the 3.1 model made much better choices. Instead of person mask, I put the Sam3.1 text option where the prompt is entered. You can download the model from here and put it in the checkpoint folder; https://huggingface.co/Comfy-Org/sam3.1/tree/main/checkpoints

    ____________________________________________________________

    About V3

    I use a different node that performs the same function in place of the original Sam3 node. yolain/ComfyUI-Easy-Sam3.

    Only python 3.12. If anyone runs this node on Python 3.13, can they share it with me?

    Please upgrade your photobuf and mediapipe for "personmask" ( python_embeded\python.exe -m pip install --upgrade mediapipe protobuf google-cloud-videointelligence )

    ___________________________________________________________

    About V2

    I have added some spicy commands and their guide.. I removed the ToolYoloCropper node due to complaints. Instead, I added PersonMaskUltra V2 (Advance). I reverted to the defaults on some nodes. I simplified wf. Outfit swaps have become more consistent. But remember, when swapping outfits, you place the person whose outfit you want to copy into image2. So it's the exact opposite of what you do when swapping faces. Have fun!

    _____________________________________________________________

    About V1.2;

    In this version,

    • I added a "PERSON SWAP". This is essentially a pose swap, and it works great.

    • I add 3 variable latent. (Two vae encode and an empty latent) This way, you will be able to set the desired resolution and aspect ratio. It's better "select 1" But what is it?

    "Select 1" uses the aspect ratio of Img1 in the resulting output image.

    "Select 2" uses the aspect ratio of Img2 in the resulting output image.

    In this case, Select 2 is "tool yolo cropper."

    "Select 3" Empty Latent Image. Opens a clean page. You determine the resolution.

    In other words, you are switching between "VAE encodes and empty latent".

    • I updated the prompts, organized and simplified the nodes.

    About Outfit Swap: Outfit swap is tricky. I admit that the normal regular qwen edit workflow changes clothes better. Just type new prompt that i create. I'm providing it below. Just enter this prompt in the regular qwen edit wf;

    "Style the woman in image1, with every article of clothing in image2"

    ā˜• Buy Me a Coffee:
    šŸ”— https://buymeacoffee.com/ugurdoyduk

    ***Qwen 2511 2509 Swap Anyting (head, face, body, outfit, etc..) ***

    In this workflow, you can easily swap anything you want with *100% CONSISTENCY** and without node complexity. The chance of facial mixing is ZERO..

    Here, I utilized the advanced SAM3 model. You can easily swap faces, heads, just hair, bodies, or a part of an object. Simply type what you want to mask into the SAM3 Text Prompt panel. For example, "woman's head" or "man's hat." Everything you type in the prompt will be masked.

    Just upload the relevant images to the corresponding "load image" section. You can use any checkpoint you like. I chose Phr00t and Qwen-Image-Edit-Rapid-AIO because they are very successful. (https://huggingface.co/Phr00t/Qwen-Image-Edit-Rapid-AIO). You can trust my Ksampler settings because I did a lot of testing.

    If you want exactly the same facial expression, Use FP2 LORA and adjust 0.5, 0.6

    https://huggingface.co/DiffSynth-Studio/Qwen-Image-Edit-F2P/tree/main

    Thanks DiffSynth-Studio

    Description

    I gave up on the problematic original Sam3 node and switched to the "Easy Sam3" node

    FAQ

    Comments (15)

    elmejor9369Apr 3, 2026
    CivitAI

    i have this error, any tip?

    ValueError: operands could not be broadcast together with shapes (266,305,1,4) (266,305,4) (266,305,4)

    File "/workspace/ComfyUI/execution.py", line 534, in execute

    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/ComfyUI/execution.py", line 334, in get_output_data

    return_values = await asyncmap_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/ComfyUI/execution.py", line 308, in asyncmap_node_over_list

    await process_inputs(input_dict, i)

    File "/workspace/ComfyUI/execution.py", line 296, in process_inputs

    result = f(**inputs)

    ^^^^^^^^^^^

    File "/workspace/ComfyUI/custom_nodes/comfyui_layerstyle/py/person_mask_ultra_v2.py", line 133, in person_mask_ultra_v2

    mask_array = np.where(condition, mask_foreground_array, mask_background_array)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    ugurdoyduk341
    Author
    Apr 3, 2026

    is your mediapipe updated? (for Personmask) /// Please upgrade your photobuf and mediapipe for "personmask" ( python_embeded\python.exe -m pip install --upgrade mediapipe protobuf google-cloud-videointelligence )

    elmejor9369Apr 3, 2026

    @ugurdoyduk341Ā i've update it and now this error pops up:

    OSError: libGLESv2.so.2: cannot open shared object file: No such file or directory

    File "/workspace/ComfyUI/execution.py", line 534, in execute

    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/ComfyUI/execution.py", line 334, in get_output_data

    return_values = await asyncmap_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/ComfyUI/execution.py", line 308, in asyncmap_node_over_list

    await process_inputs(input_dict, i)

    File "/workspace/ComfyUI/execution.py", line 296, in process_inputs

    result = f(**inputs)

    ^^^^^^^^^^^

    File "/workspace/ComfyUI/custom_nodes/comfyui_layerstyle/py/person_mask_ultra_v2.py", line 90, in person_mask_ultra_v2

    with mp.tasks.vision.ImageSegmenter.create_from_options(options) as segmenter:

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/venv/lib/python3.11/site-packages/mediapipe/tasks/python/vision/image_segmenter.py", line 322, in create_from_options

    lib = mediapipe_c_bindings.load_shared_library(_CTYPES_SIGNATURES)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/workspace/venv/lib/python3.11/site-packages/mediapipe/tasks/python/core/mediapipe_c_bindings.py", line 83, in load_shared_library

    raw_lib = load_raw_library()

    ^^^^^^^^^^^^^^^^^^

    File "/workspace/venv/lib/python3.11/site-packages/mediapipe/tasks/python/core/mediapipe_c_bindings.py", line 54, in load_raw_library

    sharedlib = ctypes.CDLL(absolute_lib_path)

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    File "/usr/lib/python3.11/ctypes/__init__.py", line 376, in init

    self._handle = dlopen(self.name, mode)

    ^^^^^^^^^^^^^^^^^^^^^^^^^

    ugurdoyduk341
    Author
    Apr 3, 2026

    I don't know, but Gemini says you are using a Linux-based system. These commands might come in handy. As I said, it's not my idea. Gemini idea.

    sudo apt-get update && sudo apt-get install -y libgles2-mesa-dev libegl1-mesa-dev

    sudo apt-get install -y libgl1-mesa-glx

    elmejor9369Apr 3, 2026

    @ugurdoyduk341Ā Nothing, i'm also trying with chatgpt but no way to solve it

    elmejor9369Apr 3, 2026

    @ugurdoyduk341Ā could be a conflict between the starndard layerstyle and the advanced one? both of them have the PersonMask Ultra V2 file witch is giving me the error

    elmejor9369Apr 3, 2026

    @ugurdoyduk341Ā Confirmed, that was the issue. i've copy pasted the PersonMask Ultra V2 from the advanced to the standard and works perfectly. Thanks for your great work!, awesome workflow!

    ugurdoyduk341
    Author
    Apr 4, 2026

    @elmejor9369Ā Thanks for sharing this. Then I can use standard personmask ultra in the next upgrade. Ultimately, they both give the value we want.

    twinverticaltailApr 4, 2026
    CivitAI

    Thanks for sharing. Does this workflow only work in the Windows Nvidia environment? I am using version V3, but it prompts that the node comfyui-easy-sam3 (3) is missing. I tried to install it using the node manager, but there was a conflict: No module named 'triton'

    GtasteApr 7, 2026
    CivitAI

    Why add fabric to characters' clothes?

    OTAKKxApr 19, 2026
    CivitAI

    Waiting for that python 3.13 version, hope someone can figure it out.

    ugurdoyduk341
    Author
    Apr 20, 2026

    First download V2 wf. In the workflow. Delete "(Down)Load SAM3 Model". Double click empty wf. Re load the "(Down)Load SAM3 Model" . Make connections to Sam3 text nodes. Let it download. Then make the precision fp32. Thats it.

    OTAKKxApr 20, 2026Ā· 1 reaction

    @ugurdoyduk341Ā thanks, I just installed sam3 because a different wf needed it, will see how this works.

    SedidNeApr 30, 2026
    CivitAI

    It's not coming out the right hair color on my end (it's a random color instead). Has anyone managed to fix this?

    Workflows
    Qwen

    Details

    Downloads
    1,959
    Platform
    CivitAI
    Platform Status
    Available
    Created
    3/27/2026
    Updated
    8/7/2026
    Deleted
    -

    Files

    qwen25112509SwapAnytingHead_v3.zip

    Mirrors