sdfafdfsdf Alissonerdx commited on
Commit
36393df
·
0 Parent(s):

Duplicate from Alissonerdx/BFS-Best-Face-Swap

Browse files

Co-authored-by: Alisson Pereira Anjos <Alissonerdx@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ images/ComfyUI_04745_.png filter=lfs diff=lfs merge=lfs -text
37
+ images/ComfyUI_04755_.png filter=lfs diff=lfs merge=lfs -text
38
+ images/ComfyUI_04759_.png filter=lfs diff=lfs merge=lfs -text
39
+ images/ComfyUI_04761_.png filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ base_model:
4
+ - black-forest-labs/FLUX.2-klein-9B
5
+ - black-forest-labs/FLUX.2-klein-4B
6
+ - black-forest-labs/FLUX.2-klein-base-4B
7
+ - black-forest-labs/FLUX.2-klein-base-9B
8
+ - black-forest-labs/FLUX.2-klein-9b-fp8
9
+ - black-forest-labs/FLUX.2-klein-4b-fp8
10
+ - Qwen/Qwen-Image-Edit-2511
11
+ pipeline_tag: image-to-image
12
+ tags:
13
+ - lora
14
+ - qwen-image-edit
15
+ - face-swap
16
+ - head-swap
17
+ - image-editing
18
+ - ai-generated
19
+ - comfyui
20
+ - bfs
21
+ - flux 2
22
+ - flux
23
+ - klein
24
+ language:
25
+ - en
26
+ library_name: diffusers
27
+ ---
28
+
29
+ # 🧬 BFS — Best Face Swap (Qwen Image Edit 2509/2511, Flux 2 Klein 4b/9b)
30
+
31
+ The **BFS (Best Face Swap)** LoRA series was created for **Qwen Image Edit 2509/2511, Flux 2 Klein 4b/9b**, designed to perform high-fidelity face and head swaps with natural tone blending and consistent lighting.
32
+
33
+ Each version focuses on a different level of replacement, from subtle face swaps to full head transfers.
34
+ All models can be used directly with **Qwen Image Edit 2509/2511, Flux 2 Klein 4b/9b** or any compatible image-editing workflow.
35
+
36
+ 👉 **Workflows** for all BFS versions can be downloaded here:
37
+ [Head/Face Swap Workflow — Qwen Image Edit 2509 (Civitai)](https://civitai.com/articles/20190/headface-swap-workflow-qwen-image-edit-2509)
38
+
39
+ ---
40
+
41
+ ## 🔹 Versions Overview
42
+
43
+ | Version | File(s) | Description |
44
+ |---|---|---|
45
+ | **BFS Face V1 – 2509** | `bfs_face_v1_qwen_image_edit_2509.safetensors` | Swaps **only the face**. Preserves target hair, lighting, and background. |
46
+ | **BFS Head V1 – 2509** | `bfs_head_v1_qwen_image_edit_2509.safetensors` | Full head swap with natural blending between head/hair and target body. |
47
+ | **BFS Head V2 – 2509** | `bfs_head_v2_qwen_image_edit_2509.safetensors` | Improved skin tone matching, pose alignment, and anatomical consistency. |
48
+ | **BFS Head V3 – 2509 (Recommended)** | `bfs_head_v3_qwen_image_edit_2509.safetensors` | Stable and accurate. **Input order is inverted** (body first, then face). |
49
+ | **BFS Head V4 – 2509/2511** | `bfs_head_v4_qwen_image_edit_2509.safetensors` | Stronger expression transfer and robustness. **Inverted input order**. |
50
+ | **BFS Head V5 – 2511 (Recommended)** | `bfs_head_v5_2511_original.safetensors`<br>`bfs_head_v5_2511_merged_version_rank_16_fp16.safetensors`<br>`bfs_head_v5_2511_merged_version_rank_32_fp32.safetensors` | Latest release for 2511 workflows. **Inverted input order**. See details below. || **Head V5** | **Body** | **Face** | ⚠️ Inverted order — send body first, then face. |
51
+ | **BFS Head V1 – Flux 2 Klein 4/9b (Recommended)** | `bfs_head_v1_flux-klein_4b.safetensors`<br>`bfs_head_v1_flux-klein_9b_step3500_rank128.safetensors`<br>`bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors` | **Inverted input order**. See details below. |
52
+
53
+ ---
54
+
55
+ ## 🧠 BFS Head V5 details (2511)
56
+
57
+ This release includes multiple variants:
58
+
59
+ - **100% original**: direct result of training for **5,500+ steps** on model 2511
60
+ - **Merged versions**: a merge of **BFS Head V4 (2509)** into the 2511-trained original
61
+
62
+ In my evaluation, the **merged version performs better**, especially at reproducing a wider range of expressions.
63
+ It is not perfect yet, but it indicates we are moving in the right direction.
64
+
65
+ ---
66
+
67
+ ## 🖼️ Input Structure (Control Images)
68
+
69
+ | Version | Image 1 | Image 2 | Notes |
70
+ |---|---|---|---|
71
+ | **Face V1** | Face | Body | Standard order. Swaps face only. |
72
+ | **Head V1** | Face | Body | Standard order. Full head swap with blending. |
73
+ | **Head V2** | Face | Body | Standard order. Improved tone and alignment. |
74
+ | **Head V3** | **Body** | **Face** | ⚠️ Inverted order — send body first, then face. |
75
+ | **Head V4** | **Body** | **Face** | ⚠️ Inverted order — send body first, then face. |
76
+ | **Head V5** | **Body** | **Face** | ⚠️ Inverted order — send body first, then face. |
77
+ | **Head V1 Flux 2 Klein 4/9b** | **Body** | **Face** | ⚠️ Inverted order — send body first, then face. |
78
+ ---
79
+
80
+ ## 💬 Prompts
81
+
82
+ ### 🧠 BFS Face V1
83
+
84
+ **Base prompt:**
85
+ ```
86
+
87
+ face swap face from Image 1 to Image 2.
88
+
89
+ ```
90
+
91
+ **Alternative:**
92
+ ```
93
+
94
+ face swap face from Image 1 to Image 2. swap only the face (not the hair), match the skin tone to Image 2, keep Image 2 pose and lighting.
95
+
96
+ ```
97
+
98
+ ---
99
+
100
+ ### 🧩 BFS Head V1 – 2509 (Likely works with 2511)
101
+
102
+ **Base prompt:**
103
+ ```
104
+
105
+ head swap from Image 1 to Image 2
106
+
107
+ ```
108
+
109
+ **Alternatives:**
110
+ ```
111
+
112
+ head swap from Image 1 to Image 2 with perfect skin match
113
+ Head swap from Image 1 to Image 2, keep all facial details and hair from Image 1, blend naturally with Image 2’s body.
114
+ head swap face from Image 1 to Image 2, keep all facial details and hair from Image 1, blend naturally with Image 2’s body, remove all hair of Image 2 and replace by hair from Image 1 and keep the same expression and head proportion as in Image 2
115
+
116
+ ```
117
+
118
+ ---
119
+
120
+ ### 🧬 BFS Head V2 – 2509 (Likely works with 2511)
121
+
122
+ ```
123
+
124
+ head swap, transfer head from Image 1 to Image 2
125
+
126
+ ```
127
+
128
+ ---
129
+
130
+ ### ⚡ BFS Head V3 – 2509 (Recommended) (Likely works with 2511)
131
+
132
+ ```
133
+
134
+ 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. ensure the head and body have correct anatomical proportions, and blend the skin tones, shadows, and lighting naturally so the final result appears as one coherent, realistic person.
135
+
136
+ ```
137
+
138
+ ---
139
+
140
+ ### ⚡ BFS Head V4 – 2509 (Likely works with 2511)
141
+
142
+ ```
143
+
144
+ h34d_sw4p: replace the head of Picture 1 by the head from Picture 2, strictly preserving the identity, facial features (eyes, nose, mouth), and skin texture of Picture 2. ensure the new head mimics the identical expression, angle, and rotation found in Picture 1.
145
+
146
+ ```
147
+
148
+ ---
149
+
150
+ ### ⚡ BFS Head V5 – 2511 (Recommended)
151
+
152
+ ```
153
+
154
+ 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 eye direction, head rotation, and micro-expressions from Picture 1. high quality, sharp details, 4k
155
+
156
+ ```
157
+
158
+
159
+ ### ⚡ BFS Head V1 – Flux 2 Klein 4b/9b (Recommended)
160
+
161
+ ```
162
+
163
+ 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, nose structure of Picture 2. copy the direction of the eye, head rotation, micro expressions from Picture 1, high quality, sharp details, 4k.
164
+
165
+ [Optional]Describe the expression in Picture 1 and copy it to the new image.
166
+
167
+ [Optional][You can describe the facial expression or other details here.]
168
+
169
+ ```
170
+
171
+ <p align="center"> <img src="images/ComfyUI_04745_.png" width="100%" /> <img src="images/ComfyUI_04755_.png" width="100%" /> <img src="images/ComfyUI_04759_.png" width="100%" /> <img src="images/ComfyUI_04761_.png" width="100%" /> </p>
172
+
173
+ ---
174
+
175
+ ## 🧾 Notes
176
+
177
+ - Works best with **Qwen Image Edit 2509** base model (and some versions also perform well on 2511).
178
+ - Control image order:
179
+ - **Face V1 / Head V1 / Head V2** → **Image 1 = Face**, **Image 2 = Body**
180
+ - **Head V3 / Head V4 / Head V5** → **Image 1 = Body**, **Image 2 = Face** (inverted order)
181
+ - For improved alignment, you may optionally use pose or face mesh controls.
182
+ - Please **do not use or share results involving public figures or individuals who have not given consent**.
183
+
184
+ ---
185
+
186
+ ## ☕ Support
187
+
188
+ If this project helped you, consider supporting my work:
189
+ https://buymeacoffee.com/nrdx
190
+
191
+ ---
bfs_face_v1_qwen_image_edit_2509.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9f18ba062d0c8aa3c98169005b616bc95866fe9956c2608dcfd29b1e9b20359
3
+ size 590058816
bfs_head_v1_flux-klein_4b.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:77aabcd6144612dd4873080b99283dd9a27977712548bee161894f62c91ff09c
3
+ size 369644384
bfs_head_v1_flux-klein_9b_step3500_rank128.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70d8aaf332d710b905d5085afaa87c3ef577edffd54ffcfadeb8c47a854f9044
3
+ size 662729912
bfs_head_v1_flux-klein_9b_step3750_rank64.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49907a240602488d2846861d7570dd95d80609f44be7e3347965735712b1be16
3
+ size 331379568
bfs_head_v1_qwen_image_edit_2509.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d71ee1612e4b416fc0f62a1a59a3d66b7ee6d86a1a7c35aacc2f929e0326f68d
3
+ size 590058808
bfs_head_v2_qwen_image_edit_2509.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a928f106fcba6e4b196ef511289f075b4690eba0f6bc3fa3755fdba2ec2a428c
3
+ size 147687224
bfs_head_v3_qwen_image_edit_2509.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49aac5a55175ab5ebd89ffdae4c336eaca1899f5b725b70c0c039f6d4a8d86e6
3
+ size 73957904
bfs_head_v4_qwen_image_edit_2509.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd3278c33c7df36bb87169d0a283851d60e88ecac48123b5c8dcc82551d6e402
3
+ size 147794944
bfs_head_v5_2511_merged_version_rank_16_fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1315a08947e5d6d7c53ea4fc59f272e0d54efd7f2da35999b7d873a7cf4fa89b
3
+ size 307464216
bfs_head_v5_2511_merged_version_rank_32_fp32.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a137e61245781412421f5dee5db4ccac28b6c9952c042d1123a84609107cd10
3
+ size 1206402600
bfs_head_v5_2511_original.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5055ec271228d4767fd327efa59dbdea6f2a628d6d890101eb4fd5015cb1ac57
3
+ size 147685552
images/ComfyUI_04745_.png ADDED

Git LFS Details

  • SHA256: 9c55e0266b901433cba62216a1e8c9f9fb1f2b0c0b96db3146717fb54ec6d6ff
  • Pointer size: 132 Bytes
  • Size of remote file: 6.08 MB
images/ComfyUI_04755_.png ADDED

Git LFS Details

  • SHA256: b838ec72bf73acb657d840eb06668134c6ba9fda33d503db289d595bd97838ca
  • Pointer size: 132 Bytes
  • Size of remote file: 5.06 MB
images/ComfyUI_04759_.png ADDED

Git LFS Details

  • SHA256: a82de9bccec50c3fa6a459f5368569841f1ff83b8437e1c62994569ef0432f22
  • Pointer size: 132 Bytes
  • Size of remote file: 5.33 MB
images/ComfyUI_04761_.png ADDED

Git LFS Details

  • SHA256: 00b5ec60effecf8e38f9da05334a793e59f5e0a5dcc979eecb45e0e246c7fc4f
  • Pointer size: 132 Bytes
  • Size of remote file: 6.06 MB