## 🎯 Overview
A complete, streamlined **ComfyUI workflow for realistic Head & Face Swap** powered by **Qwen Image 2.1**. Designed to preserve the base image's lighting, background, clothing, and grain while seamlessly transferring facial identity, hair, and features from a reference image.
The workflow is pre-configured for **2K resolution output** to prevent detail loss and color shifting, and uses an **8-step acceleration LoRA** for fast generation without sacrificing quality.
---
## ✨ Key Features
* **2K Native Processing:** Automatically scales inputs via ResolutionSelector (default: 2MP / 1:1) to preserve micro-details, skin texture, and original color grading.
* **Fast 8-Step Generation:** Uses euler / simple at CFG 1.0 with QwenImage21Cache enabled for rapid inference.
* **Modular 4-LoRA Stack Fast Bypasser):** Easily toggle individual LoRAs on/off from a single control panel:
1. p_qwen_image_2.1_8step_v0.1-comfyui-T8.safetensors (Speed boost)
2. bfs_head_v1.1_qwen_2.1.safetensors (Head/Face swap precision)
3. qwen-image-2.1-consistency.safetensors (Identity & scene consistency)
4. qwen-image-2.1-restore.safetensors (Detail & texture restoration)
* **Multi-GPU Ready:** Offloads CLIP Qwen3-VL-8B) and VAE to a secondary GPU cuda:1) to save VRAM on your primary card (easily switchable to cuda:0 or cpu for single-GPU setups).
* **Built-in Comparison & Grid Export:** Includes an interactive before/after slider Image Comparer) and automatically generates a side-by-side comparison strip Reference 1 + Reference 2 + Result) with the prompt stamped below.
---
## 📦 Required Models & LoRAs
### Diffusion Model ComfyUI/models/diffusion_models/)
qwen_image_2.1_bf16.safetensors (or qwen_image_2.1_int8_convrot.safetensors for lower VRAM)*
### Text Encoder ComfyUI/models/text_encoders/)
qwen3vl_8b_bf16.safetensors (or int8_convrot)*
### VAE ComfyUI/models/vae/)
* qwen_image_2.1_vae_bf16.safetensors
### LoRAs ComfyUI/models/loras/)
* p_qwen_image_2.1_8step_v0.1-comfyui-T8.safetensors (Strength: 1.0)
* bfs_head_v1.1_qwen_2.1.safetensors (Strength: 1.0)
* qwen-image-2.1-consistency.safetensors (Strength: 0.65)
* qwen-image-2.1-restore.safetensors (Strength: 0.65)
---
## 🧩 Required Custom Nodes
Install via **ComfyUI Manager**:
* **ComfyUI Core** (v0.37.1+ for native Qwen Image 2.1 nodes)
* **ComfyUI-KJNodes** ImageResizeKJv2, ImageConcatMulti, AddLabel)
* **ComfyUI-MultiGPU** CLIPLoaderMultiGPU, VAELoaderMultiGPU)
* **rgthree-comfy** Fast Bypasser, Image Comparer)
---
## 🚀 How to Use
1. **Load Base Image (Node #470):** Upload the target photo (pose, body, lighting, and background you want to keep).
2. **Load Face Reference (Node #475):** Upload a clear photo of the person whose face/head you want to transfer.
3. **Adjust Aspect Ratio:** Set your desired aspect ratio in the ResolutionSelector node (keep megapixels around 2 for best detail preservation).
4. **Single-GPU Users:** If you only have one GPU, change device from cuda:1 to cuda:0 (or cpu) in CLIPLoaderMultiGPU and VAELoaderMultiGPU.
5. **Queue Prompt!**
---
## 💡 Pro Tips
* **Preventing Color/Detail Degradation:** Qwen 2.1 can slightly shift colors or soften textures during local edits. Keeping the resolution at **~2 Megapixels** and keeping the consistency + restore LoRAs active significantly reduces this effect.
* **Customizing the Swap:** If you only want to swap facial features while keeping the original hair from Image 1, edit the prompt in TextEncodeQwenImage21 to specify keeping the original hairstyle.
