Sign In

Character Head Swap V1 – Low VRAM | ComfyUI + Z-Image Turbo + SAM3

Type

Workflows

Stats

182

0

Reviews

Published

Mar 19, 2026

Base Model

ZImageTurbo

Hash

AutoV2
7172791A46

This workflow lets you take a custom character — one you've trained a LoRA for — and seamlessly blend their face onto any target image, all inside ComfyUI. The heavy lifting is handled by the Z-Image Turbo diffusion model, a fast and efficient model that understands context well without demanding high-end hardware. If you're running with as little as 8GB of VRAM, you can pull this off without issues — hence the "Low VRAM" in the name.

The original concept was put together by RetroGazzaSpurs over on the Stable Diffusion subreddit — huge credit to them for the original design. ⚠️ Note: I had to tweak the original workflow because the SAM3 nodes in the original were not functioning correctly.


How It Works

The workflow follows a clean, logical pipeline:

  1. Input image is loaded and resized — a ResizeImagesByLongerEdge node scales it down to a manageable size for the first pass.

  2. Auto-captioning with JoyCaption — the target image is automatically analyzed using the JC_adv (JoyCaption) node to generate a descriptive prompt. This is concatenated with your own prompt text to guide the generation.

  3. SAM3 Segmentation — a LoadSAM3Model node loads the SAM3 segmentation model (sam3-fp16.safetensors) which precisely isolates the face and hair region in your target image, creating an automatic mask. No manual masking needed.

  4. Mask refinement — masks are combined and passed through the pipeline to create a clean, targeted inpainting region.

  5. LoRA-guided inpainting with Z-Image Turbo — your character LoRA is loaded via the Power Lora Loader node and combined with the Z-Image Turbo base model. The DifferentialDiffusion node ensures smooth, context-aware blending at the mask boundary.

  6. VAE decode and compositing — the result is decoded and stitched back into the original image using a dedicated stitcher node, giving you a clean, natural-looking final output.

📺 Full video tutorial:


Requirements

  • ComfyUI (latest recommended)

  • Z-Image Turbo model + its VAE (z-image-turbo-vae.safetensors)

  • SAM3 segmentation modelsam3.pt placed in models/sam3/

  • A character LoRA trained on Z-Image Turbo (see below if you need to train one)

  • Custom Nodes needed:

    • comfyui-easy-sam3 (yolain/ComfyUI-Easy-Sam3)

    • comfyui-joycaption (1038lab/ComfyUI-JoyCaption)

    • was-node-suite-comfyui (ltdrdata)

    • rgthree-comfy (Power Lora Loader)


Don't Have a Character LoRA?

You'll need a Z-Image Turbo LoRA of your character for this workflow. If you don't have one, you can browse Civitai to find something close. If you want to train your own from scratch, I put together a dedicated tutorial on training Z-Image Turbo LoRAs using AI-toolkit — both locally and on a cloud GPU. Check the YouTube description for the link.


One-Click Windows Installer (Patreon)

Setting up custom nodes and model dependencies manually can be a headache. If you'd rather skip all of that and get straight to creating, I've put together a one-click Windows installer for this workflow. It handles all the downloads and node setup automatically.

👉 Get the installer on Patreon

The Patreon post also includes all relevant commands and links in one place.


Credits

  • Original workflow concept: RetroGazzaSpursReddit post

  • Z-Image Turbo model developers

  • SAM3 segmentation: yolain/ComfyUI-Easy-Sam3

  • JoyCaption: 1038lab/ComfyUI-JoyCaption