工作流 /
图像 /
BFL FLUX.2 [max]: 物体替换
![BFL FLUX.2 [max]: 物体替换](https://comfypilot.com/api/v1/img?u=https%3A%2F%2Fraw.githubusercontent.com%2FComfy-Org%2Fworkflow_templates%2Fmain%2Ftemplates%2Fapi_bfl_flux2_max_sofa_swap-1.webp)
BFL FLUX.2 [max]: 物体替换
FLUX.2 [max]: Object Swap
使用 FLUX.2 [max] 进行高质量物体替换,适合产品拍摄与家具替换,便于保持场景一致。
图像
7 个节点 3 个输入 77 次使用 ComfyUI ≥ 0.21.1 ComfyUI 10 KB
节点构成
LoadImage
× 3
GetImageSize
× 1
SaveImage
× 1
Flux2ImageNode
× 1
MarkdownNote
× 1
官方标注的模型
FLUXFLUX.2
工作流 JSON
和上面「下载工作流 JSON」是同一份文件。
1{
2 "id": "649f68f7-fb15-4740-973f-97235ae353be",
3 "revision": 0,
4 "last_node_id": 19,
5 "last_link_id": 32,
6 "nodes": [
7 {
8 "id": 10,
9 "type": "LoadImage",
10 "pos": [
11 1810,
12 886
13 ],
14 "size": [
15 300,
16 370
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 27
28 ]
29 },
30 {
31 "name": "MASK",
32 "type": "MASK",
33 "links": null
34 }
35 ],
36 "properties": {
37 "Node name for S&R": "LoadImage",
38 "cnr_id": "comfy-core",
39 "ver": "0.5.1"
40 },
41 "widgets_values": [
42 "black_coat_model.png",
43 "image"
44 ],
45 "widgets_values_named": {
46 "image": "black_coat_model.png",
47 "upload": "image"
48 }
49 },
50 {
51 "id": 3,
52 "type": "LoadImage",
53 "pos": [
54 1810,
55 438
56 ],
57 "size": [
58 310,
59 370
60 ],
61 "flags": [],
62 "order": 1,
63 "mode": 0,
64 "inputs": [],
65 "outputs": [
66 {
67 "name": "IMAGE",
68 "type": "IMAGE",
69 "links": [
70 26
71 ]
72 },
73 {
74 "name": "MASK",
75 "type": "MASK",
76 "links": null
77 }
78 ],
79 "properties": {
80 "Node name for S&R": "LoadImage",
81 "cnr_id": "comfy-core",
82 "ver": "0.5.1"
83 },
84 "widgets_values": [
85 "fluffy_beige_sofa.png",
86 "image"
87 ],
88 "widgets_values_named": {
89 "image": "fluffy_beige_sofa.png",
90 "upload": "image"
91 }
92 },
93 {
94 "id": 2,
95 "type": "LoadImage",
96 "pos": [
97 1810,
98 -40
99 ],
100 "size": [
101 310,
102 400
103 ],
104 "flags": [],
105 "order": 2,
106 "mode": 0,
107 "inputs": [],
108 "outputs": [
109 {
110 "name": "IMAGE",
111 "type": "IMAGE",
112 "links": [
113 17,
114 25
115 ]
116 },
117 {
118 "name": "MASK",
119 "type": "MASK",
120 "links": null
121 }
122 ],
123 "properties": {
124 "Node name for S&R": "LoadImage",
125 "cnr_id": "comfy-core",
126 "ver": "0.5.1"
127 },
128 "widgets_values": [
129 "minimalist_wooden_sofa_living_room.png",
130 "image"
131 ],
132 "widgets_values_named": {
133 "image": "minimalist_wooden_sofa_living_room.png",
134 "upload": "image"
135 }
136 },
137 {
138 "id": 14,
139 "type": "GetImageSize",
140 "pos": [
141 2280,
142 680
143 ],
144 "size": [
145 230,
146 120
147 ],
148 "flags": {
149 "collapsed": false
150 },
151 "order": 4,
152 "mode": 0,
153 "inputs": [
154 {
155 "name": "image",
156 "type": "IMAGE",
157 "link": 17
158 }
159 ],
160 "outputs": [
161 {
162 "name": "width",
163 "type": "INT",
164 "links": [
165 28
166 ]
167 },
168 {
169 "name": "height",
170 "type": "INT",
171 "links": [
172 32
173 ]
174 },
175 {
176 "name": "batch_size",
177 "type": "INT",
178 "links": []
179 }
180 ],
181 "properties": {
182 "Node name for S&R": "GetImageSize",
183 "cnr_id": "comfy-core",
184 "ver": "0.5.1"
185 }
186 },
187 {
188 "id": 6,
189 "type": "SaveImage",
190 "pos": [
191 3030,
192 490
193 ],
194 "size": [
195 660,
196 680
197 ],
198 "flags": [],
199 "order": 6,
200 "mode": 0,
201 "inputs": [
202 {
203 "name": "images",
204 "type": "IMAGE",
205 "link": 31
206 }
207 ],
208 "outputs": [
209 {
210 "name": "images",
211 "type": "IMAGE",
212 "links": null
213 }
214 ],
215 "properties": {
216 "Node name for S&R": "SaveImage",
217 "cnr_id": "comfy-core",
218 "ver": "0.5.1"
219 },
220 "widgets_values": [
221 "Flux.2_max"
222 ],
223 "widgets_values_named": {
224 "filename_prefix": "Flux.2_max"
225 }
226 },
227 {
228 "id": 18,
229 "type": "Flux2ImageNode",
230 "pos": [
231 2570,
232 490
233 ],
234 "size": [
235 400,
236 274
237 ],
238 "flags": [],
239 "order": 5,
240 "mode": 0,
241 "inputs": [
242 {
243 "name": "model.width",
244 "type": "INT",
245 "widget": {
246 "name": "model.width"
247 },
248 "link": 28
249 },
250 {
251 "name": "model.height",
252 "type": "INT",
253 "widget": {
254 "name": "model.height"
255 },
256 "link": 32
257 },
258 {
259 "label": "image_1",
260 "name": "model.images.image_1",
261 "shape": 7,
262 "type": "IMAGE",
263 "link": 25
264 },
265 {
266 "label": "image_2",
267 "name": "model.images.image_2",
268 "shape": 7,
269 "type": "IMAGE",
270 "link": 26
271 },
272 {
273 "label": "image_3",
274 "name": "model.images.image_3",
275 "shape": 7,
276 "type": "IMAGE",
277 "link": 27
278 },
279 {
280 "label": "image_4",
281 "name": "model.images.image_4",
282 "shape": 7,
283 "type": "IMAGE",
284 "link": null
285 }
286 ],
287 "outputs": [
288 {
289 "name": "IMAGE",
290 "type": "IMAGE",
291 "links": [
292 31
293 ]
294 }
295 ],
296 "properties": {
297 "Node name for S&R": "Flux2ImageNode"
298 },
299 "widgets_values": [
300 "Replace the current sofa with the one in Image 2, then place the character from Image 3 on the new sofa. Keep the scene lighting, environment, color scheme, and all other furniture completely unchanged.\n",
301 "Flux.2 [max]",
302 1024,
303 768,
304 0,
305 "randomize"
306 ],
307 "widgets_values_named": {
308 "prompt": "Replace the current sofa with the one in Image 2, then place the character from Image 3 on the new sofa. Keep the scene lighting, environment, color scheme, and all other furniture completely unchanged.\n",
309 "model": "Flux.2 [max]",
310 "model.width": 1024,
311 "model.height": 768,
312 "seed": 0,
313 "control_after_generate": "randomize"
314 },
315 "color": "#432",
316 "bgcolor": "#653"
317 },
318 {
319 "id": 19,
320 "type": "MarkdownNote",
321 "pos": [
322 1360,
323 440
324 ],
325 "size": [
326 310,
327 390
328 ],
329 "flags": [],
330 "order": 3,
331 "mode": 0,
332 "inputs": [],
333 "outputs": [],
334 "properties": [],
335 "widgets_values": [
336 "## Input Assets\n\n- [black_coat_model.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/black_coat_model.png)\n- [fluffy_beige_sofa.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/fluffy_beige_sofa.png)\n- [minimalist_wooden_sofa_living_room.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/minimalist_wooden_sofa_living_room.png)\n\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
337 ],
338 "widgets_values_named": {
339 "text": "## Input Assets\n\n- [black_coat_model.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/black_coat_model.png)\n- [fluffy_beige_sofa.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/fluffy_beige_sofa.png)\n- [minimalist_wooden_sofa_living_room.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/minimalist_wooden_sofa_living_room.png)\n\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"
340 },
341 "color": "#222",
342 "bgcolor": "#000"
343 }
344 ],
345 "links": [
346 [
347 17,
348 2,
349 0,
350 14,
351 0,
352 "IMAGE"
353 ],
354 [
355 25,
356 2,
357 0,
358 18,
359 2,
360 "IMAGE"
361 ],
362 [
363 26,
364 3,
365 0,
366 18,
367 3,
368 "IMAGE"
369 ],
370 [
371 27,
372 10,
373 0,
374 18,
375 4,
376 "IMAGE"
377 ],
378 [
379 28,
380 14,
381 0,
382 18,
383 0,
384 "INT"
385 ],
386 [
387 31,
388 18,
389 0,
390 6,
391 0,
392 "IMAGE"
393 ],
394 [
395 32,
396 14,
397 1,
398 18,
399 1,
400 "INT"
401 ]
402 ],
403 "groups": [],
404 "config": [],
405 "extra": {
406 "ds": {
407 "scale": 0.49781361739647406,
408 "offset": [
409 -578.5685423169374,
410 320.8742618740674
411 ]
412 },
413 "frontendVersion": "1.49.6",
414 "workflowRendererVersion": "LG",
415 "VHS_latentpreview": false,
416 "VHS_latentpreviewrate": 0,
417 "VHS_MetadataImage": true,
418 "VHS_KeepIntermediate": true
419 },
420 "version": 0.4
421}