Finally sharing my stable, production-ready head swap workflow for ComfyUI. No custom LoRA training needed.
What it does:
Swaps heads from source → target image while preserving pose, lighting, and scene context
Runs on Qwen Edit + Lightning LoRA (4 steps) – super fast
Automatic face masking, cropping, and intelligent blending
Smart system prompts generated from both images via vision models
ControlNet + depth/structure for alignment control
Final upscale with SeedVR2 for clean, polished output
Key features:
✅ Fast (4-step Lightning LoRA)
✅ Automatic mask generation & refinement
✅ Pose + expression + lighting preservation
✅ High-resolution upscaled output
Workflow includes:
AutoCropFaces for source head detection
FaceSegment for automatic face masking
Gemini vision analysis for auto-generated system prompts
ControlNet with DepthAnythingV2 + DW Preprocessor
InpaintModelConditioning to keep backgrounds untouched
SeedVR2 + blend for final upscale
Resolution auto-management to protect your VRAM
Best results for:
Portrait photography
Half-body shots
Consistent lighting scenes
When you want natural-looking identity swaps
Customization tips:
Lower ControlNet weights if you want looser/weirder edits
Increase MaskGrow blur for softer blends
Add custom prompt for some extra-details.
https://huggingface.co/olesheva/head_swap_qwen_edit
Support my work <3
Description
FAQ
Comments (30)
Trick with SeedVR2- downscale the input you wish to upscale. SeedVR2 has one major issue- when the input is too well defined, the upscaler often thinks low rez details are actually desired BLURRED focus elements. All upscalers struggle with differentiating between intentional and unintentional elements in the original input.
Anyway I'd really recommend any fan of the brilliant SeedVR2 to do A-B testing. Try with your original image, and then try with the same image at perhaps 50%- see which gives the best output in your opinion!
yeah, all your thoughts make sense. so i like to blend results together. or also use skin fix.
"No Lora needed", but instead you need a million of custom nodes and then you get a million of errors, starting with selected options that don't exist in combo boxes, API errors from Google Gemini, etc.
No Lora needed - means you dont need to use any qwen edit loras for face/head swap, cause qwen edit works well without them
but its still easy to use workflow, just download all nodes in manager. you can change gemini node for any other you have that can generate prompts...
yeah this workflow is pretty useless without the api. half the custom nodes dont install correctly and comfy cannot figure out which version is compatible to each other. looked promising in the preview picture but if OP cannot fix their spaghetti mess its not worth the headache.
@oleshevakatya I'm not saying it's not easy to use or that it doesn't look outstanding, but for now I'm struggling to initially setup it. I'm not so experienced at this.
I'll try to use Qwen 3 VL, but apart from that, what to do with this error, for example:
- Value not in list: scheduler: 'sigmoid_offset' not in ['simple', 'sgm_uniform', 'karras', 'exponential', 'ddim_uniform', 'beta', 'normal', 'linear_quadratic', 'kl_optimal', 'bong_tangent', 'beta57']
@Atega u can paste that instructions on gemini or chatgpt how is this workflow is useless ,and for custom node not installed its ur comfy issue dont judge him
@tsunamix use bong_tangent scheduler
Did you get it working with QWEN 3 VL?
@nikolaibloom805 Only the QWEN 3 VL part. Then it shows no errors but just gets stuck. I guess 8GB VRAM is not enough for this workflow.
Thanks for the heads up. Civitai should have a downvote button.
@tsunamix I have the same issue even with my 3090 24gb vram. like 2/10 times it worked but took like 5+ minutes to start the ksampler
Thank you for sharing this, it's closer to any other workflow I've tried. One trouble I have is that the mask sometimes auto detects the wrong thing i.e. an item of clothing or a hand, thinking it's part of the head. Do your masks generally work with default settings or did you have to change it around a bit? I'm trying to shift the grow to see if that helps.
hi! thanks. in such situations the best decision is to draw mask manually. bypass segmentation node. draw mask on image with righ click (open maskeditor). connect mask with mask on layer mask decrease grow and blur to idk 5 for both
or just try different nodes for segmentation
@oleshevakatya Can I pay you to do the swaps for me since my machine is not giving me the same quality as your examples. I would pay a minimum of $50 and we can discuss how many photos for that price.
goat delivers again 🐐
The only thing missing was the scheduler, where did you get that one? (sigmoid_offset)
https://github.com/silveroxides/ComfyUI_SigmoidOffsetScheduler
you can also run with bong_tangent
I got this WF working with Qwen3VLM node instead of Gemini API and also with Z-Image as Refiner after the SEEDVR2 upscale from 420p downscaled first then 2K upscale.
My issue I am having is the hallucination of Qwen Image in the masked area (sunglasses, phone selfie, weird things). I tried higher Controlnet weight and also tried SAM3 instead of Face Segment which works very well. Also I don't get those high quality outputs as your samples. Have you used other than the Qwen Image 4 Steps lora like the Qwen image Edit 4 Steps lora etc. instead ? I tried only bong_tangent and sigmoid_offset scheduler so far with 4 steps, maybe you have some advice for better outputs. I would love to see a Flux2 workflow to try it out. Anyways thanks for the workflow its good.
maybe you show me whats you get, do i can look at workflow. i used to try and the best results i have only w 4 steps lightning, also i was trying 8step lightning v2.0 for 0.5 and 13 steps
so yeah send your any result with metadata i will take a look
can you share the workflow you have working with the qwen3 llm and which qwen LLM model are you using
@nikolaibloom805 Just change the Gemini API nodes with the Qwen3VL nodes and copy the system prompt first from the gemini node. I am using this custom node for Qwen3VL https://github.com/IuvenisSapiens/ComfyUI_Qwen3-VL-Instruct
So far I only tried the 4b Instruct model.
@Sawlike can you still upload the wf where you replaced it with SAM3 now that I have everything downloaded. Thank you. My usual Qwen wfs take like 2 min or less to run with a 3090 24GB VRAM and 128GB RAM idk why I can't get the ksampler to start. It worked once and only once. Does it not resize the input image to a Qwen friendly resolution since I am using large resolution photos for the body image
@nikolaibloom805 I mean sure I can share it with you if it helps: https://pastebin.com/7FSLiAgU
You will probably not get it running with 24GB VRAM since this is optimized for 96 GB VRAM. You need to turn off the Refiner and Seedvr2 Upscaler and maybe use GGUF load model nodes. The workflow automatically scales the Input images to the right sizes.
@Sawlike wow what are you running in your computer
@nikolaibloom805 I am using a RTX 6000 Pro
@Sawlike I sent you a DM
Привет! Спасибо за воркфлоу! Подскажите, плз, как именно мне настроить доступ через API к модели gemini и откуда я могу скачать seedvr2 ноды?
TX: Hi! Thanks for the workflow! Could you please tell me exactly how to set up API access to the Gemini model and where I can download the seedvr2 nodes?
ty nice work but i dont get how to install seedvr2
PLSSSS HELP I WANT TO CRYYYY T-T








