什么是 Batch (批次)?
Batch(批次)是用于 汇总并同时处理 多张图像的机制。 与 List“逐张按顺序处理”不同,Batch 的区别在于 一次执行就能让多张图像一次性通过。
Queue / List / Batch 的关系如下。
- Queue
- 从外部按顺序执行同一个 工作流
- List
- 逐个按顺序处理多个输入(串行处理)
- Batch
- 将多张图像汇总处理(并行处理)
视频就是 Batch
由于视频是由一系列连续编号的图像构成的,因此在 ComfyUI 中,视频 = IMAGE 的 Batch 来处理。
因此,常规的 Batch 操作节点可以直接用于视频,反之视频用节点也可以像一般的 Batch 操作一样使用。 没有必要区分视频和 Batch。
进入 Batch 的图像必须尺寸相同
进入 Batch 的图像,必须全部是相同尺寸。 如果长宽不一致,会以第 1 张为基准,后续的图像会被自动裁剪。

{
"id": "ba2ad549-90e5-4928-91a9-838f62faaf9b",
"revision": 0,
"last_node_id": 8,
"last_link_id": 8,
"nodes": [
{
"id": 3,
"type": "LoadImage",
"pos": [
470.12200360449634,
-270
],
"size": [
335.64547880981644,
458.2099361064978
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
1,
4
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.75",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (38).png",
"image"
]
},
{
"id": 6,
"type": "PreviewImage",
"pos": [
1220.681461659835,
-136.54694942555741
],
"size": [
531.8183964013544,
582.297571000353
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 7
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.75",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 1,
"type": "LoadImage",
"pos": [
362.8584147649525,
257.4072522034403
],
"size": [
442.9090676493603,
348.64453542168144
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2,
5
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.75",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (36).png",
"image"
]
},
{
"id": 2,
"type": "LoadImage",
"pos": [
561.8919629449949,
680
],
"size": [
243.87551946931785,
495.15628337345174
],
"flags": {},
"order": 2,
"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.75",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"pasted/image (37).png",
"image"
]
},
{
"id": 4,
"type": "ImpactMakeImageList",
"pos": [
958.4808813380901,
233.92279489924226
],
"size": [
181.63769510352577,
88.44208248160515
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image1",
"shape": 7,
"type": "IMAGE",
"link": 1
},
{
"name": "image2",
"type": "IMAGE",
"link": 2
},
{
"name": "image3",
"type": "IMAGE",
"link": 3
},
{
"name": "image4",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"shape": 6,
"type": "IMAGE",
"links": [
7
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactMakeImageList"
}
},
{
"id": 5,
"type": "ImpactMakeImageBatch",
"pos": [
958.4808813380901,
515.5703816480251
],
"size": [
185.11459509789339,
86
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image1",
"shape": 7,
"type": "IMAGE",
"link": 4
},
{
"name": "image2",
"type": "IMAGE",
"link": 5
},
{
"name": "image3",
"type": "IMAGE",
"link": 6
},
{
"name": "image4",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
8
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactMakeImageBatch"
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 7,
"type": "PreviewImage",
"pos": [
1220.681461659835,
515.5703816480251
],
"size": [
528.0256750817534,
530.0647321425793
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 8
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.75",
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
1,
3,
0,
4,
0,
"IMAGE"
],
[
2,
1,
0,
4,
1,
"IMAGE"
],
[
3,
2,
0,
4,
2,
"IMAGE"
],
[
4,
3,
0,
5,
0,
"IMAGE"
],
[
5,
1,
0,
5,
1,
"IMAGE"
],
[
6,
2,
0,
5,
2,
"IMAGE"
],
[
7,
4,
0,
6,
0,
"IMAGE"
],
[
8,
5,
0,
7,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.630394086312858,
"offset": [
-262.8584147649525,
370
]
},
"frontendVersion": "1.34.0",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
上: List 下: Batch 因为需要统一形状,所以 Batch 中后面的图像被裁剪了。
并行处理的负载(OOM 的注意)
由于 Batch 会同时处理多张图像,因此所需的内存量也会相应增加。 如果直接把 1 分钟的视频放入 image2image,VRAM 会不足,瞬间就会 OOM(内存不足)。
这种情况下,最好 转换为 Batch → List,通过逐张处理来解决。
必要的自定义节点
虽然核心节点中已经准备了基本的,但想处理视频的话还是有点勉强。
- ltdrdata/ComfyUI-Impact-Pack
- ltdrdata/ComfyUI-Inspire-Pack
- kijai/ComfyUI-KJNodes
- Kosinkadink/ComfyUI-VideoHelperSuite
制作 Batch
Batch Images 节点
将多个 IMAGE 汇总为 Batch。
{
"id": "1c6f98ec-b3ae-4b9b-8480-99bf10fe1c76",
"revision": 0,
"last_node_id": 6,
"last_link_id": 6,
"nodes": [
{
"id": 3,
"type": "LoadImage",
"pos": [
57.043942473394814,
327.0435950113614
],
"size": [
222.798828125,
314
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"0.png",
"image"
]
},
{
"id": 4,
"type": "LoadImage",
"pos": [
309.95386844409427,
429.9439034751431
],
"size": [
222.798828125,
314.00000000000006
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
3
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"1 (1).png",
"image"
]
},
{
"id": 5,
"type": "LoadImage",
"pos": [
562.8637944147937,
532.8442119389249
],
"size": [
222.798828125,
314.00000000000006
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
4
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"2 (1).png",
"image"
]
},
{
"id": 6,
"type": "LoadImage",
"pos": [
815.7737203854931,
635.7445204027067
],
"size": [
222.798828125,
314.00000000000006
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
5
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"3 (1).png",
"image"
]
},
{
"id": 1,
"type": "BatchImagesNode",
"pos": [
1125.9930141133268,
327.0435950113614
],
"size": [
169.6640625,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"label": "image0",
"name": "images.image0",
"type": "IMAGE",
"link": 2
},
{
"label": "image1",
"name": "images.image1",
"type": "IMAGE",
"link": 3
},
{
"label": "image2",
"name": "images.image2",
"shape": 7,
"type": "IMAGE",
"link": 4
},
{
"label": "image3",
"name": "images.image3",
"shape": 7,
"type": "IMAGE",
"link": 5
},
{
"label": "image4",
"name": "images.image4",
"shape": 7,
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
6
]
}
],
"properties": {
"Node name for S&R": "BatchImagesNode"
},
"widgets_values": [],
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "PreviewImage",
"pos": [
1351.8995321489313,
327.0435950113614
],
"size": [
472.0485275700512,
490.87895237980354
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 6
}
],
"outputs": [],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
}
],
"links": [
[
2,
3,
0,
1,
0,
"IMAGE"
],
[
3,
4,
0,
1,
1,
"IMAGE"
],
[
4,
5,
0,
1,
2,
"IMAGE"
],
[
5,
6,
0,
1,
3,
"IMAGE"
],
[
6,
1,
0,
2,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.76804951207243,
"offset": [
219.43550038662673,
8.26726920516375
]
},
"frontendVersion": "1.38.8",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- 每次连接增加时都会添加插槽,可以汇总任意数量。
Load Image Batch From Dir (Inspire) / Load Images (Path) 节点
将文件夹内的图像作为 Batch 汇总。

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 24,
"last_link_id": 30,
"nodes": [
{
"id": 9,
"type": "PreviewImage",
"pos": [
1029.1478669725964,
253.0512511271517
],
"size": [
422.9744601491934,
466.20921868865173
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 30
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 24,
"type": "VHS_LoadImagesPath",
"pos": [
664.0692493724947,
518.9129093127292
],
"size": [
292.45143808418436,
456.45143808418436
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "meta_batch",
"shape": 7,
"type": "VHS_BatchManager",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": []
},
{
"name": "MASK",
"type": "MASK",
"links": null
},
{
"name": "frame_count",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-videohelpersuite",
"ver": "8923bd836bdab8b7bbdf4ed104b7d045e70c66e2",
"Node name for S&R": "VHS_LoadImagesPath"
},
"widgets_values": {
"directory": "E:\\working\\Vivi",
"image_load_cap": 0,
"skip_first_images": 0,
"select_every_nth": 1,
"videopreview": {
"hidden": false,
"paused": false,
"params": {
"image_load_cap": 0,
"skip_first_images": 0,
"select_every_nth": 1,
"filename": "E:\\working\\Vivi",
"type": "path",
"format": "folder"
}
}
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 23,
"type": "LoadImagesFromDir //Inspire",
"pos": [
664.0692493724947,
251.39556483364825
],
"size": [
292.833435651327,
194
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-inspire-pack",
"ver": "1.23.0",
"Node name for S&R": "LoadImagesFromDir //Inspire"
},
"widgets_values": [
"E:\\working\\Vivi",
0,
0,
true,
"None"
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
30,
23,
0,
9,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1,
"offset": [
-564.0692493724947,
-151.39556483364825
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
- Inspire 节点可以排序
- VHS 节点有“每 N 张输出”等附加功能
操作 Batch
Reverse Image Batch 节点
颠倒 Batch 的顺序。 可用于视频的倒放等。

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 26,
"last_link_id": 29,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [
437.0238029390012,
281.45517150102967
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
24
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"A.png",
"image"
]
},
{
"id": 4,
"type": "LoadImage",
"pos": [
673.6492743455647,
377.2625981314576
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2,
7,
25
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"B.png",
"image"
]
},
{
"id": 3,
"type": "LoadImage",
"pos": [
910.2747457521282,
473.0700247618855
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
26
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"C.png",
"image"
]
},
{
"id": 22,
"type": "ImpactMakeImageBatch",
"pos": [
1160.7996273572849,
281.45517150102967
],
"size": [
185.62226026920635,
86
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image1",
"shape": 7,
"type": "IMAGE",
"link": 24
},
{
"name": "image2",
"type": "IMAGE",
"link": 25
},
{
"name": "image3",
"type": "IMAGE",
"link": 26
},
{
"name": "image4",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
27,
28
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactMakeImageBatch"
},
"widgets_values": []
},
{
"id": 9,
"type": "PreviewImage",
"pos": [
1385.927735543855,
404.2965794773552
],
"size": [
210,
433.98852151453366
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 27
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 26,
"type": "PreviewImage",
"pos": [
1637.8569946600876,
281.45517150102967
],
"size": [
217.51816267396066,
559.649240493594
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 29
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 25,
"type": "ReverseImageBatch",
"pos": [
1390.8748200060702,
281.45517150102967
],
"size": [
202.52924227443842,
26
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 28
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
29
]
}
],
"properties": {
"cnr_id": "comfyui-kjnodes",
"ver": "4dfb85dcc52e4315c33170d97bb987baa46d128b",
"Node name for S&R": "ReverseImageBatch"
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
2,
4,
0,
2,
0,
"IMAGE"
],
[
7,
4,
0,
7,
0,
"IMAGE"
],
[
24,
1,
0,
22,
0,
"IMAGE"
],
[
25,
4,
0,
22,
1,
"IMAGE"
],
[
26,
3,
0,
22,
2,
"IMAGE"
],
[
27,
22,
0,
9,
0,
"IMAGE"
],
[
28,
22,
0,
25,
0,
"IMAGE"
],
[
29,
25,
0,
26,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.2392655498489553,
"offset": [
-337.0238029390012,
-181.45517150102967
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
RepeatImageBatch 节点
将整个 Batch 重复指定次数。
ImageBatchRepeatInterleaving 节点
将各帧重复指定次数。

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 29,
"last_link_id": 33,
"nodes": [
{
"id": 9,
"type": "PreviewImage",
"pos": [
1305.354512143779,
513.4603015032661
],
"size": [
1161.4605890107348,
258
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 31
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 29,
"type": "PreviewImage",
"pos": [
1304.9908297632537,
833.182791747073
],
"size": [
1163.5208584988297,
258
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 33
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 4,
"type": "LoadImage",
"pos": [
471.39254659139357,
648.6199396156832
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2,
7,
25
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"B.png",
"image"
]
},
{
"id": 3,
"type": "LoadImage",
"pos": [
471.39254659139357,
1011.4886147737874
],
"size": [
214.080078125,
314.0000000000001
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
26
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"C.png",
"image"
]
},
{
"id": 22,
"type": "ImpactMakeImageBatch",
"pos": [
773.3983709772352,
724.6079002014566
],
"size": [
185.62226026920635,
86
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image1",
"shape": 7,
"type": "IMAGE",
"link": 24
},
{
"name": "image2",
"type": "IMAGE",
"link": 25
},
{
"name": "image3",
"type": "IMAGE",
"link": 26
},
{
"name": "image4",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30,
32
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactMakeImageBatch"
},
"widgets_values": []
},
{
"id": 1,
"type": "LoadImage",
"pos": [
471.39254659139357,
285.7512644575787
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
24
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"A.png",
"image"
]
},
{
"id": 27,
"type": "RepeatImageBatch",
"pos": [
1012.4224669640521,
513.4603015032661
],
"size": [
210,
58
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 30
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
31
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "RepeatImageBatch"
},
"widgets_values": [
3
],
"color": "#432",
"bgcolor": "#653"
},
{
"id": 28,
"type": "ImageBatchRepeatInterleaving",
"pos": [
1012.4224669640521,
827.5654410675616
],
"size": [
272.36689177371625,
78
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 32
},
{
"name": "mask",
"shape": 7,
"type": "MASK",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
33
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-kjnodes",
"ver": "4dfb85dcc52e4315c33170d97bb987baa46d128b",
"Node name for S&R": "ImageBatchRepeatInterleaving"
},
"widgets_values": [
3
],
"color": "#323",
"bgcolor": "#535"
}
],
"links": [
[
2,
4,
0,
2,
0,
"IMAGE"
],
[
7,
4,
0,
7,
0,
"IMAGE"
],
[
24,
1,
0,
22,
0,
"IMAGE"
],
[
25,
4,
0,
22,
1,
"IMAGE"
],
[
26,
3,
0,
22,
2,
"IMAGE"
],
[
30,
22,
0,
27,
0,
"IMAGE"
],
[
31,
27,
0,
9,
0,
"IMAGE"
],
[
32,
22,
0,
28,
0,
"IMAGE"
],
[
33,
28,
0,
29,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6995330953034977,
"offset": [
-371.39254659139357,
-185.7512644575787
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
上: RepeatImageBatch 下: ImageBatchRepeatInterleaving
从 Batch 中取出
ImageFromBatch 节点
从 Batch 中取出任意位置的图像。

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 26,
"last_link_id": 32,
"nodes": [
{
"id": 26,
"type": "PreviewImage",
"pos": [
1282.465927819887,
251.39556483364825
],
"size": [
210,
258
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 32
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 9,
"type": "PreviewImage",
"pos": [
1014.0591784986361,
402.39226643827953
],
"size": [
210,
258
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 30
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 23,
"type": "LoadImagesFromDir //Inspire",
"pos": [
664.0692493724947,
251.39556483364825
],
"size": [
292.833435651327,
194
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30,
31
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-inspire-pack",
"ver": "1.23.0",
"Node name for S&R": "LoadImagesFromDir //Inspire"
},
"widgets_values": [
"E:\\working\\num",
0,
0,
false,
"None"
]
},
{
"id": 25,
"type": "ImageFromBatch",
"pos": [
1014.6843064218543,
251.39556483364825
],
"size": [
210,
82
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 31
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
32
]
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "ImageFromBatch"
},
"widgets_values": [
3,
4
],
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
30,
23,
0,
9,
0,
"IMAGE"
],
[
31,
23,
0,
25,
0,
"IMAGE"
],
[
32,
25,
0,
26,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.2392655498489547,
"offset": [
-566.4900380407229,
-150.58863527757217
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
batch_index: 取出位置(从 0 开始)length: Batch 的张数
Get Image or Mask Range From Batch 节点
批量取出一定范围的图像(或蒙版)。
Select Every Nth Image 节点(Video Helper Suite)
每隔 N 张获取帧。

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 28,
"last_link_id": 35,
"nodes": [
{
"id": 23,
"type": "LoadImagesFromDir //Inspire",
"pos": [
664.0692493724947,
251.39556483364825
],
"size": [
292.833435651327,
194
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
30,
34
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-inspire-pack",
"ver": "1.23.0",
"Node name for S&R": "LoadImagesFromDir //Inspire"
},
"widgets_values": [
"E:\\working\\num",
0,
0,
false,
"None"
]
},
{
"id": 26,
"type": "PreviewImage",
"pos": [
1311.8088207681085,
251.39556483364825
],
"size": [
248.0123840465592,
284.6753572256557
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 35
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 9,
"type": "PreviewImage",
"pos": [
1002.9222168569252,
416.9970245193258
],
"size": [
210,
258
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 30
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 28,
"type": "VHS_SelectEveryNthImage",
"pos": [
998.2688388334651,
251.39556483364825
],
"size": [
272.173828125,
102
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 34
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
35
]
},
{
"name": "count",
"type": "INT",
"links": null
}
],
"properties": {
"cnr_id": "comfyui-videohelpersuite",
"ver": "8923bd836bdab8b7bbdf4ed104b7d045e70c66e2",
"Node name for S&R": "VHS_SelectEveryNthImage"
},
"widgets_values": {
"select_every_nth": 3,
"skip_first_images": 0
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
30,
23,
0,
9,
0,
"IMAGE"
],
[
34,
23,
0,
28,
0,
"IMAGE"
],
[
35,
28,
0,
26,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.1266050453172323,
"offset": [
-564.0692493724947,
-151.39556483364825
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
select_every_nth: 取出间隔skip_first_images: 跳过开头的张数
Batch ↔ List 的转换
读取视频或 Batch 后,如果想逐张处理,就转换为 List。
Image Batch to Image List 节点

{
"id": "51a0cfff-124a-46df-9bad-bbc9273d5bfe",
"revision": 0,
"last_node_id": 32,
"last_link_id": 36,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [
437.0238029390012,
281.45517150102967
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
15
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"A.png",
"image"
]
},
{
"id": 4,
"type": "LoadImage",
"pos": [
673.6492743455648,
377.2625981314576
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
2,
7,
16
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"B.png",
"image"
]
},
{
"id": 3,
"type": "LoadImage",
"pos": [
910.2747457521281,
473.0700247618855
],
"size": [
214.080078125,
314
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
17
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"C.png",
"image"
]
},
{
"id": 20,
"type": "ImpactMakeImageBatch",
"pos": [
1161.2693345106477,
281.45517150102967
],
"size": [
156.6236328125,
86
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "image1",
"shape": 7,
"type": "IMAGE",
"link": 15
},
{
"name": "image2",
"type": "IMAGE",
"link": 16
},
{
"name": "image3",
"type": "IMAGE",
"link": 17
},
{
"name": "image4",
"type": "IMAGE",
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
22
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactMakeImageBatch"
}
},
{
"id": 9,
"type": "PreviewImage",
"pos": [
1613.5972559487655,
281.45517150102967
],
"size": [
382.21527822393386,
419.8973366170528
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 23
}
],
"outputs": [],
"properties": {
"cnr_id": "comfy-core",
"ver": "0.3.73",
"Node name for S&R": "PreviewImage"
},
"widgets_values": []
},
{
"id": 24,
"type": "ImpactImageBatchToImageList",
"pos": [
1353.834191383092,
281.45517150102967
],
"size": [
223.82184050572906,
26
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 22
}
],
"outputs": [
{
"name": "IMAGE",
"shape": 6,
"type": "IMAGE",
"links": [
23
]
}
],
"properties": {
"cnr_id": "comfyui-impact-pack",
"ver": "61bd8397a18e7e7668e6a24e95168967768c2bed",
"Node name for S&R": "ImpactImageBatchToImageList"
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
2,
4,
0,
2,
0,
"IMAGE"
],
[
7,
4,
0,
7,
0,
"IMAGE"
],
[
15,
1,
0,
20,
0,
"IMAGE"
],
[
16,
4,
0,
20,
1,
"IMAGE"
],
[
17,
3,
0,
20,
2,
"IMAGE"
],
[
22,
20,
0,
24,
0,
"IMAGE"
],
[
23,
24,
0,
9,
0,
"IMAGE"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9310785498489526,
"offset": [
-335.94977969986394,
-181.45517150102967
]
},
"frontendVersion": "1.30.6",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
反之也有将 List 汇总为 Batch 的节点。
Image List to Image Batch节点