Instructions to use prithivMLmods/QIE-2511-Guided-Head-Face-Swap with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use prithivMLmods/QIE-2511-Guided-Head-Face-Swap with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Qwen/Qwen-Image-Edit-2511", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("prithivMLmods/QIE-2511-Guided-Head-Face-Swap") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
Note: This guided head swap works best with close-up portraits. Since QIE-2511-Guided-Head-Face-Swap is an experimental model, it may produce mistakes. Please check the important information.
QIE-2511-Guided-Head-Face-Swap
QIE-2511-Guided-Head-Face-Swap is an adapter LoRA developed for Qwenโs Qwen-Image-Edit-2511 image-to-image model, designed for guided head and face swapping between two images. The model accurately transfers the head and facial identity from a source image onto a target image while preserving the target imageโs original lighting, pose, composition, geometry, and overall realism. It delivers clean blends, consistent skin tones, and artifact-free results with high identity fidelity.
Quick Start with Diffusers
Compatible with versions 2509 and 2511.
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# Switch to "mps" for Apple devices
pipe = DiffusionPipeline.from_pretrained(
"Qwen/Qwen-Image-Edit-2511",
dtype=torch.bfloat16,
device_map="cuda"
)
pipe.load_lora_weights("prithivMLmods/QIE-2511-Guided-Head-Face-Swap")
prompt = (
"Swap the head from Image 2 onto Image 1 while preserving "
"Image 1 lighting and pose and Image 2 identity"
)
# Load your images as needed for the pipeline
image = pipe(prompt=prompt).images[0]
Trained on ModelScope.cn
Trigger Prompt
Use the following prompt to activate the guided head and face swap behavior:
Swap the head from Image 2 onto Image 1 while preserving Image 1 lighting and pose and Image 2 identity
Download Model
You can download the model files from the Files & versions tab: Download
- Downloads last month
- -
Model tree for prithivMLmods/QIE-2511-Guided-Head-Face-Swap
Base model
Qwen/Qwen-Image-Edit-2511