Update get last frame to get any frame

This commit is contained in:
ComfyUI Wiki 2026-04-29 22:40:54 +08:00
parent 2178e250a5
commit 8bcd7ad1d6

View File

@ -1,67 +1,80 @@
{
"id": "3fbf4a3e-3487-43ca-85e5-25cb5bc789cc",
"revision": 0,
"last_node_id": 4,
"last_link_id": 5,
"last_node_id": 98,
"last_link_id": 0,
"nodes": [
{
"id": 4,
"type": "2c1681e7-1f17-428d-a8bb-1cadd5199077",
"id": 98,
"type": "dca6e78d-fb06-421e-97f7-6ce17a665260",
"pos": [
792.2070384989175,
-75.93513630568225
-410,
-2230
],
"size": [
270,
48
104
],
"flags": {},
"order": 0,
"order": 7,
"mode": 0,
"inputs": [
{
"name": "video",
"type": "VIDEO",
"link": null
},
{
"label": "frame_index",
"name": "value",
"type": "INT",
"widget": {
"name": "value"
},
"link": null
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": null
"links": []
}
],
"title": "Get Video Last Frame",
"title": "Get Any Video Frame",
"properties": {
"proxyWidgets": []
"proxyWidgets": [
[
"100",
"value"
]
]
},
"widgets_values": []
}
],
"links": [],
"groups": [],
"version": 0.4,
"definitions": {
"subgraphs": [
{
"id": "2c1681e7-1f17-428d-a8bb-1cadd5199077",
"id": "dca6e78d-fb06-421e-97f7-6ce17a665260",
"version": 1,
"state": {
"lastGroupId": 0,
"lastNodeId": 4,
"lastLinkId": 5,
"lastGroupId": 1,
"lastNodeId": 136,
"lastLinkId": 302,
"lastRerouteId": 0
},
"revision": 0,
"config": {},
"name": "Get Video Last Frame",
"name": "Get Any Video Frame",
"inputNode": {
"id": -10,
"bounding": [
380,
-57,
120,
60
80
]
},
"outputNode": {
@ -85,6 +98,19 @@
480,
-37
]
},
{
"id": "819955f6-c686-4896-8032-ff2d0059109a",
"name": "value",
"type": "INT",
"linkIds": [
283
],
"label": "frame_index",
"pos": [
480,
-17
]
}
],
"outputs": [
@ -107,12 +133,12 @@
"id": 1,
"type": "GetVideoComponents",
"pos": [
559.9999886591291,
-150.00000618684095
560,
-150
],
"size": [
225,
96
230,
120
],
"flags": {},
"order": 0,
@ -150,19 +176,18 @@
],
"properties": {
"Node name for S&R": "GetVideoComponents"
},
"widgets_values": []
}
},
{
"id": 2,
"type": "GetImageSize",
"pos": [
840.0000052637645,
9.999974164696937
560,
50
],
"size": [
225,
96
230,
120
],
"flags": {},
"order": 1,
@ -193,25 +218,24 @@
"name": "batch_size",
"type": "INT",
"links": [
3
285
]
}
],
"properties": {
"Node name for S&R": "GetImageSize"
},
"widgets_values": []
}
},
{
"id": 3,
"type": "ImageFromBatch",
"pos": [
1130.0000206403708,
-150.00000618684095
1130,
-150
],
"size": [
270,
112
140
],
"flags": {},
"order": 2,
@ -230,7 +254,16 @@
"widget": {
"name": "batch_index"
},
"link": 3
"link": 286
},
{
"localized_name": "length",
"name": "length",
"type": "INT",
"widget": {
"name": "length"
},
"link": null
}
],
"outputs": [
@ -250,6 +283,120 @@
0,
1
]
},
{
"id": 99,
"type": "ComfyMathExpression",
"pos": [
910,
100
],
"size": [
400,
200
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"label": "a",
"localized_name": "values.a",
"name": "values.a",
"type": "FLOAT,INT",
"link": 284
},
{
"label": "b",
"localized_name": "values.b",
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT",
"link": 285
},
{
"label": "c",
"localized_name": "values.c",
"name": "values.c",
"shape": 7,
"type": "FLOAT,INT",
"link": null
},
{
"localized_name": "expression",
"name": "expression",
"type": "STRING",
"widget": {
"name": "expression"
},
"link": null
}
],
"outputs": [
{
"localized_name": "FLOAT",
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"localized_name": "INT",
"name": "INT",
"type": "INT",
"links": [
286
]
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression"
},
"widgets_values": [
"min(max(int(a if a >= 0 else b + a), 0), b - 1)"
]
},
{
"id": 100,
"type": "PrimitiveInt",
"pos": [
560,
250
],
"size": [
270,
110
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"localized_name": "value",
"name": "value",
"type": "INT",
"widget": {
"name": "value"
},
"link": 283
}
],
"outputs": [
{
"localized_name": "INT",
"name": "INT",
"type": "INT",
"links": [
284
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
0,
"fixed"
]
}
],
"groups": [],
@ -270,14 +417,6 @@
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 3,
"origin_id": 2,
"origin_slot": 2,
"target_id": 3,
"target_slot": 1,
"type": "INT"
},
{
"id": 4,
"origin_id": -10,
@ -293,6 +432,38 @@
"target_id": -20,
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 283,
"origin_id": -10,
"origin_slot": 1,
"target_id": 100,
"target_slot": 0,
"type": "INT"
},
{
"id": 284,
"origin_id": 100,
"origin_slot": 0,
"target_id": 99,
"target_slot": 0,
"type": "INT"
},
{
"id": 285,
"origin_id": 2,
"origin_slot": 2,
"target_id": 99,
"target_slot": 1,
"type": "INT"
},
{
"id": 286,
"origin_id": 99,
"origin_slot": 1,
"target_id": 3,
"target_slot": 1,
"type": "INT"
}
],
"extra": {},
@ -300,7 +471,6 @@
}
]
},
"config": {},
"extra": {
"ds": {
"scale": 1.197015527856339,
@ -310,6 +480,5 @@
]
},
"frontendVersion": "1.42.8"
},
"version": 0.4
}
}