画像の合成
二つの画像を重ねたり、横に並べたりします。
Photoshopなら画像をドラッグして上に持っていくだけの簡単な作業ですが、ノードベースのComfyUIでこれをやろうとすると一苦労です。
Inpainting処理などで必要な場面もありますが、色調補正同様、諦めてペイントツールを使うのも良い選択です。
画像を重ねる
単純に、ある画像の上に別の画像を配置する操作です。
ImageCompositeMasked ノード
画像を重ね合わせるための基本ノードです。

{
"id": "dbea702b-55fe-491d-a709-7c7bc1d46b5e",
"revision": 0,
"last_node_id": 13,
"last_link_id": 11,
"nodes": [
{
"id": 5,
"type": "ImageCompositeMasked",
"pos": [
1448.24951171875,
578.0513916015625
],
"size": [
270,
146
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 9
},
{
"name": "source",
"type": "IMAGE",
"link": 6
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
7
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 1,
"type": "LoadImage",
"pos": [
1115.102294921875,
578.0513916015625
],
"size": [
274.080078125,
314
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
3,
6
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"Epample_01.png",
"image"
]
},
{
"id": 11,
"type": "PreviewImage",
"pos": [
1449.9174410058904,
-163.38945628714424
],
"size": [
255.79700000000003,
260.64099999999996
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 11
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.71",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 4,
"type": "PreviewImage",
"pos": [
1777.316650390625,
179.8215789794922
],
"size": [
350.5400012207033,
300.35
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 4
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 6,
"type": "PreviewImage",
"pos": [
1777.316650390625,
578.0513916015625
],
"size": [
349.33000122070325,
304.08000000000015
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 7
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 7,
"type": "EmptyImage",
"pos": [
1107.1242949218768,
179.0405789794925
],
"size": [
270,
130
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
8,
9,
11
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.71",
"Node name for S&R": "EmptyImage"
},
"widgets_values": [
1500,
1080,
1,
31216
]
},
{
"id": 3,
"type": "ImageCompositeMasked",
"pos": [
1448.24951171875,
179.8215789794922
],
"size": [
270,
146
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 8
},
{
"name": "source",
"type": "IMAGE",
"link": 3
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
4
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
false
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
3,
1,
0,
3,
1,
"IMAGE"
],
[
4,
3,
0,
4,
0,
"IMAGE"
],
[
6,
1,
0,
5,
1,
"IMAGE"
],
[
7,
5,
0,
6,
0,
"IMAGE"
],
[
8,
7,
0,
3,
0,
"IMAGE"
],
[
9,
7,
0,
5,
0,
"IMAGE"
],
[
11,
7,
0,
11,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.7513148009015777,
"offset": [
-1007.1242949218768,
263.38945628714424
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- destination: 背面(ベース)になる画像
- source: 前面(上に乗る)画像
- x / y: 左上を基準とした位置調整
- resize_source:
trueにすると、source画像がdestinationと同じサイズになるように引き伸ばされます(※アスペクト比が違うと歪みます)。
中央に配置したい場合

{
"id": "682cc10c-5bfa-42ab-8bf7-5c83278f1888",
"revision": 0,
"last_node_id": 24,
"last_link_id": 38,
"nodes": [
{
"id": 21,
"type": "LoadImage",
"pos": [
598.0189191644172,
395.3002266958175
],
"size": [
274.080078125,
314.00000000000006
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
26,
27
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"Epample_01.png",
"image"
]
},
{
"id": 9,
"type": "SimpleMath+",
"pos": [
1178.2681054687475,
145.55705166903414
],
"size": [
210,
98
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 30
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": null
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
20
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a / 2"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 23,
"type": "SimpleMath+",
"pos": [
1175.019780933057,
502.41595511720317
],
"size": [
210,
98
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 36
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": null
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
34
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a / 2"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 8,
"type": "GetImageSize",
"pos": [
912.1211547851562,
144.046142578125
],
"size": [
210,
136
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 25
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
30
]
},
{
"name": "height",
"type": "INT",
"links": [
7,
36
]
},
{
"name": "batch_size",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "GetImageSize"
},
"widgets_values": [
"width: 1500, height: 1080\n batch size: 1"
]
},
{
"id": 15,
"type": "GetImageSize",
"pos": [
912.1211547851562,
395.3002266958175
],
"size": [
210,
136
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 27
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
31
]
},
{
"name": "height",
"type": "INT",
"links": [
18,
37
]
},
{
"name": "batch_size",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "GetImageSize"
},
"widgets_values": [
"width: 769, height: 769\n batch size: 1"
]
},
{
"id": 19,
"type": "SimpleMath+",
"pos": [
1434.3047931463059,
146.02572121360112
],
"size": [
210,
98
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 20
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": 21
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
29
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a - b"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 17,
"type": "SimpleMath+",
"pos": [
1177.7226509232942,
311.3677788751774
],
"size": [
210,
98
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 31
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": null
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
21
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a / 2"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 24,
"type": "SimpleMath+",
"pos": [
1431.0564686106154,
502.41595511720317
],
"size": [
210,
98
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 34
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": 35
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
38
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a - b"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 22,
"type": "SimpleMath+",
"pos": [
1175.3738627512396,
674.7113641415275
],
"size": [
210,
98
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "a",
"shape": 7,
"type": "INT,FLOAT",
"link": 37
},
{
"name": "b",
"shape": 7,
"type": "INT,FLOAT",
"link": null
},
{
"name": "c",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
35
]
},
{
"name": "FLOAT",
"type": "FLOAT",
"links": []
}
],
"properties": {
"cnr_id": "comfyui_essentials",
"ver": "9d9f4bedfc9f0321c19faf71855e228c93bd0dc9",
"Node name for S&R": "SimpleMath+"
},
"widgets_values": [
"a / 2"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 20,
"type": "EmptyImage",
"pos": [
598.7989972894171,
38.44581407374677
],
"size": [
270,
130
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
24,
25
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.71",
"Node name for S&R": "EmptyImage"
},
"widgets_values": [
1500,
1080,
1,
31216
]
},
{
"id": 7,
"type": "PreviewImage",
"pos": [
2066.5070289062483,
21.712995039367645
],
"size": [
478.61678037109414,
372.53011855468753
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 3
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 1,
"type": "ImageCompositeMasked",
"pos": [
1759.2885230468773,
21.712995039367645
],
"size": [
270,
146
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 24
},
{
"name": "source",
"type": "IMAGE",
"link": 26
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": null
},
{
"name": "x",
"type": "INT",
"widget": {
"name": "x"
},
"link": 29
},
{
"name": "y",
"type": "INT",
"widget": {
"name": "y"
},
"link": 38
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
3
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
187,
0,
false
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
3,
1,
0,
7,
0,
"IMAGE"
],
[
7,
8,
1,
10,
0,
"INT"
],
[
18,
15,
1,
18,
0,
"INT"
],
[
20,
9,
0,
19,
0,
"*"
],
[
21,
17,
0,
19,
1,
"*"
],
[
24,
20,
0,
1,
0,
"IMAGE"
],
[
25,
20,
0,
8,
0,
"IMAGE"
],
[
26,
21,
0,
1,
1,
"IMAGE"
],
[
27,
21,
0,
15,
0,
"IMAGE"
],
[
29,
19,
0,
1,
3,
"INT"
],
[
30,
8,
0,
9,
0,
"INT,FLOAT"
],
[
31,
15,
0,
17,
0,
"INT,FLOAT"
],
[
34,
23,
0,
24,
0,
"INT,FLOAT"
],
[
35,
22,
0,
24,
1,
"INT,FLOAT"
],
[
36,
8,
1,
23,
0,
"INT,FLOAT"
],
[
37,
15,
1,
22,
0,
"INT,FLOAT"
],
[
38,
24,
0,
1,
4,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909097,
"offset": [
-498.0189191644172,
78.28700496063236
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
CSSでおなじみの top: 50%; left: 50%; transform: translate(-50%, -50%); のような座標計算をノードで行えば中央配置も可能ですが…まあ、正直めんどくさいですね(;・∀・)
透過画像を重ねる
ここがComfyUIにおけるレイヤー合成の肝です。
「背景が透明な画像」を重ねたい場合、単に画像を繋ぐだけではうまくいきません。
ComfyUIでは、「マスクされた部分を source 画像で置き換える」 という処理として考え直す必要があります。
透過PNGを合成する手順

{
"id": "5afabc21-bbd6-4ea3-bd3a-ce4c1dedc9c8",
"revision": 0,
"last_node_id": 68,
"last_link_id": 98,
"nodes": [
{
"id": 64,
"type": "PreviewImage",
"pos": [
472.53912353515625,
-16.18735694885254
],
"size": [
389.7879943847656,
406.6759948730469
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 92
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 67,
"type": "EmptyImage",
"pos": [
-204.73104858398438,
327.24261474609375
],
"size": [
260.080078125,
130
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
97,
98
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "EmptyImage"
},
"widgets_values": [
1024,
1024,
1,
31216
]
},
{
"id": 68,
"type": "PreviewImage",
"pos": [
168.60767025899094,
350.2180223828934
],
"size": [
237.16300000000012,
276.61299999999994
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 98
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.71",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 65,
"type": "MaskPreview",
"pos": [
153.95507202148437,
-277.7764831542968
],
"size": [
254.04959106445312,
296.4132080078125
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 94
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "MaskPreview"
},
"widgets_values": []
},
{
"id": 61,
"type": "ImageCompositeMasked",
"pos": [
176.92471313476562,
111.9552001953125
],
"size": [
210,
146
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 89
},
{
"name": "source",
"type": "IMAGE",
"link": 97
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 90
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
92
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 62,
"type": "LoadImage",
"pos": [
-204.73104858398438,
-115.7205581665039
],
"size": [
260.080078125,
352
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
89
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
90,
94
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (3).png",
"image"
]
}
],
"links": [
[
89,
62,
0,
61,
0,
"IMAGE"
],
[
90,
62,
1,
61,
2,
"MASK"
],
[
92,
61,
0,
64,
0,
"IMAGE"
],
[
94,
62,
1,
65,
0,
"MASK"
],
[
97,
67,
0,
61,
1,
"IMAGE"
],
[
98,
67,
0,
68,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909091,
"offset": [
304.7310485839844,
377.7764831542968
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
使うのは同じく ImageCompositeMasked ノードですが、mask 入力 を使用します。
-
- 透過画像を読み込むと、
MASK出力から「透明部分のマスク」が得られます。
- 透過画像を読み込むと、
-
- このマスクを
ImageCompositeMaskedノードのmask入力に繋ぎます。
- このマスクを
-
- すると、マスクの部分だけが source 画像(ピンクの空など)に置き換わります。
サイズ違いによる歪み対策
resize_source を true にしていると、source画像は無理やり destination 画像と同じサイズに引き伸ばされます。

{
"id": "5afabc21-bbd6-4ea3-bd3a-ce4c1dedc9c8",
"revision": 0,
"last_node_id": 77,
"last_link_id": 119,
"nodes": [
{
"id": 61,
"type": "ImageCompositeMasked",
"pos": [
381.84986261757945,
-438.46703544218724
],
"size": [
210,
146
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 89
},
{
"name": "source",
"type": "IMAGE",
"link": 107
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 90
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
92
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 71,
"type": "ImageCompositeMasked",
"pos": [
374.4083626175796,
562.3663137714836
],
"size": [
210,
146
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 103
},
{
"name": "source",
"type": "IMAGE",
"link": 104
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 105
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
106
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 76,
"type": "PreviewImage",
"pos": [
623.0842712343316,
78.65974313649643
],
"size": [
503.2014527929691,
328.6741409453125
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 116
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 69,
"type": "PreviewImage",
"pos": [
623.0842712343316,
565.6720988954505
],
"size": [
425.25276879296894,
420.7953129453126
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 106
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 64,
"type": "PreviewImage",
"pos": [
623.0842712343316,
-437.8232503182202
],
"size": [
389.7879943847656,
406.6759948730469
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 92
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 67,
"type": "ImageScale",
"pos": [
134.00288795693496,
583.6559534632579
],
"size": [
210,
130
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 100
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 97
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 98
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
104
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"center"
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 73,
"type": "GetImageSize",
"pos": [
-168.98592681113297,
164.04643816374906
],
"size": [
210,
136
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 108
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
109
]
},
{
"name": "height",
"type": "INT",
"links": [
111
]
},
{
"name": "batch_size",
"type": "INT",
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "GetImageSize"
},
"widgets_values": []
},
{
"id": 66,
"type": "LoadImage",
"pos": [
-758.9863037618766,
157.01741062679625
],
"size": [
449.2804064023437,
370.28902500000004
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
100,
107,
108,
119
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"flat_park.png",
"image"
]
},
{
"id": 62,
"type": "LoadImage",
"pos": [
-721.3323372235926,
-426.2833808821872
],
"size": [
380.18952740234374,
472.07216076953125
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
89,
99,
103,
112
]
},
{
"name": "MASK",
"type": "MASK",
"links": [
90,
105,
114
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"9af5807860cb17e45acaabd3556f09fc.png",
"image"
]
},
{
"id": 68,
"type": "GetImageSize",
"pos": [
-168.98592681113297,
629.975369576539
],
"size": [
210,
136
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 99
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
97
]
},
{
"name": "height",
"type": "INT",
"links": [
98
]
},
{
"name": "batch_size",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "GetImageSize"
},
"widgets_values": []
},
{
"id": 72,
"type": "ImageResizeKJv2",
"pos": [
74.00288795693494,
76.57273099184734
],
"size": [
270,
336
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 112
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 114
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 109
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 111
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
117
]
},
{
"name": "width",
"type": "INT",
"links": null
},
{
"name": "height",
"type": "INT",
"links": null
},
{
"name": "mask",
"type": "MASK",
"links": [
118
]
}
],
"properties": {
"cnr_id": "comfyui-kjnodes",
"ver": "c661baadd9683c0033cd2a6ad90157c6d099a6c2",
"Node name for S&R": "ImageResizeKJv2"
},
"widgets_values": [
512,
512,
"nearest-exact",
"pad",
"0, 0, 0",
"center",
1,
"cpu"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 77,
"type": "ImageCompositeMasked",
"pos": [
374.4083626175796,
75.3539580125295
],
"size": [
210,
146
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 117
},
{
"name": "source",
"type": "IMAGE",
"link": 119
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 118
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
116
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
89,
62,
0,
61,
0,
"IMAGE"
],
[
90,
62,
1,
61,
2,
"MASK"
],
[
92,
61,
0,
64,
0,
"IMAGE"
],
[
97,
68,
0,
67,
1,
"INT"
],
[
98,
68,
1,
67,
2,
"INT"
],
[
99,
62,
0,
68,
0,
"IMAGE"
],
[
100,
66,
0,
67,
0,
"IMAGE"
],
[
103,
62,
0,
71,
0,
"IMAGE"
],
[
104,
67,
0,
71,
1,
"IMAGE"
],
[
105,
62,
1,
71,
2,
"MASK"
],
[
106,
71,
0,
69,
0,
"IMAGE"
],
[
107,
66,
0,
61,
1,
"IMAGE"
],
[
108,
66,
0,
73,
0,
"IMAGE"
],
[
109,
73,
0,
72,
2,
"INT"
],
[
111,
73,
1,
72,
3,
"INT"
],
[
112,
62,
0,
72,
0,
"IMAGE"
],
[
114,
62,
1,
72,
1,
"MASK"
],
[
116,
77,
0,
76,
0,
"IMAGE"
],
[
117,
72,
0,
77,
0,
"IMAGE"
],
[
118,
72,
3,
77,
2,
"MASK"
],
[
119,
66,
0,
77,
1,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "crop",
"bounding": [
-189.4861535218786,
477.59616906327756,
1352.5046636999987,
525.2738047999997
],
"color": "#b58b2a",
"font_size": 24,
"flags": {}
},
{
"id": 2,
"title": "Pad",
"bounding": [
-193.505926811133,
-4.296041987470447,
1353.3382508384339,
447.1725729793178
],
"color": "#a1309b",
"font_size": 24,
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.7513148009015782,
"offset": [
858.9863037618766,
538.4670354421872
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
背景が単色やパターンなら気になりませんが、写真などの場合は歪んでしまいます。 一番簡単な解決策は、あらかじめ2つの画像を同じサイズにパディング/クロップしておくことです。
- 🟪前面画像を背景画像のサイズにパディング
- 🟨背景画像を前面画像のサイズにクロップ
実践例:セグメンテーションとの組み合わせ
「ドレスの部分だけ色を変えたい」といった場合も同じ理屈です。

{
"id": "dbea702b-55fe-491d-a709-7c7bc1d46b5e",
"revision": 0,
"last_node_id": 11,
"last_link_id": 23,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [
999.0570068359375,
347.8655090332031
],
"size": [
341.70733642578125,
564.8818359375
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
19,
23
]
},
{
"name": "MASK",
"type": "MASK",
"links": []
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"minimal mannequin.jpg",
"image"
]
},
{
"id": 11,
"type": "SegmentV2",
"pos": [
1392.201904296875,
432.3311462402344
],
"size": [
400,
296
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 19
},
{
"name": "background_color",
"shape": 7,
"type": "COLOR",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null
},
{
"name": "MASK",
"type": "MASK",
"links": [
22
]
},
{
"name": "MASK_IMAGE",
"type": "IMAGE",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-rmbg",
"ver": "2.4.0",
"Node name for S&R": "SegmentV2"
},
"widgets_values": [
"dress",
"sam_vit_h (2.56GB)",
"GroundingDINO_SwinT_OGC (694MB)",
0.3,
0,
0,
false,
"Alpha"
],
"color": "#323",
"bgcolor": "#535"
},
{
"id": 8,
"type": "EmptyImage",
"pos": [
1521.3441162109375,
795.3721923828125
],
"size": [
270,
130
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
21
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "EmptyImage"
},
"widgets_values": [
512,
512,
1,
1683634
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 3,
"type": "ImageCompositeMasked",
"pos": [
1843.6395263671875,
343.4654846191406
],
"size": [
256,
146
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "destination",
"type": "IMAGE",
"link": 23
},
{
"name": "source",
"type": "IMAGE",
"link": 21
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": 22
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
4
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "ImageCompositeMasked"
},
"widgets_values": [
0,
0,
true
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 4,
"type": "PreviewImage",
"pos": [
2151.0771484375,
343.4654846191406
],
"size": [
402.6199951171875,
576.2999877929688
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 4
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
}
],
"links": [
[
4,
3,
0,
4,
0,
"IMAGE"
],
[
19,
1,
0,
11,
0,
"IMAGE"
],
[
21,
8,
0,
3,
1,
"IMAGE"
],
[
22,
11,
1,
3,
2,
"MASK"
],
[
23,
1,
0,
3,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1,
"offset": [
-899.0570068359375,
-243.46548461914062
]
},
"frontendVersion": "1.22.0",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
-
- 入力画像からセグメンテーションで「ドレスのマスク」を作ります。
-
sourceにEmptyImage(単色画像)などを繋ぎます。
-
resize_sourceをtrueにします(単色なら歪んでも関係ないのでOK)。
-
- これでドレス部分だけが指定色で塗りつぶされます。
最初は感覚が掴みづらいとは思いますが、徐々に慣れていきましょう。
画像を並べる (結合)
画像を横並び、または縦並びに結合します。比較画像を作りたい時などに便利です。
Image Stitch ノード
シンプルな結合ノードです。

{
"id": "c4311028-f464-4d21-a079-ea6457b21328",
"revision": 0,
"last_node_id": 11,
"last_link_id": 13,
"nodes": [
{
"id": 5,
"type": "LoadImage",
"pos": [
1429.7952880859375,
565.1294555664062
],
"size": [
276.28009033203125,
554.1300048828125
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
5
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.36",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"スバルダック.png",
"image"
]
},
{
"id": 8,
"type": "PreviewImage",
"pos": [
2414.51318359375,
565.1294555664062
],
"size": [
301.70001220703125,
395.6000061035156
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 8
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.36",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 2,
"type": "LoadImage",
"pos": [
1429.7952880859375,
120.70742797851562
],
"size": [
276.28009033203125,
393.20001220703125
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
9
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.36",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"example.png",
"image"
]
},
{
"id": 10,
"type": "GetImageSize",
"pos": [
1754.6292724609375,
120.70742797851562
],
"size": [
210,
116
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 9
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
12
]
},
{
"name": "height",
"type": "INT",
"links": [
13
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "GetImageSize"
},
"widgets_values": [
"width: 768, height: 768"
],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 7,
"type": "ImageScale",
"pos": [
2096.332275390625,
565.1294555664062
],
"size": [
270,
130
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 5
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 12
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 13
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
8
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.36",
"Node name for S&R": "ImageScale"
},
"widgets_values": [
"nearest-exact",
512,
512,
"center"
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
5,
5,
0,
7,
0,
"IMAGE"
],
[
8,
7,
0,
8,
0,
"IMAGE"
],
[
9,
2,
0,
10,
0,
"IMAGE"
],
[
12,
10,
0,
7,
1,
"INT"
],
[
13,
10,
1,
7,
2,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909091,
"offset": [
-1329.7952880859375,
-20.707427978515625
]
},
"frontendVersion": "1.22.0",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
🪢 Image Concatenate From Batch ノード
Stitchノードを複数使えば3枚、4枚と並べられますが、バッチ(複数枚セット)画像をまとめてグリッド状に並べたい場合は、このノードを使うとスマートに処理できます。

{
"id": "dbea702b-55fe-491d-a709-7c7bc1d46b5e",
"revision": 0,
"last_node_id": 21,
"last_link_id": 34,
"nodes": [
{
"id": 14,
"type": "LoadImage",
"pos": [
1163.4183349609375,
451.70794677734375
],
"size": [
298.23773193359375,
326
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
29
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"0000.png",
"image"
]
},
{
"id": 21,
"type": "LoadImage",
"pos": [
1505.1942138671875,
994.9454956054688
],
"size": [
298.23773193359375,
314.00006103515625
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
34
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"0032.png",
"image"
]
},
{
"id": 19,
"type": "LoadImage",
"pos": [
1505.1942138671875,
607.2006225585938
],
"size": [
298.23773193359375,
314.00006103515625
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
31
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"0017.png",
"image"
]
},
{
"id": 15,
"type": "LoadImage",
"pos": [
1163.4183349609375,
845.452880859375
],
"size": [
298.23773193359375,
314
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"0016.png",
"image"
]
},
{
"id": 20,
"type": "ImpactMakeImageBatch",
"pos": [
1875.326904296875,
451.70794677734375
],
"size": [
156.62362670898438,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image1",
"type": "IMAGE",
"link": 29
},
{
"name": "image2",
"type": "IMAGE",
"link": 30
},
{
"name": "image3",
"type": "IMAGE",
"link": 31
},
{
"name": "image4",
"type": "IMAGE",
"link": 34
},
{
"name": "image5",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
32
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "2346b677666e14ad53a6e65e16a33289a78106c7",
"Node name for S&R": "ImpactMakeImageBatch"
},
"widgets_values": []
},
{
"id": 16,
"type": "PreviewImage",
"pos": [
2403.75732421875,
451.70794677734375
],
"size": [
630.0931396484375,
421.0440673828125
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 33
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 18,
"type": "ImageConcatFromBatch",
"pos": [
2061.195556640625,
451.70794677734375
],
"size": [
298.3335876464844,
106
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 32
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
33
]
}
],
"properties": {
"cnr_id": "comfyui-kjnodes",
"ver": "08a22951ed624ca90146e33626b3204d8b8f8ad0",
"Node name for S&R": "ImageConcatFromBatch"
},
"widgets_values": [
2,
false,
2048
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
29,
14,
0,
20,
0,
"IMAGE"
],
[
30,
15,
0,
20,
1,
"IMAGE"
],
[
31,
19,
0,
20,
2,
"IMAGE"
],
[
32,
20,
0,
18,
0,
"IMAGE"
],
[
33,
18,
0,
16,
0,
"IMAGE"
],
[
34,
21,
0,
20,
3,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.7513148009015777,
"offset": [
-1063.4183349609375,
-351.70794677734375
]
},
"frontendVersion": "1.22.0",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- Kijai/ComfyUI-KJNodes に含まれます。
画像を混ぜる (ブレンド)
Image Blend ノード
ペイントソフトでいうレイヤーの「合成モード」のようなものです。

{
"id": "dbea702b-55fe-491d-a709-7c7bc1d46b5e",
"revision": 0,
"last_node_id": 32,
"last_link_id": 45,
"nodes": [
{
"id": 31,
"type": "LoadImage",
"pos": [
1265.7327880859375,
449.5876159667969
],
"size": [
214.080078125,
326
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
44
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (72).png",
"image"
]
},
{
"id": 32,
"type": "LoadImage",
"pos": [
1268.56396484375,
830.6228637695312
],
"size": [
214.080078125,
326
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
45
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (73).png",
"image"
]
},
{
"id": 23,
"type": "PreviewImage",
"pos": [
1884.6422119140625,
625.548583984375
],
"size": [
283.3908996582031,
417.5181884765625
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 35
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 22,
"type": "ImageBlend",
"pos": [
1549.7430419921875,
760.9017333984375
],
"size": [
270,
102
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image1",
"type": "IMAGE",
"link": 44
},
{
"name": "image2",
"type": "IMAGE",
"link": 45
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
35
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.39",
"Node name for S&R": "ImageBlend"
},
"widgets_values": [
1,
"multiply"
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
35,
22,
0,
23,
0,
"IMAGE"
],
[
44,
31,
0,
22,
0,
"IMAGE"
],
[
45,
32,
0,
22,
1,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9090909090909091,
"offset": [
-1165.7327880859375,
-349.5876159667969
]
},
"frontendVersion": "1.22.0",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
標準ではごく単純なブレンドしかできませんが、blend_factor で合成の強さを調整できます。
blend_factor: 1.0に近いほど source 画像が濃くなる。
EmptyImage ノード
単色の画像を作るだけのノードです。

{
"id": "57b8cf9b-11ed-420b-be41-187510d36325",
"revision": 0,
"last_node_id": 2,
"last_link_id": 1,
"nodes": [
{
"id": 2,
"type": "PreviewImage",
"pos": [
314.87347025899174,
37.1318568457031
],
"size": [
406.26655000000017,
437.664
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 1
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.71",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 1,
"type": "EmptyImage",
"pos": [
-37.465248583983346,
37.1318568457031
],
"size": [
260.080078125,
130
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.59",
"Node name for S&R": "EmptyImage"
},
"widgets_values": [
1024,
1024,
1,
31216
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
1,
1,
0,
2,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.8264462809917356,
"offset": [
137.46524858398334,
62.8681431542969
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
色の設定方法
色の設定がややこしく、慣れ親しんだ16進数やRGBではなく、24ビットカラー(10進数) で設定します。
計算式は以下の通りです:
Decimal Value = (Red × 65536) + (Green × 256) + Blue
例: ピンク色(RGB: 255, 192, 203)を作りたい場合
255 × 65536 + 192 × 256 + 203 = 16,761,035
このように計算した値を color パラメータに入力します。