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
Description
2511,2509 is suitable for both models.
FAQ
Comments (27)
I am receiving this error at the Ksampler
The size of tensor a (19555) must match the size of tensor b (24) at non-singleton dimension 2
always copy and paste the error log into an LM, you will learn a lot that way
Hmm. I replaced the Ksampler node with the old -regular node. Could you please download the new zip file and try again?
@ugurdoyduk341 it was the sage attn node i had to bypass it
@nikolaibloom805 I guess I forgot to bypass it. Sorry for bothering you.
Great workflow for a first try! I had to upgrade the models and lora's (to fp8 2511 and consistency), then it works much better.
I'm so glad, thank you for the nice feedback.
can you share your version of the workflow that you got to work better
@nikolaibloom805 I didn't save any version for myself. I already updated the file three times. Where did you get stuck?
Amazing work. I am toying with it the whole day.
- I just can't get the outfit swap working. My desired outcome would be an outfit transfer from a dummy image to the main image, without changing the pose or character of the main image's person. Right now it renders the dummy image with its outfit, but pink.
- Is it possible to inject a 3d image? Like for a new background.
Thx
Hey, thanks for the feedback. I worked on it quite a bit after your question. First, let's change the color of the "Draw Mask On Image" node. Let's make it "0, 255, 60". The light green color is such a bad color for the mask that Qwen can't mix it up. Then type this into the prompt.
"“First, remove all top and bottom clothing from image1. (Ignoring the shape of the green mask, transfer the clothing of the person in image2 to the body of the person in image1: 1.35).
(Please consider the shape, structure, and number of pieces of the garment .With Ignoring the shape of the green mask, simply transfer exactly the same clothing from image2 to the person's body in image1). (Make sure all the clothing in image2 is exactly the same as the clothing worn by the person in image1).
Do not create new pieces or combine/separate pieces.
Place the clothes naturally on the existing body in image1 without changing the pose, proportions, and silhouette.
Do not change the face, skin tone, lighting, environment, or emotion in image1.
Zero color tone, zero color aberration,
Use the clothes from image2 as they are.” Keep anything else unchanged."
Is it possible to inject a 3d image? Like for a new background? Sure why not. Just add the new image and whats in it. Be sure to mention it in your prompt. You can also increase the number of Sam3 texts.
Oh, switch ToolYoloCropper to "person". If there is no person and only clothing is present, bypass this node.
Anyway to change the image resolution? or scale it to the source image?
I have a node hidden under the image comparer node that says "image 1 scale or image scale to total pixels"; just bypass it. Or, if you can, use empty latent instead of vae encode and enter your desired resolution.
@ugurdoyduk341 @SwapThatLad I did have mixed quality (face likeness) results when using larger resolutions let me know your experience
@nikolaibloom805 Yeah, the face changes with higher resolution
@SwapThatLad I was hoping for an inpaint crop and stitch sort of thing so it can still look good on pics where the face is far away
@SwapThatLad
i just have had to resort to cropping a close up face from a 4k > seedvr > faceswap > seedvr to the original size and putting it back on the original but it looks stellar then
@nikolaibloom805 @SwapThatLad Try vers 1.2. I added 3 diffferent "variable latent".Because I got pretty good results with "empty latent" at high resolution. Actually, it's impossible for the two faces to mix up. Because the reference image is actually the image produced by the "Draw Mask On Image" output. But when I set the "image scale to total pixel" value to 3 megapixels, I also noticed distortions and oddities in the face. Anyway. Thanks for the feedback!
@ugurdoyduk341 thank you so much I will try that now
@ugurdoyduk341 Tried it your workflow keeps getting better and better. Is there anyway to match the skintone from either the source or reference onto the final image. The face always keeps the skintone and doesn't blend in. That is the last thing I think I need to have work unless I am doing something wrong or missing a prompt.
@nikolaibloom805 I think it's more than enough on its own. A very strong face (actually good on objects too) consistency lora. There is no trigger word. When you set it to very high settings, problems when swapping.
@ugurdoyduk341 As for the skintone not matching any thoughts.
@nikolaibloom805 It happens when you use Lora, you can't do anything it. I don't think there's a problem without Lora.
Hi, I got some missing node error related to SegmentEverything v2 for that version. So I tried the simple version and I got a Label error? I couldn not get either version to work. My Comfy is up to date but maybe I have something else installed that is causing issues.
Hi. This is created by sam3. Not sam2. You have to install this https://github.com/PozzettiAndrea/ComfyUI-SAM3







