ComfyPilotComfyPilot
工作流 / 产品与广告 / 交换手中商品,UGC风格
交换手中商品,UGC风格

交换手中商品,UGC风格

Swap Product in Character’s Hand, UGC Style

上传一张角色拿着产品和你品牌产品的照片,生成产品已互换的图片。

产品与广告 5 个节点 2 个输入 20 次使用 ComfyUI ≥ 0.8.0 hellorob 13 KB

下载工作流 JSON 查看官方来源

下载后把文件拖进 ComfyUI 窗口即可打开。

节点构成

LoadImage × 2
GeminiImage2Node × 1
SaveImage × 1
e20a7fb5-3d72-41c9-a78c-fdf287ec46ec × 1

官方标注的模型

Gemini3 Pro Image PreviewGoogleNano Banana Pro

工作流 JSON

和上面「下载工作流 JSON」是同一份文件。

1{
2 "id": "1532265d-5a1f-40c4-ad49-82de6d7ff2ac",
3 "revision": 0,
4 "last_node_id": 19,
5 "last_link_id": 21,
6 "nodes": [
7 {
8 "id": 10,
9 "type": "LoadImage",
10 "pos": [
11 344.3451426534127,
12 349.99993447356087
13 ],
14 "size": [
15 516,
16 732
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "IMAGE",
25 "type": "IMAGE",
26 "links": [
27 19
28 ]
29 },
30 {
31 "name": "MASK",
32 "type": "MASK",
33 "links": null
34 }
35 ],
36 "title": "Load Subject Image",
37 "properties": {
38 "Node name for S&R": "LoadImage",
39 "cnr_id": "comfy-core",
40 "ver": "0.3.76"
41 },
42 "widgets_values": [
43 "subject-girl-holding-skincare-bottle.png",
44 "image"
45 ],
46 "color": "#232",
47 "bgcolor": "#353"
48 },
49 {
50 "id": 11,
51 "type": "LoadImage",
52 "pos": [
53 344.3451426534127,
54 1145.1414794284037
55 ],
56 "size": [
57 516,
58 732
59 ],
60 "flags": [],
61 "order": 1,
62 "mode": 0,
63 "inputs": [],
64 "outputs": [
65 {
66 "name": "IMAGE",
67 "type": "IMAGE",
68 "links": [
69 20
70 ]
71 },
72 {
73 "name": "MASK",
74 "type": "MASK",
75 "links": null
76 }
77 ],
78 "title": "Load Product Image",
79 "properties": {
80 "Node name for S&R": "LoadImage",
81 "cnr_id": "comfy-core",
82 "ver": "0.3.76"
83 },
84 "widgets_values": [
85 "product-cleanser.jpeg",
86 "image"
87 ],
88 "color": "#232",
89 "bgcolor": "#353"
90 },
91 {
92 "id": 17,
93 "type": "GeminiImage2Node",
94 "pos": [
95 1261.999961026396,
96 349.99993447356087
97 ],
98 "size": [
99 504,
100 888
101 ],
102 "flags": [],
103 "order": 3,
104 "mode": 0,
105 "inputs": [
106 {
107 "name": "images",
108 "shape": 7,
109 "type": "IMAGE",
110 "link": 21
111 },
112 {
113 "name": "files",
114 "shape": 7,
115 "type": "GEMINI_INPUT_FILES",
116 "link": null
117 }
118 ],
119 "outputs": [
120 {
121 "name": "IMAGE",
122 "type": "IMAGE",
123 "links": [
124 16
125 ]
126 },
127 {
128 "name": "STRING",
129 "type": "STRING",
130 "links": null
131 }
132 ],
133 "properties": {
134 "Node name for S&R": "GeminiImage2Node",
135 "cnr_id": "comfy-core",
136 "ver": "0.3.76"
137 },
138 "widgets_values": [
139 "Swap the product the subject is holding in image 1 with the product in image 2.",
140 "gemini-3-pro-image-preview",
141 467727850770885,
142 "randomize",
143 "auto",
144 "2K",
145 "IMAGE+TEXT",
146 "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
147 ],
148 "color": "#432",
149 "bgcolor": "#653"
150 },
151 {
152 "id": 15,
153 "type": "SaveImage",
154 "pos": [
155 1849.9997895117638,
156 349.99993447356087
157 ],
158 "size": [
159 564,
160 888
161 ],
162 "flags": [],
163 "order": 4,
164 "mode": 0,
165 "inputs": [
166 {
167 "name": "images",
168 "type": "IMAGE",
169 "link": 16
170 }
171 ],
172 "outputs": [],
173 "properties": {
174 "Node name for S&R": "SaveImage",
175 "cnr_id": "comfy-core",
176 "ver": "0.3.76"
177 },
178 "widgets_values": [
179 "ComfyUI"
180 ]
181 },
182 {
183 "id": 18,
184 "type": "e20a7fb5-3d72-41c9-a78c-fdf287ec46ec",
185 "pos": [
186 986.0000048792945,
187 349.99993447356087
188 ],
189 "size": [
190 225,
191 96
192 ],
193 "flags": {
194 "collapsed": false
195 },
196 "order": 2,
197 "mode": 0,
198 "inputs": [
199 {
200 "label": "image_1",
201 "name": "image",
202 "type": "IMAGE",
203 "link": 19
204 },
205 {
206 "label": "image_2",
207 "name": "image_1",
208 "type": "IMAGE",
209 "link": 20
210 }
211 ],
212 "outputs": [
213 {
214 "name": "IMAGE",
215 "type": "IMAGE",
216 "links": [
217 21
218 ]
219 }
220 ],
221 "properties": {
222 "proxyWidgets": [],
223 "cnr_id": "comfy-core",
224 "ver": "0.4.0"
225 },
226 "widgets_values": []
227 }
228 ],
229 "links": [
230 [
231 16,
232 17,
233 0,
234 15,
235 0,
236 "IMAGE"
237 ],
238 [
239 19,
240 10,
241 0,
242 18,
243 0,
244 "IMAGE"
245 ],
246 [
247 20,
248 11,
249 0,
250 18,
251 1,
252 "IMAGE"
253 ],
254 [
255 21,
256 18,
257 0,
258 17,
259 0,
260 "IMAGE"
261 ]
262 ],
263 "groups": [],
264 "definitions": {
265 "subgraphs": [
266 {
267 "id": "e20a7fb5-3d72-41c9-a78c-fdf287ec46ec",
268 "version": 1,
269 "state": {
270 "lastGroupId": 0,
271 "lastNodeId": 19,
272 "lastLinkId": 21,
273 "lastRerouteId": 0
274 },
275 "revision": 0,
276 "config": [],
277 "name": "Batch Images",
278 "inputNode": {
279 "id": -10,
280 "bounding": [
281 878,
282 326,
283 144,
284 96
285 ]
286 },
287 "outputNode": {
288 "id": -20,
289 "bounding": [
290 1790,
291 374,
292 144,
293 72
294 ]
295 },
296 "inputs": [
297 {
298 "id": "bc8c15e3-969a-4321-9518-84a5cdf64836",
299 "name": "image",
300 "type": "IMAGE",
301 "linkIds": [
302 10,
303 20
304 ],
305 "localized_name": "image",
306 "pos": [
307 830,
308 290
309 ]
310 },
311 {
312 "id": "6288f9fa-a2ef-4285-a1b3-a35c52d4087f",
313 "name": "image_1",
314 "type": "IMAGE",
315 "linkIds": [
316 11
317 ],
318 "localized_name": "image_1",
319 "pos": [
320 830,
321 310
322 ]
323 }
324 ],
325 "outputs": [
326 {
327 "id": "7f588e1c-0a55-4023-930f-ec99d2f311df",
328 "name": "IMAGE",
329 "type": "IMAGE",
330 "linkIds": [
331 19
332 ],
333 "localized_name": "IMAGE",
334 "pos": [
335 1510,
336 330
337 ]
338 }
339 ],
340 "widgets": [],
341 "nodes": [
342 {
343 "id": 13,
344 "type": "ResizeAndPadImage",
345 "pos": [
346 1334,
347 506
348 ],
349 "size": [
350 252,
351 156
352 ],
353 "flags": {
354 "collapsed": false
355 },
356 "order": 1,
357 "mode": 0,
358 "inputs": [
359 {
360 "localized_name": "image",
361 "name": "image",
362 "type": "IMAGE",
363 "link": 11
364 },
365 {
366 "localized_name": "target_width",
367 "name": "target_width",
368 "type": "INT",
369 "widget": {
370 "name": "target_width"
371 },
372 "link": 12
373 },
374 {
375 "localized_name": "target_height",
376 "name": "target_height",
377 "type": "INT",
378 "widget": {
379 "name": "target_height"
380 },
381 "link": 13
382 }
383 ],
384 "outputs": [
385 {
386 "localized_name": "IMAGE",
387 "name": "IMAGE",
388 "type": "IMAGE",
389 "links": [
390 21
391 ]
392 }
393 ],
394 "properties": {
395 "Node name for S&R": "ResizeAndPadImage",
396 "cnr_id": "comfy-core",
397 "ver": "0.3.76"
398 },
399 "widgets_values": [
400 512,
401 512,
402 "white",
403 "area"
404 ]
405 },
406 {
407 "id": 19,
408 "type": "BatchImagesNode",
409 "pos": [
410 1382,
411 266
412 ],
413 "size": [
414 203.0765625,
415 103.2
416 ],
417 "flags": [],
418 "order": 2,
419 "mode": 0,
420 "inputs": [
421 {
422 "label": "image0",
423 "localized_name": "images.image0",
424 "name": "images.image0",
425 "type": "IMAGE",
426 "link": 20
427 },
428 {
429 "label": "image1",
430 "localized_name": "images.image1",
431 "name": "images.image1",
432 "type": "IMAGE",
433 "link": 21
434 },
435 {
436 "label": "image2",
437 "localized_name": "images.image2",
438 "name": "images.image2",
439 "shape": 7,
440 "type": "IMAGE",
441 "link": null
442 }
443 ],
444 "outputs": [
445 {
446 "localized_name": "IMAGE",
447 "name": "IMAGE",
448 "type": "IMAGE",
449 "links": [
450 19
451 ]
452 }
453 ],
454 "properties": {
455 "Node name for S&R": "BatchImagesNode"
456 },
457 "widgets_values": []
458 },
459 {
460 "id": 12,
461 "type": "GetImageSize",
462 "pos": [
463 1082,
464 530
465 ],
466 "size": [
467 192,
468 79.2
469 ],
470 "flags": {
471 "collapsed": false
472 },
473 "order": 0,
474 "mode": 0,
475 "inputs": [
476 {
477 "localized_name": "image",
478 "name": "image",
479 "type": "IMAGE",
480 "link": 10
481 }
482 ],
483 "outputs": [
484 {
485 "localized_name": "width",
486 "name": "width",
487 "type": "INT",
488 "links": [
489 12
490 ]
491 },
492 {
493 "localized_name": "height",
494 "name": "height",
495 "type": "INT",
496 "links": [
497 13
498 ]
499 },
500 {
501 "localized_name": "batch_size",
502 "name": "batch_size",
503 "type": "INT",
504 "links": null
505 }
506 ],
507 "properties": {
508 "Node name for S&R": "GetImageSize",
509 "cnr_id": "comfy-core",
510 "ver": "0.3.76"
511 },
512 "widgets_values": []
513 }
514 ],
515 "groups": [],
516 "links": [
517 {
518 "id": 12,
519 "origin_id": 12,
520 "origin_slot": 0,
521 "target_id": 13,
522 "target_slot": 1,
523 "type": "INT"
524 },
525 {
526 "id": 13,
527 "origin_id": 12,
528 "origin_slot": 1,
529 "target_id": 13,
530 "target_slot": 2,
531 "type": "INT"
532 },
533 {
534 "id": 10,
535 "origin_id": -10,
536 "origin_slot": 0,
537 "target_id": 12,
538 "target_slot": 0,
539 "type": "IMAGE"
540 },
541 {
542 "id": 11,
543 "origin_id": -10,
544 "origin_slot": 1,
545 "target_id": 13,
546 "target_slot": 0,
547 "type": "IMAGE"
548 },
549 {
550 "id": 19,
551 "origin_id": 19,
552 "origin_slot": 0,
553 "target_id": -20,
554 "target_slot": 0,
555 "type": "IMAGE"
556 },
557 {
558 "id": 20,
559 "origin_id": -10,
560 "origin_slot": 0,
561 "target_id": 19,
562 "target_slot": 0,
563 "type": "IMAGE"
564 },
565 {
566 "id": 21,
567 "origin_id": 13,
568 "origin_slot": 0,
569 "target_id": 19,
570 "target_slot": 1,
571 "type": "IMAGE"
572 }
573 ],
574 "extra": {
575 "workflowRendererVersion": "Vue"
576 }
577 }
578 ]
579 },
580 "config": [],
581 "extra": {
582 "ds": {
583 "scale": 0.6018407798481308,
584 "offset": [
585 -373.5859779147926,
586 64.60075754135292
587 ]
588 },
589 "frontendVersion": "1.42.2",
590 "workflowRendererVersion": "Vue",
591 "linearData": {
592 "inputs": [
593 [
594 "10",
595 "image"
596 ],
597 [
598 "11",
599 "image"
600 ],
601 [
602 "17",
603 "resolution"
604 ]
605 ],
606 "outputs": [
607 "15"
608 ]
609 },
610 "VHS_latentpreview": false,
611 "VHS_latentpreviewrate": 0,
612 "VHS_MetadataImage": true,
613 "VHS_KeepIntermediate": true,
614 "linearMode": true
615 },
616 "version": 0.4
617}