工作流 /
产品与广告 /
产品场景合成与重新光照

产品场景合成与重新光照
Composite your Product + Scene and Relight
上传产品和背景图片,场景合成并自然重新打光,支持Seedream 4.5。
产品与广告
8 个节点 2 个输入 13 次使用 ComfyUI ≥ 0.33.3 hellorob 16 KB
节点构成
PrimitiveStringMultiline
× 2
LoadImage
× 2
SaveImage
× 1
ByteDanceSeedreamNode
× 1
RegexReplace
× 1
94a7e2c4-f61f-4641-a52c-758479d9b975
× 1
官方标注的模型
ByteDanceSeedream
工作流 JSON
和上面「下载工作流 JSON」是同一份文件。
1{
2 "id": "8ead682f-1c65-4c02-baf3-4e1f9537c836",
3 "revision": 0,
4 "last_node_id": 29,
5 "last_link_id": 44,
6 "nodes": [
7 {
8 "id": 14,
9 "type": "PrimitiveStringMultiline",
10 "pos": [
11 -1570,
12 60
13 ],
14 "size": [
15 270,
16 200
17 ],
18 "flags": [],
19 "order": 0,
20 "mode": 0,
21 "inputs": [],
22 "outputs": [
23 {
24 "name": "STRING",
25 "type": "STRING",
26 "links": [
27 19
28 ]
29 }
30 ],
31 "title": "Describe the Product",
32 "properties": {
33 "Node name for S&R": "PrimitiveStringMultiline"
34 },
35 "widgets_values": [
36 "A dispenser bottle filled with viscuous clear liquid, with a metallic top, \"C\" logo and a clear glass body"
37 ],
38 "color": "#232",
39 "bgcolor": "#353"
40 },
41 {
42 "id": 1,
43 "type": "LoadImage",
44 "pos": [
45 -1960,
46 340
47 ],
48 "size": [
49 340,
50 420
51 ],
52 "flags": [],
53 "order": 1,
54 "mode": 0,
55 "inputs": [],
56 "outputs": [
57 {
58 "name": "IMAGE",
59 "type": "IMAGE",
60 "links": [
61 22
62 ]
63 },
64 {
65 "name": "MASK",
66 "type": "MASK",
67 "links": []
68 }
69 ],
70 "title": "Load Product Image",
71 "properties": {
72 "Node name for S&R": "LoadImage"
73 },
74 "widgets_values": [
75 "comfy_shampoo.png",
76 "image"
77 ],
78 "color": "#232",
79 "bgcolor": "#353"
80 },
81 {
82 "id": 2,
83 "type": "LoadImage",
84 "pos": [
85 -1960,
86 -170
87 ],
88 "size": [
89 340,
90 420
91 ],
92 "flags": {
93 "collapsed": false
94 },
95 "order": 2,
96 "mode": 0,
97 "inputs": [],
98 "outputs": [
99 {
100 "name": "IMAGE",
101 "type": "IMAGE",
102 "links": [
103 21
104 ]
105 },
106 {
107 "name": "MASK",
108 "type": "MASK",
109 "links": null
110 }
111 ],
112 "title": "Load Background Image",
113 "properties": {
114 "Node name for S&R": "LoadImage"
115 },
116 "widgets_values": [
117 "flower_sea.png",
118 "image"
119 ],
120 "color": "#232",
121 "bgcolor": "#353"
122 },
123 {
124 "id": 23,
125 "type": "SaveImage",
126 "pos": [
127 -610,
128 -170
129 ],
130 "size": [
131 760,
132 930
133 ],
134 "flags": [],
135 "order": 7,
136 "mode": 0,
137 "inputs": [
138 {
139 "name": "images",
140 "type": "IMAGE",
141 "link": 35
142 }
143 ],
144 "outputs": [],
145 "properties": [],
146 "widgets_values": [
147 "ComfyUI"
148 ]
149 },
150 {
151 "id": 22,
152 "type": "ByteDanceSeedreamNode",
153 "pos": [
154 -1050,
155 -170
156 ],
157 "size": [
158 400,
159 374
160 ],
161 "flags": [],
162 "order": 6,
163 "mode": 0,
164 "inputs": [
165 {
166 "name": "image",
167 "shape": 7,
168 "type": "IMAGE",
169 "link": 33
170 },
171 {
172 "name": "prompt",
173 "type": "STRING",
174 "widget": {
175 "name": "prompt"
176 },
177 "link": 34
178 }
179 ],
180 "outputs": [
181 {
182 "name": "IMAGE",
183 "type": "IMAGE",
184 "links": [
185 35
186 ]
187 }
188 ],
189 "properties": {
190 "Node name for S&R": "ByteDanceSeedreamNode"
191 },
192 "widgets_values": [
193 "seedream-4-5-251128",
194 "",
195 "2048x2048 (1:1)",
196 2048,
197 2048,
198 "disabled",
199 1,
200 406946789,
201 "randomize",
202 false,
203 true
204 ],
205 "color": "#432",
206 "bgcolor": "#653"
207 },
208 {
209 "id": 13,
210 "type": "RegexReplace",
211 "pos": [
212 -1280,
213 60
214 ],
215 "size": [
216 210,
217 292
218 ],
219 "flags": {
220 "collapsed": true
221 },
222 "order": 5,
223 "mode": 0,
224 "inputs": [
225 {
226 "name": "string",
227 "type": "STRING",
228 "widget": {
229 "name": "string"
230 },
231 "link": 18
232 },
233 {
234 "name": "replace",
235 "type": "STRING",
236 "widget": {
237 "name": "replace"
238 },
239 "link": 19
240 }
241 ],
242 "outputs": [
243 {
244 "name": "STRING",
245 "type": "STRING",
246 "links": [
247 34
248 ]
249 }
250 ],
251 "properties": {
252 "Node name for S&R": "RegexReplace"
253 },
254 "widgets_values": [
255 "",
256 "{product_description}",
257 "",
258 true,
259 false,
260 false,
261 0
262 ]
263 },
264 {
265 "id": 12,
266 "type": "PrimitiveStringMultiline",
267 "pos": [
268 -1570,
269 310
270 ],
271 "size": [
272 390,
273 770
274 ],
275 "flags": {
276 "collapsed": true
277 },
278 "order": 3,
279 "mode": 0,
280 "inputs": [],
281 "outputs": [
282 {
283 "name": "STRING",
284 "type": "STRING",
285 "links": [
286 18
287 ]
288 }
289 ],
290 "title": "Prompt Template",
291 "properties": {
292 "Node name for S&R": "PrimitiveStringMultiline"
293 },
294 "widgets_values": [
295 "Task: Realistic Product Compositing with Material Preservation Goal: Insert the product from Input 2 into Input 1, ensuring placement is logical and lighting interacts accurately with the product's specific material properties.\n\nInput Image(s):\n\nInput 1 (Scene)\nInput 2 (Product): {product_description}\n\nManual Material Breakdown (Critical): To ensure correct light interaction, treat the product as having the following physical properties:\n\nPrimary Material: [e.g., Matte Plastic / Brushed Aluminum / Clear Glass]\n\nReflectivity: [e.g., Low (dull reflections) / High (mirror-like)]\n\nTexture: [e.g., Smooth / Grainy / Porous]\n\nReaction to Light: [e.g., \"Should absorb light with soft highlights, no sharp glares\"]\n\nSecondary Material (if any): [e.g., Gold Foil Label / Glossy Cap]\n\nReaction to Light: [e.g., \"Should catch sharp, bright specular highlights from the environment\"]\n\nProcess:\nScene Analysis: Identify the logical ground plane/surface in Input 1.\n\nPlacement: Scale Input 2 uniformly (maintain aspect ratio) and place it on the surface.\n\nMaterial-Based Relighting:\n\nDo not simply overlay the scene colors onto the product.\nInstead, map the environment light from Input 1 onto the contours of Input 2 based on the material definitions above.\n\nExample: If the material is Matte, only the edge lighting and general ambient tone should change; do not add sharp reflections.\n\nExample: If the material is Glossy, reflect the scene's details on the surface.\n\nShadows: Generate contact shadows that match the hardness/softness of shadows in the rest of the scene.\n\nTechnical Requirements:\nAlbedo Preservation: The intrinsic color of the product (e.g., \"Brand Red\") must not be washed out by the scene's lighting color.\n\nTexture Fidelity: Do not smooth out surface details (grain, bumps) during the blending process.\n\nScaling: No non-uniform stretching.\n\nOutput: A composite where the lighting confirms the materiality of the product (e.g., makes the plastic look like plastic, not metal)."
296 ]
297 },
298 {
299 "id": 15,
300 "type": "94a7e2c4-f61f-4641-a52c-758479d9b975",
301 "pos": [
302 -1430,
303 -140
304 ],
305 "size": [
306 170,
307 46
308 ],
309 "flags": {
310 "collapsed": false
311 },
312 "order": 4,
313 "mode": 0,
314 "inputs": [
315 {
316 "name": "image1",
317 "type": "IMAGE",
318 "link": 21
319 },
320 {
321 "name": "image",
322 "type": "IMAGE",
323 "link": 22
324 }
325 ],
326 "outputs": [
327 {
328 "name": "IMAGE",
329 "type": "IMAGE",
330 "links": [
331 33
332 ]
333 }
334 ],
335 "properties": {
336 "proxyWidgets": []
337 },
338 "widgets_values": []
339 }
340 ],
341 "links": [
342 [
343 18,
344 12,
345 0,
346 13,
347 0,
348 "STRING"
349 ],
350 [
351 19,
352 14,
353 0,
354 13,
355 1,
356 "STRING"
357 ],
358 [
359 21,
360 2,
361 0,
362 15,
363 0,
364 "IMAGE"
365 ],
366 [
367 22,
368 1,
369 0,
370 15,
371 1,
372 "IMAGE"
373 ],
374 [
375 33,
376 15,
377 0,
378 22,
379 0,
380 "IMAGE"
381 ],
382 [
383 34,
384 13,
385 0,
386 22,
387 1,
388 "STRING"
389 ],
390 [
391 35,
392 22,
393 0,
394 23,
395 0,
396 "IMAGE"
397 ]
398 ],
399 "groups": [],
400 "definitions": {
401 "subgraphs": [
402 {
403 "id": "94a7e2c4-f61f-4641-a52c-758479d9b975",
404 "version": 1,
405 "state": {
406 "lastGroupId": 0,
407 "lastNodeId": 15,
408 "lastLinkId": 23,
409 "lastRerouteId": 0
410 },
411 "revision": 0,
412 "config": [],
413 "name": "Batch Images",
414 "inputNode": {
415 "id": -10,
416 "bounding": [
417 -1880,
418 -140,
419 120,
420 80
421 ]
422 },
423 "outputNode": {
424 "id": -20,
425 "bounding": [
426 -1080,
427 -160,
428 120,
429 60
430 ]
431 },
432 "inputs": [
433 {
434 "id": "68bb369f-8785-4b9f-b018-65e10a96e046",
435 "name": "image1",
436 "type": "IMAGE",
437 "linkIds": [
438 16,
439 22
440 ],
441 "localized_name": "image1",
442 "pos": [
443 -1780,
444 -120
445 ]
446 },
447 {
448 "id": "29c264c0-fb68-474c-8fda-ca049dd15e77",
449 "name": "image",
450 "type": "IMAGE",
451 "linkIds": [
452 17
453 ],
454 "localized_name": "image",
455 "pos": [
456 -1780,
457 -100
458 ]
459 }
460 ],
461 "outputs": [
462 {
463 "id": "506e4ff4-c6f3-4bf1-9492-f4298a32939f",
464 "name": "IMAGE",
465 "type": "IMAGE",
466 "linkIds": [
467 21
468 ],
469 "localized_name": "IMAGE",
470 "pos": [
471 -1060,
472 -140
473 ]
474 }
475 ],
476 "widgets": [],
477 "nodes": [
478 {
479 "id": 15,
480 "type": "BatchImagesNode",
481 "pos": [
482 -1420,
483 -170
484 ],
485 "size": [
486 169.23046875,
487 66
488 ],
489 "flags": [],
490 "order": 2,
491 "mode": 0,
492 "inputs": [
493 {
494 "label": "image0",
495 "localized_name": "images.image0",
496 "name": "images.image0",
497 "type": "IMAGE",
498 "link": 22
499 },
500 {
501 "label": "image1",
502 "localized_name": "images.image1",
503 "name": "images.image1",
504 "type": "IMAGE",
505 "link": 23
506 },
507 {
508 "label": "image2",
509 "localized_name": "images.image2",
510 "name": "images.image2",
511 "shape": 7,
512 "type": "IMAGE",
513 "link": null
514 }
515 ],
516 "outputs": [
517 {
518 "localized_name": "IMAGE",
519 "name": "IMAGE",
520 "type": "IMAGE",
521 "links": [
522 21
523 ]
524 }
525 ],
526 "properties": {
527 "Node name for S&R": "BatchImagesNode"
528 }
529 },
530 {
531 "id": 5,
532 "type": "GetImageSize",
533 "pos": [
534 -1710,
535 -30
536 ],
537 "size": [
538 210,
539 136
540 ],
541 "flags": {
542 "collapsed": false
543 },
544 "order": 0,
545 "mode": 0,
546 "inputs": [
547 {
548 "localized_name": "image",
549 "name": "image",
550 "type": "IMAGE",
551 "link": 16
552 }
553 ],
554 "outputs": [
555 {
556 "localized_name": "width",
557 "name": "width",
558 "type": "INT",
559 "links": [
560 4
561 ]
562 },
563 {
564 "localized_name": "height",
565 "name": "height",
566 "type": "INT",
567 "links": [
568 5
569 ]
570 },
571 {
572 "localized_name": "batch_size",
573 "name": "batch_size",
574 "type": "INT",
575 "links": null
576 }
577 ],
578 "properties": {
579 "Node name for S&R": "GetImageSize"
580 },
581 "widgets_values": []
582 },
583 {
584 "id": 6,
585 "type": "ResizeAndPadImage",
586 "pos": [
587 -1450,
588 -30
589 ],
590 "size": [
591 210,
592 130
593 ],
594 "flags": {
595 "collapsed": false
596 },
597 "order": 1,
598 "mode": 0,
599 "inputs": [
600 {
601 "localized_name": "image",
602 "name": "image",
603 "type": "IMAGE",
604 "link": 17
605 },
606 {
607 "localized_name": "target_width",
608 "name": "target_width",
609 "type": "INT",
610 "widget": {
611 "name": "target_width"
612 },
613 "link": 4
614 },
615 {
616 "localized_name": "target_height",
617 "name": "target_height",
618 "type": "INT",
619 "widget": {
620 "name": "target_height"
621 },
622 "link": 5
623 }
624 ],
625 "outputs": [
626 {
627 "localized_name": "IMAGE",
628 "name": "IMAGE",
629 "type": "IMAGE",
630 "links": [
631 23
632 ]
633 }
634 ],
635 "properties": {
636 "Node name for S&R": "ResizeAndPadImage"
637 },
638 "widgets_values": [
639 512,
640 512,
641 "white",
642 "area"
643 ]
644 }
645 ],
646 "groups": [],
647 "links": [
648 {
649 "id": 4,
650 "origin_id": 5,
651 "origin_slot": 0,
652 "target_id": 6,
653 "target_slot": 1,
654 "type": "INT"
655 },
656 {
657 "id": 5,
658 "origin_id": 5,
659 "origin_slot": 1,
660 "target_id": 6,
661 "target_slot": 2,
662 "type": "INT"
663 },
664 {
665 "id": 16,
666 "origin_id": -10,
667 "origin_slot": 0,
668 "target_id": 5,
669 "target_slot": 0,
670 "type": "IMAGE"
671 },
672 {
673 "id": 17,
674 "origin_id": -10,
675 "origin_slot": 1,
676 "target_id": 6,
677 "target_slot": 0,
678 "type": "IMAGE"
679 },
680 {
681 "id": 21,
682 "origin_id": 15,
683 "origin_slot": 0,
684 "target_id": -20,
685 "target_slot": 0,
686 "type": "IMAGE"
687 },
688 {
689 "id": 22,
690 "origin_id": -10,
691 "origin_slot": 0,
692 "target_id": 15,
693 "target_slot": 0,
694 "type": "IMAGE"
695 },
696 {
697 "id": 23,
698 "origin_id": 6,
699 "origin_slot": 0,
700 "target_id": 15,
701 "target_slot": 1,
702 "type": "IMAGE"
703 }
704 ],
705 "extra": {
706 "workflowRendererVersion": "LG"
707 }
708 }
709 ]
710 },
711 "config": [],
712 "extra": {
713 "ds": {
714 "scale": 1.3940068280855902,
715 "offset": [
716 1902.121132651144,
717 351.9877945599146
718 ]
719 },
720 "frontendVersion": "1.37.6",
721 "workflowRendererVersion": "LG",
722 "VHS_latentpreview": false,
723 "VHS_latentpreviewrate": 0,
724 "VHS_MetadataImage": true,
725 "VHS_KeepIntermediate": true
726 },
727 "version": 0.4
728}