🚀 Flux2 Easy Swap: Head, Face or Outfit
About V1.1
Fixing Minor ıssues. Please upgrade your photobuf and mediapipe for "personmask" ( python_embeded\python.exe -m pip install --upgrade mediapipe protobuf google-cloud-videointelligence )
This workflow is optimized for the Flux model to perform natural and high-quality swaps of faces, heads, or outfits using PersonMaskUltra V2.
***HEAD OR FACE SWAP***
In the PersonMask Node
Img1 enable; body, clothe,accecories background
Img2 enable; face, hair
Prompt; It's best to leave this blank. Don't write anything. When you write something, the head size appears large and the colors may not match.
or
Prompt; "Replace the entire face and hair-style in image2 with the person image1. Make the face and body proportions perfect in the final image."
***OUTFIT CLOTHING SWAP***
In the PersonMask Node
Img1 enable; face,hair,body,background
Img2 enable; clothes
Prompt; "Style the person in image1, with every article of clothing in image2. In the final image, all the features of the clothes should be on the person in image1.
"
☕ Support My Work
Description
Fixing Minor ıssues. Please upgrade your photobuf and mediapipe for "personmask" ( python_embeded\python.exe -m pip install --upgrade mediapipe protobuf google-cloud-videointelligence )
FAQ
Comments (5)
I'm getting:
ValueError: operands could not be broadcast together with shapes (1348,933,1,4) (1348,933,4) (1348,933,4)
first of all; Please upgrade your photobuf and mediapipe for "personmask" ( python_embeded\python.exe -m pip install --upgrade mediapipe protobuf google-cloud-videointelligence )
Avoid Transparent Images: Ensure that your input images (IMG1 and IMG2) are standard RGB files (like JPG or non-transparent PNG). Transparent backgrounds or Alpha channels often trigger this dimension mismatch error during masking.
Force RGB Conversion: If you must use images with transparency, insert an "Image to RGB" or "Remove Alpha Channel" node immediately after your Load Image nodes. This ensures the tensor shapes remain consistent ($H, W, 3$) throughout the workflow.
Update Custom Nodes: Verify that your masquerade-nodes (Cut By Mask) and ComfyUI_LayerStyle_Advance (PersonMask) suites are fully updated. Also, ensure your environment is running numpy 1.26.4 for maximum stability with these specific nodes.
@ugurdoyduk341Â Thanks for the reply. Everything was updated. I have fixed it with a short code snippet in the personmask v2 py file.
Gorgeous work. Thx for sharing.
Thanks!


