Image-to-Image
Diffusers
English
lora
qwen-image
qwen-image-2.1
qwen-image-edit
face-swap
head-swap
body-swap
image-editing
comfyui
bfs
Instructions to use suryatmodulus/BFS-Best-Face-Swap with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use suryatmodulus/BFS-Best-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-2.1", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("suryatmodulus/BFS-Best-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] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
|
Download docs/flux-2-klein.md from suryatmodulus/BFS-Best-Face-Swap: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/suryatmodulus/BFS-Best-Face-Swap/resolve/main/docs/flux-2-klein.md
- Command line
-
hf download hf://suryatmodulus/BFS-Best-Face-Swap/docs/flux-2-klein.md
-
curl -L -o flux-2-klein.md https://huggingface.co/suryatmodulus/BFS-Best-Face-Swap/resolve/main/docs/flux-2-klein.md
1.66 kB
Flux 2 Klein Head-Swap LoRAs
These BFS weights target Flux 2 Klein 4B/9B variants. They use the body-first input contract:
- Image 1: target body/base image
- Image 2: reference face/head
Do not reverse the images for these releases.
Downloads
bfs_head_v1_flux-klein_4b.safetensorsbfs_head_v1_flux-klein_9b_step3500_rank128.safetensorsbfs_head_v1_flux-klein_9b_step3750_rank64.safetensorsbfs_head_v1.1_optional_flux-klein_4b.safetensors
Prompt
head_swap: start with Picture 1 as the base image, keeping its lighting, environment, and background. remove the head from Picture 1 completely and replace it with the head from Picture 2, strictly preserving the hair, eye color, and nose structure of Picture 2. copy the direction of the eye, head rotation, and micro-expressions from Picture 1. Keep the body, clothing, pose, framing, and background intact.
You can add a short expression or pose instruction when it is visible in the target image. Keep the edit focused on the head and avoid requesting an unrelated scene change in the same prompt.
Workflow
workflows/Head Swap V1 Flux 2 Klein 4b_9b (base_distill).json
Start around LoRA strength 1.0; adjust after checking identity preservation, hair boundaries,
expression transfer, and skin blending.