For all its visual complexity, a ComfyUI workflow is basically a straight path. Material goes in, comes out processed. That is all.
Sometimes, though, you want to take what you just processed and process it again.
You could chain the same workflow over and over, but that is not very elegant.
That is where loops come in.
Loop Basics
Start Loop and End Loop
A loop is made from a Start Loop and End Loop pair. Whatever sits between the two is what gets repeated.

{
"id": "0557844e-a57c-4909-8ae6-be59d0c08b21",
"revision": 0,
"last_node_id": 5,
"last_link_id": 7,
"nodes": [
{
"id": 5,
"type": "PreviewAny",
"pos": [
2281.597385618925,
173.3807916722894
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 3
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 3,
"type": "ComfyMathExpression",
"pos": [
1608.5677759960538,
172.35753805326607
],
"size": [
282.05080469693735,
128
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 7
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
2
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression"
},
"widgets_values": [
"a * 10"
],
"widgets_values_named": {
"expression": "a * 10"
}
},
{
"id": 1,
"type": "StartLoop",
"pos": [
1183.8174389630092,
172.35753805326607
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
7
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "EndLoop",
"pos": [
1966.1911833510358,
172.35753805326607
],
"size": [
270,
98
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 2
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
3
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
false
],
"widgets_values_named": {
"accumulate": false
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
2,
3,
1,
2,
0,
"INT"
],
[
3,
2,
0,
5,
0,
"INT"
],
[
7,
1,
0,
3,
0,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.0255405527299366,
"offset": [
-871.9265336221051,
192.31984202944204
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
num_iterations: how many times to repeat. One pass through the loop is called an iterationiteration_index: which iteration you are currently on
In this workflow iteration_index starts at 0, so it runs 0 * 10 → 1 * 10 … and only the final 3 * 10 comes out.
Collecting every result with accumulate

{
"id": "0557844e-a57c-4909-8ae6-be59d0c08b21",
"revision": 0,
"last_node_id": 5,
"last_link_id": 7,
"nodes": [
{
"id": 5,
"type": "PreviewAny",
"pos": [
2281.597385618925,
173.3807916722894
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 3
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 3,
"type": "ComfyMathExpression",
"pos": [
1608.5677759960538,
172.35753805326607
],
"size": [
282.05080469693735,
128
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 7
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
2
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression"
},
"widgets_values": [
"a * 10"
],
"widgets_values_named": {
"expression": "a * 10"
}
},
{
"id": 1,
"type": "StartLoop",
"pos": [
1183.8174389630092,
172.35753805326607
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
7
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 2,
"type": "EndLoop",
"pos": [
1966.1911833510358,
172.35753805326607
],
"size": [
270,
98
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 2
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
3
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
2,
3,
1,
2,
0,
"INT"
],
[
3,
2,
0,
5,
0,
"INT"
],
[
7,
1,
0,
3,
0,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 1.0255405527299366,
"offset": [
-871.9265336221051,
192.31984202944204
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
Normally, all that leaves End Loop is the output_value of the last iteration.
Turn on accumulate and nothing gets thrown away: every iteration comes out together as a List.
Simple / For / List
Switching mode changes how the repetition works.
Simple: repeat a given number of timesFor: repeat from a start value to an end value by a step.iteration_indexcarries that value directlySimpleis really just aForstarting at 0 with a step of 1
List: repeat once per element in a List
That is hard to picture in words, so let's send iteration_index straight to the output.

{
"id": "45f38dfc-86cb-451b-918f-e67754a76544",
"revision": 0,
"last_node_id": 24,
"last_link_id": 26,
"nodes": [
{
"id": 2,
"type": "EndLoop",
"pos": [
1954.3183355571764,
175.34645957971986
],
"size": [
270,
98
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 8
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
3
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 5,
"type": "PreviewAny",
"pos": [
2280.6222900975063,
175.34645957971986
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 3
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 1,
"type": "StartLoop",
"pos": [
1548.8366466418468,
175.34645957971986
],
"size": [
349.177734375,
284
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
8
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"For",
2,
14,
3,
false
],
"widgets_values_named": {
"mode": "For",
"mode.start_iteration_index": 2,
"mode.max_iteration": 14,
"mode.step": 3,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 7,
"type": "EndLoop",
"pos": [
1948.0141306980554,
-182.75449342723488
],
"size": [
270,
98
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 9
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
10
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 8,
"type": "PreviewAny",
"pos": [
2274.318085238381,
-182.75449342723488
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 10
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 6,
"type": "StartLoop",
"pos": [
1542.5324417827294,
-182.75449342723488
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
9
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 13,
"type": "PreviewAny",
"pos": [
2283.371536897095,
577.462578719051
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 12
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 12,
"type": "EndLoop",
"pos": [
1957.0675823567644,
577.462578719051
],
"size": [
270,
98
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 25
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
12
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 22,
"type": "PreviewAny",
"pos": [
2286.2936515678916,
947.0520897443173
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 22
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 11,
"type": "StartLoop",
"pos": [
1551.585893441436,
577.462578719051
],
"size": [
349.177734375,
212
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "mode.list",
"type": "*",
"link": 16
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
25
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": []
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"List",
false
],
"widgets_values_named": {
"mode": "List",
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 24,
"type": "EndLoop",
"pos": [
1959.9896970275581,
947.0520897443173
],
"size": [
270,
98
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 23
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "*",
"links": [
22
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 23,
"type": "StartLoop",
"pos": [
1554.5080081122294,
947.0520897443173
],
"size": [
349.177734375,
212
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "mode.list",
"type": "*",
"link": 26
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": []
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": [
23
]
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"List",
false
],
"widgets_values_named": {
"mode": "List",
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 15,
"type": "PrimitiveInt",
"pos": [
996.8991736386159,
700.9071954046624
],
"size": [
270,
82
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
13
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
11,
"fixed"
],
"widgets_values_named": {
"value": 11,
"fixed": "fixed"
}
},
{
"id": 16,
"type": "PrimitiveInt",
"pos": [
996.8991736386159,
833.2832424671823
],
"size": [
270,
82
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
14
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
3,
"fixed"
],
"widgets_values_named": {
"value": 3,
"fixed": "fixed"
}
},
{
"id": 17,
"type": "PrimitiveInt",
"pos": [
996.8991736386159,
968.967784272564
],
"size": [
270,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
15
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
8,
"fixed"
],
"widgets_values_named": {
"value": 8,
"fixed": "fixed"
}
},
{
"id": 18,
"type": "CreateList",
"pos": [
1322.5952201260855,
811.4205624969127
],
"size": [
140,
86
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 13
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 14
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": 15
},
{
"name": "inputs.input3",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
16,
26
]
}
],
"properties": {
"Node name for S&R": "CreateList"
}
}
],
"links": [
[
3,
2,
0,
5,
0,
"INT"
],
[
8,
1,
0,
2,
0,
"INT"
],
[
9,
6,
0,
7,
0,
"INT"
],
[
10,
7,
0,
8,
0,
"INT"
],
[
12,
12,
0,
13,
0,
"INT"
],
[
13,
15,
0,
18,
0,
"INT"
],
[
14,
16,
0,
18,
1,
"INT"
],
[
15,
17,
0,
18,
2,
"INT"
],
[
16,
18,
0,
11,
2,
"*"
],
[
22,
24,
0,
22,
0,
"*"
],
[
23,
23,
3,
24,
0,
"*"
],
[
25,
11,
0,
12,
0,
"INT"
],
[
26,
18,
0,
23,
2,
"*"
]
],
"groups": [
{
"id": 1,
"title": "Simple",
"bounding": [
1532.5324417827294,
-252.75449342723408,
1015.8430050893305,
320.1960827491317
],
"color": "#8A8",
"flags": {}
},
{
"id": 2,
"title": "For",
"bounding": [
1538.8366466418468,
105.34645957971966,
1015.8430050893382,
364
],
"color": "#A88",
"flags": {}
},
{
"id": 3,
"title": "List (index)",
"bounding": [
1541.585893441436,
507.46257871905095,
1015.843005089338,
320.1960827491316
],
"color": "#3f789e",
"flags": {}
},
{
"id": 4,
"title": "List (item)",
"bounding": [
1544.5080081122294,
877.0520897443173,
1015.843005089341,
320.1960827491316
],
"color": "#8AA",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.5788909062289922,
"offset": [
-435.91270823624086,
523.379343654853
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
Simple(4 times): 0, 1, 2, 3For(start 2 / end 14 / step 3): 2, 5, 8, 11List(3 elements): 0, 1, 2
List needs a little care. iteration_index only ever tells you which pass you are on, so no matter what you put in the List it stays 0, 1, 2 …
To use what you actually put in, take it from list_item. In this example that gives 11, 3, 8.
Repeating image generation 4 times
Staring at numbers gets dull, so let's bring image generation into it.
We feed iteration_index straight in as the seed.

{
"id": "d8034549-7e0a-40f1-8c2e-de3ffc6f1cae",
"revision": 0,
"last_node_id": 66,
"last_link_id": 119,
"nodes": [
{
"id": 37,
"type": "UNETLoader",
"pos": [
528.8914031982422,
34.805270385742176
],
"size": [
305.3782043457031,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
105
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"krea2_turbo_fp8_scaled.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "krea2_turbo_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 3,
"type": "KSampler",
"pos": [
898.7548217773438,
188.1918182373047
],
"size": [
315,
262
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 105
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 46
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 118
},
{
"name": "latent_image",
"type": "LATENT",
"link": 112
},
{
"name": "seed",
"type": "INT",
"widget": {
"name": "seed"
},
"link": 116
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
12345,
"fixed",
8,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 12345,
"control_after_generate": "fixed",
"steps": 8,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 60,
"type": "ResolutionSelector",
"pos": [
290.29125126341165,
545.7143721980366
],
"size": [
270,
150
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
110
]
},
{
"name": "height",
"type": "INT",
"links": [
111
]
}
],
"properties": {
"Node name for S&R": "ResolutionSelector",
"cnr_id": "comfy-core",
"ver": "0.25.0"
},
"widgets_values": [
"3:2 (Photo)",
1,
16
],
"widgets_values_named": {
"aspect_ratio": "3:2 (Photo)",
"megapixels": 1,
"multiple": 16
}
},
{
"id": 55,
"type": "MarkdownNote",
"pos": [
-41.611756071819514,
-85.90566140100125
],
"size": [
389.61380077225,
288.1499138219051
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
],
"widgets_values_named": {
"text": "## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 39,
"type": "VAELoader",
"pos": [
951.5002075195309,
58.805270385742176
],
"size": [
262.2546142578128,
58
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
76
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen_image_vae.safetensors"
],
"widgets_values_named": {
"vae_name": "qwen_image_vae.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1252.432861328125,
188.1918182373047
],
"size": [
157.56002807617188,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
115
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
}
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415.7513025457208,
186
],
"size": [
418.5183049982245,
177.7917699892659
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
46,
117
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
],
"widgets_values_named": {
"text": "A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
}
},
{
"id": 65,
"type": "ConditioningZeroOut",
"pos": [
607.1448419189453,
421.7568251762049
],
"size": [
227.124765625,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 117
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
118
]
}
],
"properties": {
"Node name for S&R": "ConditioningZeroOut"
}
},
{
"id": 62,
"type": "EmptyLatentImage",
"pos": [
597.2696075439453,
520.5274060641684
],
"size": [
237,
106
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 110
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 111
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
112
]
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage",
"cnr_id": "comfy-core",
"ver": "0.26.0"
},
"widgets_values": [
512,
512,
1
],
"widgets_values_named": {
"width": 512,
"height": 512,
"batch_size": 1
}
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
46.649627708242974,
269.8446899414058
],
"size": [
301.3524169921875,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen3vl_4b_fp8_scaled.safetensors",
"krea2",
"default"
],
"widgets_values_named": {
"clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
"type": "krea2",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 64,
"type": "EndLoop",
"pos": [
1455.865648099172,
282.2101999999997
],
"size": [
270,
98
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 115
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "IMAGE",
"links": [
119
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 63,
"type": "StartLoop",
"pos": [
-435.16847000000007,
282.2101999999997
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
116
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
true
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 66,
"type": "SaveImage",
"pos": [
1765.865648099172,
282.2101999999997
],
"size": [
809.0480787999995,
603.6031710000001
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 119
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
46,
6,
0,
3,
1,
"CONDITIONING"
],
[
74,
38,
0,
6,
0,
"CLIP"
],
[
76,
39,
0,
8,
1,
"VAE"
],
[
105,
37,
0,
3,
0,
"MODEL"
],
[
110,
60,
0,
62,
0,
"INT"
],
[
111,
60,
1,
62,
1,
"INT"
],
[
112,
62,
0,
3,
3,
"LATENT"
],
[
115,
8,
0,
64,
0,
"IMAGE"
],
[
116,
63,
0,
3,
4,
"INT"
],
[
117,
6,
0,
65,
0,
"CONDITIONING"
],
[
118,
65,
0,
3,
2,
"CONDITIONING"
],
[
119,
64,
0,
66,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Krea2",
"bounding": [
-51.61175607181954,
-155.90566140100125,
1471.6046454761165,
861.6200335990378
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.6830134553650705,
"offset": [
472.4055852508561,
384.1661061782143
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
With Simple = 4, you get four images, seed 0 through seed 3.
That alone is not much of a reason to use a loop, though. List processing or repeating the Queue would do the same thing.
The real strength of a loop is that the previous result can be fed back into the next iteration.
Passing a result into the next loop
current_iteration_value and next_iteration_value
Connect something you made inside the loop to next_iteration_value and that value goes back to Start Loop. The next iteration picks it up from current_iteration_value.
One thing to watch out for: on the very first iteration there is no previous result to hand back.
That is what initial_iteration_value is for. As the name says, it sets the value used on the first pass.

{
"id": "0557844e-a57c-4909-8ae6-be59d0c08b21",
"revision": 0,
"last_node_id": 6,
"last_link_id": 10,
"nodes": [
{
"id": 5,
"type": "PreviewAny",
"pos": [
2281.597385618925,
173.3807916722894
],
"size": [
264.05736163367874,
240.19608274913168
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 3
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 3,
"type": "ComfyMathExpression",
"pos": [
1608.5677759960538,
172.35753805326607
],
"size": [
282.05080469693735,
128
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 9
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
2,
8
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression"
},
"widgets_values": [
"a * 10"
],
"widgets_values_named": {
"expression": "a * 10"
}
},
{
"id": 2,
"type": "EndLoop",
"pos": [
1966.1911833510358,
172.35753805326607
],
"size": [
270,
98
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 2
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": 8
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
3
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 1,
"type": "StartLoop",
"pos": [
1183.8174389630092,
172.35753805326607
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": 10
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": []
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "INT",
"links": [
9
]
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 6,
"type": "PrimitiveInt",
"pos": [
873.6919222926444,
192.1937615834975
],
"size": [
270,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
10
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
5,
"fixed"
],
"widgets_values_named": {
"value": 5,
"fixed": "fixed"
}
}
],
"links": [
[
2,
3,
1,
2,
0,
"INT"
],
[
3,
2,
0,
5,
0,
"INT"
],
[
8,
3,
1,
2,
1,
"INT"
],
[
9,
1,
4,
3,
0,
"FLOAT,INT,BOOLEAN"
],
[
10,
6,
0,
1,
1,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.9323095933908516,
"offset": [
-661.6990234658466,
162.11617400407908
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
The starting value 5 is multiplied by 10 and passed to next_iteration_value, then multiplied by 10 again on the next iteration, and so on.
next_iteration_valueonly hands the value forward. To get a result out of the loop, remember to connectoutput_valueas well.
Carrying several values at once
As you build things out, you will want to send two or three values into the next iteration. That works fine too.
Bundle them with Create List to send, and pull them apart again with Get Item From List on the receiving side.

{
"id": "95e8cf30-a490-466b-8572-4a3a7a3bd635",
"revision": 0,
"last_node_id": 17,
"last_link_id": 35,
"nodes": [
{
"id": 9,
"type": "CreateList",
"pos": [
1003.3861543665919,
191.9158645738339
],
"size": [
140,
66
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 26
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 27
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
12
]
}
],
"properties": {
"Node name for S&R": "CreateList"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 6,
"type": "PrimitiveInt",
"pos": [
685.2077581174274,
319.11804150136385
],
"size": [
270,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
27
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
1,
"fixed"
],
"widgets_values_named": {
"value": 1,
"fixed": "fixed"
}
},
{
"id": 1,
"type": "StartLoop",
"pos": [
1191.5645506157564,
172.35753805326607
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": 12
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": []
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": [
13,
14
]
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
6,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 6,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 3,
"type": "ComfyMathExpression",
"pos": [
1846.4118859608175,
172.35753805326607
],
"size": [
210,
128
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 31
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": 32
},
{
"name": "values.c",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
19,
34
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression"
},
"widgets_values": [
"a + b"
],
"widgets_values_named": {
"expression": "a + b"
}
},
{
"id": 10,
"type": "GetItemFromList",
"pos": [
1588.577085475787,
172.35753805326607
],
"size": [
210,
58
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "list",
"type": "*",
"link": 13
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": [
31
]
}
],
"properties": {
"Node name for S&R": "GetItemFromList"
},
"widgets_values": [
0
],
"widgets_values_named": {
"index": 0
}
},
{
"id": 17,
"type": "PreviewAny",
"pos": [
2609.9162874159088,
192.00443075337773
],
"size": [
276.5015145607408,
301.12504728457543
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 35
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 16,
"type": "PrimitiveInt",
"pos": [
685.2077581174274,
172.35753805326607
],
"size": [
270,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "INT",
"type": "INT",
"links": [
26
]
}
],
"properties": {
"Node name for S&R": "PrimitiveInt"
},
"widgets_values": [
0,
"fixed"
],
"widgets_values_named": {
"value": 0,
"fixed": "fixed"
}
},
{
"id": 11,
"type": "GetItemFromList",
"pos": [
1588.577085475787,
321.17982104123513
],
"size": [
210,
58
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "list",
"type": "*",
"link": 14
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": [
32,
33
]
}
],
"properties": {
"Node name for S&R": "GetItemFromList"
},
"widgets_values": [
1
],
"widgets_values_named": {
"index": 1
}
},
{
"id": 13,
"type": "CreateList",
"pos": [
2104.246686445848,
321.17982104123513
],
"size": [
140,
86
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 33
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 19
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
20
]
}
],
"properties": {
"Node name for S&R": "CreateList"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 2,
"type": "EndLoop",
"pos": [
2292.0814869308783,
192.00443075337773
],
"size": [
270,
98
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 34
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": 20
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "INT",
"links": [
35
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
12,
9,
0,
1,
1,
"*"
],
[
13,
1,
4,
10,
0,
"*"
],
[
14,
1,
4,
11,
0,
"*"
],
[
19,
3,
1,
13,
1,
"INT"
],
[
20,
13,
0,
2,
1,
"*"
],
[
26,
16,
0,
9,
0,
"INT"
],
[
27,
6,
0,
9,
1,
"INT"
],
[
31,
10,
0,
3,
0,
"FLOAT,INT,BOOLEAN"
],
[
32,
11,
0,
3,
1,
"FLOAT,INT,BOOLEAN"
],
[
33,
11,
0,
13,
0,
"*"
],
[
34,
3,
1,
2,
0,
"INT"
],
[
35,
2,
0,
17,
0,
"INT"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.8475541758098672,
"offset": [
-372.54269595249144,
263.01473635900516
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
Let's build a Fibonacci sequence: add the previous two numbers to get the next one.
Start from [0, 1], compute a + b, and pass [b, a + b] to the next iteration.
[0, 1] → [1, 1] → [1, 2] → [2, 3] → [3, 5] → …
Here we are bundling two
INTvalues, but mixed types are fine too —IMAGEandBOOLEAN, for instance.
Running Preview inside a loop
Preview nodes only look at things, as the name suggests, so you will want to wire them up like this… but it gives an error.

{
"id": "d8034549-7e0a-40f1-8c2e-de3ffc6f1cae",
"revision": 0,
"last_node_id": 68,
"last_link_id": 121,
"nodes": [
{
"id": 37,
"type": "UNETLoader",
"pos": [
528.8914031982422,
34.805270385742176
],
"size": [
305.3782043457031,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
105
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"krea2_turbo_fp8_scaled.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "krea2_turbo_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 3,
"type": "KSampler",
"pos": [
898.7548217773438,
188.1918182373047
],
"size": [
315,
262
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 105
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 46
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 118
},
{
"name": "latent_image",
"type": "LATENT",
"link": 112
},
{
"name": "seed",
"type": "INT",
"widget": {
"name": "seed"
},
"link": 116
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
12345,
"fixed",
8,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 12345,
"control_after_generate": "fixed",
"steps": 8,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 60,
"type": "ResolutionSelector",
"pos": [
290.29125126341165,
545.7143721980366
],
"size": [
270,
150
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
110
]
},
{
"name": "height",
"type": "INT",
"links": [
111
]
}
],
"properties": {
"Node name for S&R": "ResolutionSelector",
"cnr_id": "comfy-core",
"ver": "0.25.0"
},
"widgets_values": [
"3:2 (Photo)",
1,
16
],
"widgets_values_named": {
"aspect_ratio": "3:2 (Photo)",
"megapixels": 1,
"multiple": 16
}
},
{
"id": 55,
"type": "MarkdownNote",
"pos": [
-41.611756071819514,
-85.90566140100125
],
"size": [
389.61380077225,
288.1499138219051
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
],
"widgets_values_named": {
"text": "## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 39,
"type": "VAELoader",
"pos": [
951.5002075195309,
58.805270385742176
],
"size": [
262.2546142578128,
58
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
76
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen_image_vae.safetensors"
],
"widgets_values_named": {
"vae_name": "qwen_image_vae.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415.7513025457208,
186
],
"size": [
418.5183049982245,
177.7917699892659
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
46,
117
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
],
"widgets_values_named": {
"text": "A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
}
},
{
"id": 65,
"type": "ConditioningZeroOut",
"pos": [
607.1448419189453,
421.7568251762049
],
"size": [
227.124765625,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 117
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
118
]
}
],
"properties": {
"Node name for S&R": "ConditioningZeroOut"
}
},
{
"id": 62,
"type": "EmptyLatentImage",
"pos": [
597.2696075439453,
520.5274060641684
],
"size": [
237,
106
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 110
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 111
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
112
]
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage",
"cnr_id": "comfy-core",
"ver": "0.26.0"
},
"widgets_values": [
512,
512,
1
],
"widgets_values_named": {
"width": 512,
"height": 512,
"batch_size": 1
}
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
46.649627708242974,
269.8446899414058
],
"size": [
301.3524169921875,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen3vl_4b_fp8_scaled.safetensors",
"krea2",
"default"
],
"widgets_values_named": {
"clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
"type": "krea2",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1252.432861328125,
188.1918182373047
],
"size": [
157.56002807617188,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
115,
120
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
}
},
{
"id": 67,
"type": "PreviewImage",
"pos": [
1470,
-60
],
"size": [
260,
30
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 120
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {
"Node name for S&R": "PreviewImage"
}
},
{
"id": 64,
"type": "EndLoop",
"pos": [
1914.8609980991714,
276.1601999999998
],
"size": [
270,
98
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 115
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "IMAGE",
"links": [
121
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 68,
"type": "SaveImage",
"pos": [
2224.86099809917,
276.1601999999998
],
"size": [
725.2532434999994,
541.2442238
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 121
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
},
{
"id": 63,
"type": "StartLoop",
"pos": [
-431.53847000000013,
276.1601999999998
],
"size": [
349.177734375,
186
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
116
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
46,
6,
0,
3,
1,
"CONDITIONING"
],
[
74,
38,
0,
6,
0,
"CLIP"
],
[
76,
39,
0,
8,
1,
"VAE"
],
[
105,
37,
0,
3,
0,
"MODEL"
],
[
110,
60,
0,
62,
0,
"INT"
],
[
111,
60,
1,
62,
1,
"INT"
],
[
112,
62,
0,
3,
3,
"LATENT"
],
[
115,
8,
0,
64,
0,
"IMAGE"
],
[
116,
63,
0,
3,
4,
"INT"
],
[
117,
6,
0,
65,
0,
"CONDITIONING"
],
[
118,
65,
0,
3,
2,
"CONDITIONING"
],
[
120,
8,
0,
67,
0,
"IMAGE"
],
[
121,
64,
0,
68,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Krea2",
"bounding": [
-51.61175607181954,
-155.90566140100125,
1471.6046454761165,
861.6200335990378
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.6209213230591557,
"offset": [
734.4472638319522,
507.707109666314
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
Skipping the fine detail: every node inside a loop has to end up at End Loop. Leave Preview Image dangling and the loop never closes.
Still, sometimes you just want a look at something without outputting it. That is what termination on End Loop is for.

{
"id": "d8034549-7e0a-40f1-8c2e-de3ffc6f1cae",
"revision": 0,
"last_node_id": 68,
"last_link_id": 122,
"nodes": [
{
"id": 37,
"type": "UNETLoader",
"pos": [
528.8914031982422,
34.805270385742176
],
"size": [
305.3782043457031,
82
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
105
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"krea2_turbo_fp8_scaled.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "krea2_turbo_fp8_scaled.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 3,
"type": "KSampler",
"pos": [
898.7548217773438,
188.1918182373047
],
"size": [
315,
262
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 105
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 46
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 118
},
{
"name": "latent_image",
"type": "LATENT",
"link": 112
},
{
"name": "seed",
"type": "INT",
"widget": {
"name": "seed"
},
"link": 116
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
12345,
"fixed",
8,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 12345,
"control_after_generate": "fixed",
"steps": 8,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 60,
"type": "ResolutionSelector",
"pos": [
290.29125126341165,
545.7143721980366
],
"size": [
270,
150
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
110
]
},
{
"name": "height",
"type": "INT",
"links": [
111
]
}
],
"properties": {
"Node name for S&R": "ResolutionSelector",
"cnr_id": "comfy-core",
"ver": "0.25.0"
},
"widgets_values": [
"3:2 (Photo)",
1,
16
],
"widgets_values_named": {
"aspect_ratio": "3:2 (Photo)",
"megapixels": 1,
"multiple": 16
}
},
{
"id": 55,
"type": "MarkdownNote",
"pos": [
-41.611756071819514,
-85.90566140100125
],
"size": [
389.61380077225,
288.1499138219051
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
],
"widgets_values_named": {
"text": "## models\n\n- diffusion_models\n - [krea2_turbo_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors) (13.1 GB)\n- text_encoders\n - [qwen3vl_4b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors) (5.24 GB)\n- vae\n - [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Krea-2/blob/main/vae/qwen_image_vae.safetensors) (254 MB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── krea2_turbo_fp8_scaled.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_4b_fp8_scaled.safetensors\n └── 📂vae/\n └── qwen_image_vae.safetensors\n```"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 39,
"type": "VAELoader",
"pos": [
951.5002075195309,
58.805270385742176
],
"size": [
262.2546142578128,
58
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
76
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen_image_vae.safetensors"
],
"widgets_values_named": {
"vae_name": "qwen_image_vae.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
415.7513025457208,
186
],
"size": [
418.5183049982245,
177.7917699892659
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 74
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
46,
117
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
],
"widgets_values_named": {
"text": "A highly stylized anime illustration, viewed from a high-angle three-quarter perspective, showing an old compact car dramatically stranded in shallow coastal water among large rocks, as if it ran aground and got stuck there. The car is tilted unevenly and wedged against multiple rocks, creating a more dynamic and three-dimensional stranded composition. The surrounding environment is a natural rocky shoreline with bright blue seawater, scattered stones under the water, and no alley, no wall, no air-conditioning units, no urban background, no tree, no graffiti, and no city clutter.\n\nA desperate young woman sits on the roof of the car near a large hand-painted \"SOS\" sign. She has messy blonde hair and a visibly exhausted, worn-down expression. She is urgently drinking from a nearly empty plastic water bottle, as if she is rationing the last of it. Her posture should feel tense, drained, and survival-oriented, not relaxed or casual. She wears a pale light blue jumpsuit that is heavily worn, torn, dirty, and damaged, with frayed fabric and signs of hardship. Her body language and face should suggest thirst, fatigue, and isolation.\n\nThe car is old, weathered, faded, rusted, and damaged, with cracked windows and a harsh sun-bleached surface. Strong cloud shadows pass dramatically over the woman, the car, the rocks, and the water, creating bold shifting patches of light and shadow. Flat cel-shaded anime style, graphic poster-like composition, bold simplified shapes, clean linework, slightly exaggerated perspective, painterly digital texture, quiet but intense survival mood, vivid cyan-blue water, pale rocks, faded vehicle colors, strong atmospheric lighting, no photorealism, no 3D render."
}
},
{
"id": 65,
"type": "ConditioningZeroOut",
"pos": [
607.1448419189453,
421.7568251762049
],
"size": [
227.124765625,
26
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 117
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
118
]
}
],
"properties": {
"Node name for S&R": "ConditioningZeroOut"
}
},
{
"id": 62,
"type": "EmptyLatentImage",
"pos": [
597.2696075439453,
520.5274060641684
],
"size": [
237,
106
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 110
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 111
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
112
]
}
],
"properties": {
"Node name for S&R": "EmptyLatentImage",
"cnr_id": "comfy-core",
"ver": "0.26.0"
},
"widgets_values": [
512,
512,
1
],
"widgets_values_named": {
"width": 512,
"height": 512,
"batch_size": 1
}
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
46.649627708242974,
269.8446899414058
],
"size": [
301.3524169921875,
106
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
74
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen3vl_4b_fp8_scaled.safetensors",
"krea2",
"default"
],
"widgets_values_named": {
"clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
"type": "krea2",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1252.432861328125,
188.1918182373047
],
"size": [
157.56002807617188,
46
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
115,
120
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
}
},
{
"id": 64,
"type": "EndLoop",
"pos": [
1914.8609980991714,
276.1601999999998
],
"size": [
270,
118
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 115
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": null
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": 122
},
{
"name": "terminations.termination1",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "IMAGE",
"links": [
121
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 68,
"type": "SaveImage",
"pos": [
2224.86099809917,
276.1601999999998
],
"size": [
725.2532434999994,
541.2442238
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 121
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
},
{
"id": 63,
"type": "StartLoop",
"pos": [
-431.53847000000013,
276.1601999999998
],
"size": [
349.177734375,
236
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
116
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": []
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": []
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": null
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 67,
"type": "PreviewImage",
"pos": [
1470,
-60
],
"size": [
375.95672000000013,
278.2102
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 120
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": [
122
]
}
],
"properties": {
"Node name for S&R": "PreviewImage"
},
"widgets_values": [],
"widgets_values_named": {}
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
46,
6,
0,
3,
1,
"CONDITIONING"
],
[
74,
38,
0,
6,
0,
"CLIP"
],
[
76,
39,
0,
8,
1,
"VAE"
],
[
105,
37,
0,
3,
0,
"MODEL"
],
[
110,
60,
0,
62,
0,
"INT"
],
[
111,
60,
1,
62,
1,
"INT"
],
[
112,
62,
0,
3,
3,
"LATENT"
],
[
115,
8,
0,
64,
0,
"IMAGE"
],
[
116,
63,
0,
3,
4,
"INT"
],
[
117,
6,
0,
65,
0,
"CONDITIONING"
],
[
118,
65,
0,
3,
2,
"CONDITIONING"
],
[
120,
8,
0,
67,
0,
"IMAGE"
],
[
121,
64,
0,
68,
0,
"IMAGE"
],
[
122,
67,
0,
64,
2,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Krea2",
"bounding": [
-51.61175607181954,
-155.90566140100125,
1471.6046454761165,
861.6200335990378
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.620921323059155,
"offset": [
546.1468620137734,
482.7971760299512
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
Think of it as a bin that exists to keep the loop valid, and you will not go wrong.
Some more involved examples
Let's put together a few more practical workflows. They may give you ideas of your own.
Flexible loops with Generate Text
Loops tend to suggest doing the same thing over and over, but there is a way to add some creativity: an MLLM.
Let's combine an MLLM with image editing and have the AI come up with the next edit each time.

{
"id": "e47d064a-cb92-4da7-b92b-be9f1ddd26f5",
"revision": 0,
"last_node_id": 89,
"last_link_id": 154,
"nodes": [
{
"id": 43,
"type": "VAELoader",
"pos": [
452.07763840703484,
615.1197593465155
],
"size": [
269.8313103058076,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"links": [
62,
76
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
"flux2-vae.safetensors"
],
"widgets_values_named": {
"vae_name": "flux2-vae.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 52,
"type": "VAEEncode",
"pos": [
756.8110965233991,
443.07358059192296
],
"size": [
162,
46
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "pixels",
"type": "IMAGE",
"link": 154
},
{
"name": "vae",
"type": "VAE",
"link": 76
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"links": [
74,
75
]
}
],
"properties": {
"Node name for S&R": "VAEEncode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
}
},
{
"id": 31,
"type": "KSampler",
"pos": [
1197.5720557738762,
118.734094680445
],
"size": [
315,
262
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 69
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 71
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 111
},
{
"name": "latent_image",
"type": "LATENT",
"link": 74
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
52
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
1234,
"fixed",
4,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 1234,
"control_after_generate": "fixed",
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 48,
"type": "UNETLoader",
"pos": [
852.0996802233482,
-22.171563096387136
],
"size": [
308.1592787377913,
82
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"links": [
69
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"flux-2-klein-9b-fp8.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "flux-2-klein-9b-fp8.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 63,
"type": "CreateList",
"pos": [
-1311.357308480041,
1129.1278009550547
],
"size": [
140,
86
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 152
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 95
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
91
]
}
],
"properties": {
"Node name for S&R": "CreateList"
}
},
{
"id": 44,
"type": "CLIPLoader",
"pos": [
159.34485689937597,
251.00045609916944
],
"size": [
283.80000000000007,
106
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [
63
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.73"
},
"widgets_values": [
"qwen_3_8b.safetensors",
"flux2",
"default"
],
"widgets_values_named": {
"clip_name": "qwen_3_8b.safetensors",
"type": "flux2",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 49,
"type": "ReferenceLatent",
"pos": [
953.7025011708073,
118.734094680445
],
"size": [
212.50023621850983,
46
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 70
},
{
"name": "latent",
"shape": 7,
"type": "LATENT",
"link": 75
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
71,
110
]
}
],
"properties": {
"Node name for S&R": "ReferenceLatent",
"cnr_id": "comfy-core",
"ver": "0.9.2"
}
},
{
"id": 70,
"type": "ConditioningZeroOut",
"pos": [
953.7025011708073,
222.6294165744345
],
"size": [
212.50023621850983,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 110
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
111
]
}
],
"properties": {
"Node name for S&R": "ConditioningZeroOut"
}
},
{
"id": 6,
"type": "CLIPTextEncode",
"pos": [
493.54606478511903,
118.734094680445
],
"size": [
425.2650317382812,
167.9430462646484
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 63
},
{
"name": "text",
"type": "STRING",
"widget": {
"name": "text"
},
"link": 98
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"slot_index": 0,
"links": [
70
]
}
],
"title": "CLIP Text Encode (Positive Prompt)",
"properties": {
"Node name for S&R": "CLIPTextEncode",
"cnr_id": "comfy-core",
"ver": "0.3.39"
},
"widgets_values": [
""
],
"widgets_values_named": {
"text": ""
}
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1549.8851525866164,
118.734094680445
],
"size": [
161.111083984375,
46
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 52
},
{
"name": "vae",
"type": "VAE",
"link": 62
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
99,
132
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.39"
}
},
{
"id": 85,
"type": "GetItemFromList",
"pos": [
-695.9561743900334,
1497.4032113309413
],
"size": [
287.4699999999999,
58
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "list",
"type": "*",
"link": 139
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": [
142,
143
]
}
],
"properties": {
"Node name for S&R": "GetItemFromList"
},
"widgets_values": [
1
],
"widgets_values_named": {
"index": 1
}
},
{
"id": 80,
"type": "PrimitiveStringMultiline",
"pos": [
-694.2830802713316,
1203.1967616647999
],
"size": [
287.4699999999999,
222.99
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
126
]
}
],
"properties": {
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"Look at the current image and the instruction history.\n\nGoal:\nGradually transform the person's styling toward this target:\n<TARGET_STYLE_OR_THEME>\n\nTask:\nWrite exactly one short English instruction for an image-editing model.\n\nRules:\n- Use the current image as the source of truth.\n- Use the instruction history to understand what has already been changed.\n- Choose one clearly visible styling element that has not been changed much yet.\n- Prefer elements such as clothing, shoes, outerwear, bag, accessories, hairstyle, or color accents.\n- Change only one styling element at a time.\n- Continue the transformation naturally toward the target style.\n- Do not repeat or undo an earlier change.\n- Preserve the same person, pose, background, lighting, and framing.\n- Write a direct image-edit instruction, not a description or explanation.\n- Output exactly one concise imperative sentence and nothing else."
],
"widgets_values_named": {
"value": "Look at the current image and the instruction history.\n\nGoal:\nGradually transform the person's styling toward this target:\n<TARGET_STYLE_OR_THEME>\n\nTask:\nWrite exactly one short English instruction for an image-editing model.\n\nRules:\n- Use the current image as the source of truth.\n- Use the instruction history to understand what has already been changed.\n- Choose one clearly visible styling element that has not been changed much yet.\n- Prefer elements such as clothing, shoes, outerwear, bag, accessories, hairstyle, or color accents.\n- Change only one styling element at a time.\n- Continue the transformation naturally toward the target style.\n- Do not repeat or undo an earlier change.\n- Preserve the same person, pose, background, lighting, and framing.\n- Write a direct image-edit instruction, not a description or explanation.\n- Output exactly one concise imperative sentence and nothing else."
}
},
{
"id": 88,
"type": "ResizeImageMaskNode",
"pos": [
-1932.1883983940702,
1034.4789483320637
],
"size": [
270,
106
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 151
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
150
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"scale total pixels",
1,
"bicubic"
],
"widgets_values_named": {
"resize_type": "scale total pixels",
"resize_type.megapixels": 1,
"scale_method": "bicubic"
}
},
{
"id": 50,
"type": "LoadImage",
"pos": [
-2377.889375954781,
1034.4789483320637
],
"size": [
418.1730226927061,
564.0421273733298
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
151
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"pasted/image (11).png",
"image"
],
"widgets_values_named": {
"image": "pasted/image (11).png",
"upload": "image"
}
},
{
"id": 65,
"type": "PrimitiveString",
"pos": [
-1634.6604435260658,
1222.1808198288088
],
"size": [
270,
58
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
95
]
}
],
"properties": {
"Node name for S&R": "PrimitiveString"
},
"widgets_values": [
"null"
],
"widgets_values_named": {
"value": "null"
}
},
{
"id": 89,
"type": "ResizeImageMaskNode",
"pos": [
-1634.6604435260658,
1034.4789483320637
],
"size": [
270,
106
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 150
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
152
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode",
"cnr_id": "comfy-core",
"ver": "0.9.2"
},
"widgets_values": [
"scale to multiple",
16,
"bicubic"
],
"widgets_values_named": {
"resize_type": "scale to multiple",
"resize_type.multiple": 16,
"scale_method": "bicubic"
}
},
{
"id": 61,
"type": "GetItemFromList",
"pos": [
-417.03167696308407,
948.7195794151218
],
"size": [
270,
58
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "list",
"type": "*",
"link": 89
}
],
"outputs": [
{
"name": "*",
"type": "*",
"links": [
118,
154
]
}
],
"properties": {
"Node name for S&R": "GetItemFromList"
},
"widgets_values": [
0
],
"widgets_values_named": {
"index": 0
}
},
{
"id": 79,
"type": "CLIPLoader",
"pos": [
-417.03167696308407,
785.3417946330502
],
"size": [
270,
106
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"links": [
125
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader"
},
"widgets_values": [
"qwen3.5_4b_bf16.safetensors",
"stable_diffusion",
"default"
],
"widgets_values_named": {
"clip_name": "qwen3.5_4b_bf16.safetensors",
"type": "stable_diffusion",
"device": "default"
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 59,
"type": "TextGenerate",
"pos": [
-100.17711346367786,
925.1780592201964
],
"size": [
378.8074837263441,
412
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 125
},
{
"name": "image",
"shape": 7,
"type": "IMAGE",
"link": 118
},
{
"name": "video",
"shape": 7,
"type": "IMAGE",
"link": null
},
{
"name": "audio",
"shape": 7,
"type": "AUDIO",
"link": null
},
{
"name": "prompt",
"type": "STRING",
"widget": {
"name": "prompt"
},
"link": 128
}
],
"outputs": [
{
"name": "generated_text",
"type": "STRING",
"links": [
98,
146
]
}
],
"properties": {
"Node name for S&R": "TextGenerate"
},
"widgets_values": [
"",
512,
"on",
0.7,
64,
0.95,
0.05,
1.05,
0,
0,
false,
true
],
"widgets_values_named": {
"prompt": "",
"max_length": 512,
"sampling_mode": "on",
"sampling_mode.temperature": 0.7,
"sampling_mode.top_k": 64,
"sampling_mode.top_p": 0.95,
"sampling_mode.min_p": 0.05,
"sampling_mode.repetition_penalty": 1.05,
"sampling_mode.seed": 0,
"sampling_mode.presence_penalty": 0,
"thinking": false,
"use_default_template": true
},
"color": "#233",
"bgcolor": "#355"
},
{
"id": 81,
"type": "StringFormat",
"pos": [
-367.46052730753144,
1203.1967616647999
],
"size": [
222.87842744363877,
194.7896684350021
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"name": "values.a",
"shape": 7,
"type": "*",
"link": 126
},
{
"name": "values.b",
"shape": 7,
"type": "*",
"link": 142
},
{
"name": "values.c",
"shape": 7,
"type": "*",
"link": 141
},
{
"name": "values.d",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
128
]
}
],
"properties": {
"Node name for S&R": "StringFormat"
},
"widgets_values": [
"{a}\n\nInstruction history:\n{b}\n\nCurrent turn:\n{c}"
],
"widgets_values_named": {
"f_string": "{a}\n\nInstruction history:\n{b}\n\nCurrent turn:\n{c}"
}
},
{
"id": 86,
"type": "PreviewAny",
"pos": [
583.9918259910476,
1155.0798174580514
],
"size": [
312.46713694180175,
224.6199777058432
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "source",
"type": "*",
"link": 144
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
145
]
}
],
"properties": {
"Node name for S&R": "PreviewAny"
},
"widgets_values": [],
"widgets_values_named": {}
},
{
"id": 82,
"type": "StringFormat",
"pos": [
337.3623197115557,
1085.6276378158161
],
"size": [
210,
168
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"name": "values.a",
"shape": 7,
"type": "*",
"link": 143
},
{
"name": "values.b",
"shape": 7,
"type": "*",
"link": 135
},
{
"name": "values.c",
"shape": 7,
"type": "*",
"link": 146
},
{
"name": "values.d",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
131,
144
]
}
],
"properties": {
"Node name for S&R": "StringFormat"
},
"widgets_values": [
"{a}\nTurn {b}: {c}"
],
"widgets_values_named": {
"f_string": "{a}\nTurn {b}: {c}"
}
},
{
"id": 57,
"type": "EndLoop",
"pos": [
2130.8997603185226,
1107.1619121388626
],
"size": [
270,
138
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 99
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": 137
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": 145
},
{
"name": "terminations.termination1",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "IMAGE",
"links": [
113
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 56,
"type": "StartLoop",
"pos": [
-1118.0541734340163,
1107.1619121388626
],
"size": [
349.177734375,
186
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": 91
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": [
135,
141
]
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": null
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": null
},
{
"name": "list_item",
"type": "*",
"links": null
},
{
"name": "current_iteration_value",
"type": "*",
"links": [
89,
139
]
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"simple",
4,
false
],
"widgets_values_named": {
"mode": "simple",
"mode.num_iterations": 4,
"cache_iterations": false
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 83,
"type": "CreateList",
"pos": [
1927.3548936822945,
1062.3603297391473
],
"size": [
153.33794730509703,
86
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 132
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 131
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
137
]
}
],
"properties": {
"Node name for S&R": "CreateList"
}
},
{
"id": 73,
"type": "SaveImage",
"pos": [
2543.098862503356,
847.9785337017087
],
"size": [
719.4067075526532,
826.6544079812281
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 113
}
],
"outputs": [
{
"name": "images",
"type": "IMAGE",
"links": null
}
],
"properties": {},
"widgets_values": [
"ComfyUI"
],
"widgets_values_named": {
"filename_prefix": "ComfyUI"
}
}
],
"links": [
[
52,
31,
0,
8,
0,
"LATENT"
],
[
62,
43,
0,
8,
1,
"VAE"
],
[
63,
44,
0,
6,
0,
"CLIP"
],
[
69,
48,
0,
31,
0,
"MODEL"
],
[
70,
6,
0,
49,
0,
"CONDITIONING"
],
[
71,
49,
0,
31,
1,
"CONDITIONING"
],
[
74,
52,
0,
31,
3,
"LATENT"
],
[
75,
52,
0,
49,
1,
"LATENT"
],
[
76,
43,
0,
52,
1,
"VAE"
],
[
89,
56,
4,
61,
0,
"*"
],
[
91,
63,
0,
56,
1,
"*"
],
[
95,
65,
0,
63,
1,
"STRING"
],
[
98,
59,
0,
6,
1,
"STRING"
],
[
99,
8,
0,
57,
0,
"IMAGE"
],
[
110,
49,
0,
70,
0,
"CONDITIONING"
],
[
111,
70,
0,
31,
2,
"CONDITIONING"
],
[
113,
57,
0,
73,
0,
"IMAGE"
],
[
118,
61,
0,
59,
1,
"IMAGE"
],
[
125,
79,
0,
59,
0,
"CLIP"
],
[
126,
80,
0,
81,
0,
"STRING"
],
[
128,
81,
0,
59,
4,
"STRING"
],
[
131,
82,
0,
83,
1,
"STRING"
],
[
132,
8,
0,
83,
0,
"IMAGE"
],
[
135,
56,
0,
82,
1,
"INT"
],
[
137,
83,
0,
57,
1,
"*"
],
[
139,
56,
4,
85,
0,
"*"
],
[
141,
56,
0,
81,
2,
"INT"
],
[
142,
85,
0,
81,
1,
"*"
],
[
143,
85,
0,
82,
0,
"*"
],
[
144,
82,
0,
86,
0,
"STRING"
],
[
145,
86,
0,
57,
2,
"STRING"
],
[
146,
59,
0,
82,
2,
"STRING"
],
[
150,
88,
0,
89,
0,
"IMAGE"
],
[
151,
50,
0,
88,
0,
"IMAGE"
],
[
152,
89,
0,
63,
0,
"IMAGE"
],
[
154,
61,
0,
52,
0,
"IMAGE"
]
],
"groups": [
{
"id": 1,
"title": "Flux.2 Klein",
"bounding": [
134.82223438076275,
-92.17156309638722,
1586.174002190231,
775.2913224429028
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.4189769069935426,
"offset": [
1710.564109246241,
-79.36240824265246
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
The base is an image-editing workflow using FLUX.2 [klein].
What to edit, though, is left to the MLLM. Here it looks at the image, picks one thing the person is wearing, and swaps it for something else.
As a nice touch, the MLLM gets more than the image: it also receives the history of prompts it wrote earlier. That keeps it from repeating the same instruction.
Image and prompt history into a List
The image to edit and the prompt history are bundled into a List and handed to the loop.
On the first pass there is no history yet, so we put in null as a harmless placeholder.
Taking the image back out
The List holds [image, history].
Setting index on Get Item From List to 0 gives you the image, which goes to Generate Text and to FLUX.2 [klein].
Writing the instruction for the MLLM
The core of it is "look at the person in the image and write a prompt that changes one piece of their outfit."
On top of that, Format Text supplies the history and which turn we are on.
Append to the history, back into a List
The prompt the MLLM just wrote is appended to the history so far.
That, together with the edited image, goes back into a List and on to the next iteration.
Output





Continuous I2V with a Prompt List on MiniMax H3
Even the newest video models only produce about 5 to 15 seconds at a time.
Which is where loops come in. Twelve repeats of a 5 second clip gets you a minute!

{
"id": "ab470b3f-c850-4cc5-be9c-63a1bff0dc45",
"revision": 0,
"last_node_id": 121,
"last_link_id": 204,
"nodes": [
{
"id": 77,
"type": "VAEDecodeAudio",
"pos": [
1308.6980183050962,
296.9762089835968
],
"size": [
194.25299723441972,
46
],
"flags": {},
"order": 27,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 132
},
{
"name": "vae",
"type": "VAE",
"link": 150
}
],
"outputs": [
{
"name": "AUDIO",
"type": "AUDIO",
"links": [
160
]
}
],
"properties": {
"Node name for S&R": "VAEDecodeAudio",
"cnr_id": "comfy-core",
"ver": "0.30.0"
}
},
{
"id": 82,
"type": "Reroute",
"pos": [
1138.7548217773438,
64.14635395192796
],
"size": [
75,
26
],
"flags": {},
"order": 11,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 149
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
150
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 79,
"type": "Reroute",
"pos": [
1138.7548217773438,
-59.89911033344882
],
"size": [
75,
26
],
"flags": {},
"order": 12,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 139
}
],
"outputs": [
{
"name": "",
"type": "VAE",
"links": [
140
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 81,
"type": "VAELoader",
"pos": [
52.62317611836556,
64.14635395192796
],
"size": [
301.3524169921875,
58
],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
149
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"minimax_h3_audio_vae_fp32.safetensors"
],
"widgets_values_named": {
"vae_name": "minimax_h3_audio_vae_fp32.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 75,
"type": "ConditioningZeroOut",
"pos": [
617.2715308676253,
587.3299521252133
],
"size": [
218.4346850585937,
26
],
"flags": {},
"order": 24,
"mode": 0,
"inputs": [
{
"name": "conditioning",
"type": "CONDITIONING",
"link": 179
}
],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [
130
]
}
],
"properties": {
"Node name for S&R": "ConditioningZeroOut",
"cnr_id": "comfy-core",
"ver": "0.30.0"
}
},
{
"id": 38,
"type": "CLIPLoader",
"pos": [
52.62317611836556,
188.19181823730474
],
"size": [
301.3524169921875,
106
],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CLIP",
"type": "CLIP",
"slot_index": 0,
"links": [
174
]
}
],
"properties": {
"Node name for S&R": "CLIPLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"qwen3vl_32b_minimax_h3_int8_convrot.safetensors",
"minimax",
"default"
],
"widgets_values_named": {
"clip_name": "qwen3vl_32b_minimax_h3_int8_convrot.safetensors",
"type": "minimax",
"device": "default"
},
"color": "#432",
"bgcolor": "#653"
},
{
"id": 39,
"type": "VAELoader",
"pos": [
52.62317611836556,
-59.89911033344882
],
"size": [
301.3524169921875,
58
],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "VAE",
"type": "VAE",
"slot_index": 0,
"links": [
139,
175
]
}
],
"properties": {
"Node name for S&R": "VAELoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"minimax_h3_video_vae_fp16.safetensors"
],
"widgets_values_named": {
"vae_name": "minimax_h3_video_vae_fp16.safetensors"
},
"color": "#322",
"bgcolor": "#533"
},
{
"id": 86,
"type": "ModelAttentionBackend",
"pos": [
553.2461981384733,
-207.9445746188256
],
"size": [
270,
58
],
"flags": {},
"order": 13,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 163
}
],
"outputs": [
{
"name": "model",
"type": "MODEL",
"links": [
164
]
}
],
"properties": {
"Node name for S&R": "ModelAttentionBackend"
},
"widgets_values": [
"comfy kitchen attention"
],
"widgets_values_named": {
"attention": "comfy kitchen attention"
}
},
{
"id": 100,
"type": "GetImageSize",
"pos": [
143.97559311055306,
526.4243293206648
],
"size": [
210,
136
],
"flags": {},
"order": 22,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 191
}
],
"outputs": [
{
"name": "width",
"type": "INT",
"links": [
172
]
},
{
"name": "height",
"type": "INT",
"links": [
173
]
},
{
"name": "batch_size",
"type": "INT",
"links": null
}
],
"properties": {
"Node name for S&R": "GetImageSize"
}
},
{
"id": 95,
"type": "MarkdownNote",
"pos": [
-482.3943342566212,
-207.9445746188256
],
"size": [
480.26512898835654,
314.3204118484383
],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [],
"outputs": [],
"properties": {},
"widgets_values": [
"## models\n- diffusion_models\n - [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) (21 GB)\n- text_encoders\n - [qwen3vl_32b_minimax_h3_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors) (27.1 GB)\n- vae\n - [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors) (605 MB)\n - [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_video_vae_fp16.safetensors) (5.21 GB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── minimax_h3_fl2va_pruned_int8_convrot.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_32b_minimax_h3_int8_convrot.safetensors\n └── 📂vae/\n ├── minimax_h3_audio_vae_fp32.safetensors\n └── minimax_h3_video_vae_fp16.safetensors\n```"
],
"widgets_values_named": {
"text": "## models\n- diffusion_models\n - [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors) (21 GB)\n- text_encoders\n - [qwen3vl_32b_minimax_h3_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/text_encoders/qwen3vl_32b_minimax_h3_int8_convrot.safetensors) (27.1 GB)\n- vae\n - [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_audio_vae_fp32.safetensors) (605 MB)\n - [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/blob/main/vae/minimax_h3_video_vae_fp16.safetensors) (5.21 GB)\n\n```text\n📂ComfyUI/\n└── 📂models/\n ├── 📂diffusion_models/\n │ └── minimax_h3_fl2va_pruned_int8_convrot.safetensors\n ├── 📂text_encoders/\n │ └── qwen3vl_32b_minimax_h3_int8_convrot.safetensors\n └── 📂vae/\n ├── minimax_h3_audio_vae_fp32.safetensors\n └── minimax_h3_video_vae_fp16.safetensors\n```"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 3,
"type": "KSampler",
"pos": [
898.7548217773438,
188.1918182373047
],
"size": [
315,
262
],
"flags": {},
"order": 25,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "MODEL",
"link": 164
},
{
"name": "positive",
"type": "CONDITIONING",
"link": 176
},
{
"name": "negative",
"type": "CONDITIONING",
"link": 130
},
{
"name": "latent_image",
"type": "LATENT",
"link": 177
}
],
"outputs": [
{
"name": "LATENT",
"type": "LATENT",
"slot_index": 0,
"links": [
35,
132
]
}
],
"properties": {
"Node name for S&R": "KSampler",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
1234,
"fixed",
20,
1,
"euler",
"simple",
1
],
"widgets_values_named": {
"seed": 1234,
"control_after_generate": "fixed",
"steps": 20,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1
}
},
{
"id": 37,
"type": "UNETLoader",
"pos": [
209.5978600183359,
-207.9445746188256
],
"size": [
305.3782043457031,
82
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "MODEL",
"type": "MODEL",
"slot_index": 0,
"links": [
163
]
}
],
"properties": {
"Node name for S&R": "UNETLoader",
"cnr_id": "comfy-core",
"ver": "0.3.33"
},
"widgets_values": [
"minimax_h3_fl2va_pruned_int8_convrot.safetensors",
"default"
],
"widgets_values_named": {
"unet_name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors",
"weight_dtype": "default"
},
"color": "#323",
"bgcolor": "#535"
},
{
"id": 101,
"type": "MiniMaxH3ImageToVideo",
"pos": [
434.27961405604844,
188.1918182373047
],
"size": [
401.42660187017054,
324.13877587380694
],
"flags": {},
"order": 23,
"mode": 0,
"inputs": [
{
"name": "clip",
"type": "CLIP",
"link": 174
},
{
"name": "vae",
"type": "VAE",
"link": 175
},
{
"name": "first_frame",
"shape": 7,
"type": "IMAGE",
"link": 171
},
{
"name": "last_frame",
"shape": 7,
"type": "IMAGE",
"link": null
},
{
"name": "prompt",
"type": "STRING",
"widget": {
"name": "prompt"
},
"link": 189
},
{
"name": "width",
"type": "INT",
"widget": {
"name": "width"
},
"link": 172
},
{
"name": "height",
"type": "INT",
"widget": {
"name": "height"
},
"link": 173
},
{
"name": "length",
"type": "INT",
"widget": {
"name": "length"
},
"link": 178
}
],
"outputs": [
{
"name": "positive",
"type": "CONDITIONING",
"links": [
176,
179
]
},
{
"name": "LATENT",
"type": "LATENT",
"links": [
177
]
}
],
"properties": {
"Node name for S&R": "MiniMaxH3ImageToVideo"
},
"widgets_values": [
"",
1344,
768,
124
],
"widgets_values_named": {
"prompt": "",
"width": 1344,
"height": 768,
"length": 124
}
},
{
"id": 112,
"type": "Reroute",
"pos": [
278.97559311055306,
428.1444569593666
],
"size": [
75,
26
],
"flags": {},
"order": 20,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"widget": {
"name": "value"
},
"link": 190
}
],
"outputs": [
{
"name": "",
"type": "*",
"links": [
189
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 99,
"type": "Reroute",
"pos": [
278.97559311055306,
363.9029590533054
],
"size": [
75,
26
],
"flags": {},
"order": 21,
"mode": 0,
"inputs": [
{
"name": "",
"type": "*",
"link": 188
}
],
"outputs": [
{
"name": "",
"type": "IMAGE",
"links": [
171
]
}
],
"properties": {
"showOutputText": false,
"horizontal": false
}
},
{
"id": 94,
"type": "PrimitiveFloat",
"pos": [
-107.86571165334878,
735.0927599465895
],
"size": [
214.65850806503283,
58
],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": [
166
]
}
],
"title": "Float: Duration (sec)",
"properties": {
"Node name for S&R": "PrimitiveFloat"
},
"widgets_values": [
5
],
"widgets_values_named": {
"value": 5
}
},
{
"id": 116,
"type": "ConcatenateVideo",
"pos": [
2542.26807105349,
321.14790581800446
],
"size": [
270,
118
],
"flags": {},
"order": 32,
"mode": 0,
"inputs": [
{
"name": "videos.video0",
"type": "VIDEO",
"link": 195
},
{
"name": "videos.video1",
"shape": 7,
"type": "VIDEO",
"link": null
},
{
"name": "complete_audio",
"shape": 7,
"type": "AUDIO",
"link": null
}
],
"outputs": [
{
"name": "VIDEO",
"type": "VIDEO",
"links": [
196
]
}
],
"properties": {
"Node name for S&R": "ConcatenateVideo"
},
"widgets_values": [
"auto"
],
"widgets_values_named": {
"codec": "auto"
}
},
{
"id": 8,
"type": "VAEDecode",
"pos": [
1308.6980183050962,
188.1918182373047
],
"size": [
194.25299723441972,
46
],
"flags": {},
"order": 26,
"mode": 0,
"inputs": [
{
"name": "samples",
"type": "LATENT",
"link": 35
},
{
"name": "vae",
"type": "VAE",
"link": 140
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"slot_index": 0,
"links": [
193,
203
]
}
],
"properties": {
"Node name for S&R": "VAEDecode",
"cnr_id": "comfy-core",
"ver": "0.3.33"
}
},
{
"id": 87,
"type": "ComfyMathExpression",
"pos": [
143.97559311055306,
735.0927599465895
],
"size": [
210,
128
],
"flags": {},
"order": 14,
"mode": 0,
"inputs": [
{
"label": "a",
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 166
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
178,
198
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression",
"cnr_id": "comfy-core",
"ver": "0.33.0"
},
"widgets_values": [
"17 * round((a * 24 - 5) / 17) + 5"
],
"widgets_values_named": {
"expression": "17 * round((a * 24 - 5) / 17) + 5"
}
},
{
"id": 91,
"type": "CreateVideo",
"pos": [
1544.2637529711267,
188.1918182373047
],
"size": [
270,
150
],
"flags": {},
"order": 29,
"mode": 0,
"inputs": [
{
"name": "images",
"type": "IMAGE",
"link": 203
},
{
"name": "audio",
"shape": 7,
"type": "AUDIO",
"link": 160
}
],
"outputs": [
{
"name": "VIDEO",
"type": "VIDEO",
"links": [
202
]
}
],
"properties": {
"Node name for S&R": "CreateVideo",
"cnr_id": "comfy-core",
"ver": "0.33.0"
},
"widgets_values": [
24,
8,
"sRGB",
"none"
],
"widgets_values_named": {
"fps": 24,
"bit_depth": 8,
"color_space": "sRGB",
"codec": "none"
}
},
{
"id": 120,
"type": "VideoTemporalCrop",
"pos": [
1846.553502856667,
188.1918182373047
],
"size": [
270,
82
],
"flags": {},
"order": 30,
"mode": 0,
"inputs": [
{
"name": "video",
"type": "VIDEO",
"link": 202
},
{
"name": "length",
"type": "INT",
"widget": {
"name": "length"
},
"link": 201
}
],
"outputs": [
{
"name": "video",
"type": "VIDEO",
"links": [
204
]
}
],
"properties": {
"Node name for S&R": "VideoTemporalCrop"
},
"widgets_values": [
0,
16
],
"widgets_values_named": {
"start_frame": 0,
"length": 16
}
},
{
"id": 119,
"type": "ComfyMathExpression",
"pos": [
1544.2637529711267,
401.5375898771562
],
"size": [
270,
128
],
"flags": {},
"order": 17,
"mode": 0,
"inputs": [
{
"label": "a",
"name": "values.a",
"type": "FLOAT,INT,BOOLEAN",
"link": 198
},
{
"name": "values.b",
"shape": 7,
"type": "FLOAT,INT,BOOLEAN",
"link": null
}
],
"outputs": [
{
"name": "FLOAT",
"type": "FLOAT",
"links": null
},
{
"name": "INT",
"type": "INT",
"links": [
201
]
},
{
"name": "BOOL",
"type": "BOOLEAN",
"links": null
}
],
"properties": {
"Node name for S&R": "ComfyMathExpression",
"cnr_id": "comfy-core",
"ver": "0.33.0"
},
"widgets_values": [
"a - 1"
],
"widgets_values_named": {
"expression": "a - 1"
}
},
{
"id": 115,
"type": "ImageFromBatch",
"pos": [
1544.2637529711267,
600.4173333661352
],
"size": [
270,
82
],
"flags": {},
"order": 28,
"mode": 0,
"inputs": [
{
"name": "image",
"type": "IMAGE",
"link": 193
}
],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
194
]
}
],
"properties": {
"Node name for S&R": "ImageFromBatch"
},
"widgets_values": [
-1,
1
],
"widgets_values_named": {
"batch_index": -1,
"length": 1
}
},
{
"id": 97,
"type": "ResizeImageMaskNode",
"pos": [
-1765.4289146715,
344.85905389444645
],
"size": [
270,
106
],
"flags": {},
"order": 15,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 167
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
168
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode"
},
"widgets_values": [
"scale total pixels",
1,
"bicubic"
],
"widgets_values_named": {
"resize_type": "scale total pixels",
"resize_type.megapixels": 1,
"scale_method": "bicubic"
}
},
{
"id": 98,
"type": "ResizeImageMaskNode",
"pos": [
-1459.6506419459313,
344.85905389444645
],
"size": [
270,
106
],
"flags": {},
"order": 18,
"mode": 0,
"inputs": [
{
"name": "input",
"type": "IMAGE,MASK",
"link": 168
}
],
"outputs": [
{
"name": "resized",
"type": "IMAGE",
"links": [
187
]
}
],
"properties": {
"Node name for S&R": "ResizeImageMaskNode"
},
"widgets_values": [
"scale to multiple",
32,
"bicubic"
],
"widgets_values_named": {
"resize_type": "scale to multiple",
"resize_type.multiple": 32,
"scale_method": "bicubic"
}
},
{
"id": 107,
"type": "CreateList",
"pos": [
-1174.6659821722637,
886.069829752982
],
"size": [
140,
126
],
"flags": {},
"order": 16,
"mode": 0,
"inputs": [
{
"name": "inputs.input0",
"type": "*",
"link": 182
},
{
"name": "inputs.input1",
"shape": 7,
"type": "*",
"link": 183
},
{
"name": "inputs.input2",
"shape": 7,
"type": "*",
"link": 184
},
{
"name": "inputs.input3",
"shape": 7,
"type": "*",
"link": 185
},
{
"name": "inputs.input4",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "list",
"shape": 6,
"type": "*",
"links": [
186
]
}
],
"properties": {
"Node name for S&R": "CreateList"
}
},
{
"id": 96,
"type": "LoadImage",
"pos": [
-2199.7517846819865,
344.85905389444645
],
"size": [
395.92259844661385,
635.5059332130379
],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
167
]
},
{
"name": "MASK",
"type": "MASK",
"links": null
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"apple.png",
"image"
],
"widgets_values_named": {
"image": "apple.png",
"upload": "image"
}
},
{
"id": 108,
"type": "PrimitiveStringMultiline",
"pos": [
-1692.026184193292,
587.7929212870614
],
"size": [
401.1918176537728,
161.86183507927308
],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
182
]
}
],
"properties": {
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"integrated_multimodal_description:\nA soft 2D anime-style shot in a calm autumn setting. The girl begins holding a red apple near her mouth with both hands, matching the first frame exactly. She gently bites into the apple, puffing her cheeks slightly as she takes a mouthful. Her eyes widen a little with quiet delight, and a few strands of hair and nearby autumn leaves sway softly in the breeze. She chews shyly while still holding the apple close to her face. The camera stays close and steady, with only a subtle natural drift.\n\noverall_soundscape:\nA light autumn breeze, soft leaf rustling, gentle cloth movement, and a crisp bite into the apple followed by quiet chewing.\n\nnon_diegetic_music:\nN/A"
],
"widgets_values_named": {
"value": "integrated_multimodal_description:\nA soft 2D anime-style shot in a calm autumn setting. The girl begins holding a red apple near her mouth with both hands, matching the first frame exactly. She gently bites into the apple, puffing her cheeks slightly as she takes a mouthful. Her eyes widen a little with quiet delight, and a few strands of hair and nearby autumn leaves sway softly in the breeze. She chews shyly while still holding the apple close to her face. The camera stays close and steady, with only a subtle natural drift.\n\noverall_soundscape:\nA light autumn breeze, soft leaf rustling, gentle cloth movement, and a crisp bite into the apple followed by quiet chewing.\n\nnon_diegetic_music:\nN/A"
}
},
{
"id": 109,
"type": "PrimitiveStringMultiline",
"pos": [
-1692.026184193292,
800.5155902891713
],
"size": [
401.1918176537728,
161.86183507927308
],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
183
]
}
],
"properties": {
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"integrated_multimodal_description:\nThe girl is still holding the bitten apple with both hands and chewing softly. As she adjusts her grip, the apple suddenly slips from her fingers. She looks startled and instinctively tries to catch it, but it drops out of her hands and falls downward. Her shoulders and upper body dip forward in surprise as she follows it with her gaze. The camera tilts and follows the falling motion downward, revealing more of her body and the leaf-covered ground. By the end of the shot, the apple has fallen onto the ground and the girl is leaning forward, looking down at it in surprise.\n\noverall_soundscape:\nSoft leaf rustling, a small surprised breath, the apple slipping from her hands, and a light thump as it lands among dry leaves.\n\nnon_diegetic_music:\nN/A"
],
"widgets_values_named": {
"value": "integrated_multimodal_description:\nThe girl is still holding the bitten apple with both hands and chewing softly. As she adjusts her grip, the apple suddenly slips from her fingers. She looks startled and instinctively tries to catch it, but it drops out of her hands and falls downward. Her shoulders and upper body dip forward in surprise as she follows it with her gaze. The camera tilts and follows the falling motion downward, revealing more of her body and the leaf-covered ground. By the end of the shot, the apple has fallen onto the ground and the girl is leaning forward, looking down at it in surprise.\n\noverall_soundscape:\nSoft leaf rustling, a small surprised breath, the apple slipping from her hands, and a light thump as it lands among dry leaves.\n\nnon_diegetic_music:\nN/A"
}
},
{
"id": 110,
"type": "PrimitiveStringMultiline",
"pos": [
-1692.026184193292,
1013.2382592912816
],
"size": [
401.1918176537728,
161.86183507927308
],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
184
]
}
],
"properties": {
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"integrated_multimodal_description:\nThe girl bends her knees and crouches down to pick up the fallen apple. She reaches one hand toward it while the other helps her balance. Just before touching it, she notices a cute orderly line of tiny ants marching toward the apple and beginning to gather around it. Her expression changes from mild concern to gentle curiosity, and she stops her hand just short of the apple. The camera lowers with her into a closer ground-level view that clearly shows her hand, the apple, and the little line of ants moving across the leaves.\n\noverall_soundscape:\nSoft outdoor ambience, light leaf rustling, a quiet shift of fabric as she crouches, and a calm breeze.\n\nnon_diegetic_music:\nN/A"
],
"widgets_values_named": {
"value": "integrated_multimodal_description:\nThe girl bends her knees and crouches down to pick up the fallen apple. She reaches one hand toward it while the other helps her balance. Just before touching it, she notices a cute orderly line of tiny ants marching toward the apple and beginning to gather around it. Her expression changes from mild concern to gentle curiosity, and she stops her hand just short of the apple. The camera lowers with her into a closer ground-level view that clearly shows her hand, the apple, and the little line of ants moving across the leaves.\n\noverall_soundscape:\nSoft outdoor ambience, light leaf rustling, a quiet shift of fabric as she crouches, and a calm breeze.\n\nnon_diegetic_music:\nN/A"
}
},
{
"id": 111,
"type": "PrimitiveStringMultiline",
"pos": [
-1692.026184193292,
1225.9609282933916
],
"size": [
401.1918176537728,
161.86183507927308
],
"flags": {},
"order": 10,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "STRING",
"type": "STRING",
"links": [
185
]
}
],
"properties": {
"Node name for S&R": "PrimitiveStringMultiline"
},
"widgets_values": [
"integrated_multimodal_description:\nMore tiny ants gather around the apple, and together they begin dragging it slowly across the leaf-covered ground in a charming, slightly exaggeratedly cute way. The girl withdraws her hand and stays crouched beside them, resting her hands near her knees. She watches the little procession with a warm smile, her eyes following the apple as it slowly moves. A few autumn leaves drift down around her, and the camera gently tracks sideways at a low angle to follow the ants carrying the apple while keeping the smiling girl in frame.\n\noverall_soundscape:\nGentle outdoor ambience, soft leaf rustling, tiny pattering movement over dry leaves, and the girl’s quiet amused breath.\n\nnon_diegetic_music:\nN/A"
],
"widgets_values_named": {
"value": "integrated_multimodal_description:\nMore tiny ants gather around the apple, and together they begin dragging it slowly across the leaf-covered ground in a charming, slightly exaggeratedly cute way. The girl withdraws her hand and stays crouched beside them, resting her hands near her knees. She watches the little procession with a warm smile, her eyes following the apple as it slowly moves. A few autumn leaves drift down around her, and the camera gently tracks sideways at a low angle to follow the ants carrying the apple while keeping the smiling girl in frame.\n\noverall_soundscape:\nGentle outdoor ambience, soft leaf rustling, tiny pattering movement over dry leaves, and the girl’s quiet amused breath.\n\nnon_diegetic_music:\nN/A"
}
},
{
"id": 117,
"type": "SaveVideo",
"pos": [
2873.002323422617,
321.14790581800446
],
"size": [
707.9059377098774,
1159.8589065648162
],
"flags": {},
"order": 33,
"mode": 0,
"inputs": [
{
"name": "video",
"type": "VIDEO",
"link": 196
}
],
"outputs": [
{
"name": "video",
"type": "VIDEO",
"links": null
}
],
"properties": {},
"widgets_values": [
"video/ComfyUI",
"auto",
"auto",
"auto"
],
"widgets_values_named": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"codec": "auto"
}
},
{
"id": 106,
"type": "EndLoop",
"pos": [
2233.4059961535186,
321.14790581800446
],
"size": [
270,
98
],
"flags": {},
"order": 31,
"mode": 0,
"inputs": [
{
"name": "output_value",
"shape": 7,
"type": "*",
"link": 204
},
{
"name": "next_iteration_value",
"shape": 7,
"type": "*",
"link": 194
},
{
"name": "terminations.termination0",
"shape": 7,
"type": "*",
"link": null
}
],
"outputs": [
{
"name": "outputs",
"shape": 6,
"type": "VIDEO",
"links": [
195
]
}
],
"properties": {
"Node name for S&R": "EndLoop"
},
"widgets_values": [
true
],
"widgets_values_named": {
"accumulate": true
},
"color": "#232",
"bgcolor": "#353"
},
{
"id": 104,
"type": "StartLoop",
"pos": [
-939.5754942651286,
325.8576171864558
],
"size": [
349.177734375,
162
],
"flags": {},
"order": 19,
"mode": 0,
"inputs": [
{
"name": "parent_iteration",
"shape": 7,
"type": "INT",
"link": null
},
{
"name": "initial_iteration_value",
"shape": 7,
"type": "*",
"link": 187
},
{
"name": "mode.list",
"type": "*",
"link": 186
}
],
"outputs": [
{
"name": "iteration_index",
"type": "INT",
"links": null
},
{
"name": "is_first",
"type": "BOOLEAN",
"links": null
},
{
"name": "is_last",
"type": "BOOLEAN",
"links": null
},
{
"name": "list_item",
"type": "*",
"links": [
190
]
},
{
"name": "current_iteration_value",
"type": "IMAGE",
"links": [
188,
191
]
}
],
"properties": {
"Node name for S&R": "StartLoop"
},
"widgets_values": [
"List",
true
],
"widgets_values_named": {
"mode": "List",
"cache_iterations": true
},
"color": "#232",
"bgcolor": "#353"
}
],
"links": [
[
35,
3,
0,
8,
0,
"LATENT"
],
[
130,
75,
0,
3,
2,
"CONDITIONING"
],
[
132,
3,
0,
77,
0,
"LATENT"
],
[
139,
39,
0,
79,
0,
"VAE"
],
[
140,
79,
0,
8,
1,
"VAE"
],
[
149,
81,
0,
82,
0,
"VAE"
],
[
150,
82,
0,
77,
1,
"VAE"
],
[
160,
77,
0,
91,
1,
"AUDIO"
],
[
163,
37,
0,
86,
0,
"MODEL"
],
[
164,
86,
0,
3,
0,
"MODEL"
],
[
166,
94,
0,
87,
0,
"FLOAT"
],
[
167,
96,
0,
97,
0,
"IMAGE"
],
[
168,
97,
0,
98,
0,
"IMAGE"
],
[
171,
99,
0,
101,
2,
"IMAGE"
],
[
172,
100,
0,
101,
5,
"INT"
],
[
173,
100,
1,
101,
6,
"INT"
],
[
174,
38,
0,
101,
0,
"CLIP"
],
[
175,
39,
0,
101,
1,
"VAE"
],
[
176,
101,
0,
3,
1,
"CONDITIONING"
],
[
177,
101,
1,
3,
3,
"LATENT"
],
[
178,
87,
1,
101,
7,
"INT"
],
[
179,
101,
0,
75,
0,
"CONDITIONING"
],
[
182,
108,
0,
107,
0,
"STRING"
],
[
183,
109,
0,
107,
1,
"STRING"
],
[
184,
110,
0,
107,
2,
"STRING"
],
[
185,
111,
0,
107,
3,
"STRING"
],
[
186,
107,
0,
104,
2,
"*"
],
[
187,
98,
0,
104,
1,
"IMAGE"
],
[
188,
104,
4,
99,
0,
"IMAGE"
],
[
189,
112,
0,
101,
4,
"STRING"
],
[
190,
104,
3,
112,
0,
"*"
],
[
191,
104,
4,
100,
0,
"IMAGE"
],
[
193,
8,
0,
115,
0,
"IMAGE"
],
[
194,
115,
0,
106,
1,
"IMAGE"
],
[
195,
106,
0,
116,
0,
"VIDEO"
],
[
196,
116,
0,
117,
0,
"VIDEO"
],
[
198,
87,
1,
119,
0,
"INT"
],
[
201,
119,
1,
120,
1,
"INT"
],
[
202,
91,
0,
120,
0,
"VIDEO"
],
[
203,
8,
0,
91,
0,
"IMAGE"
],
[
204,
120,
0,
106,
0,
"VIDEO"
]
],
"groups": [
{
"id": 1,
"title": "MiniMax H3 I2VA",
"bounding": [
-492.3943342566212,
-277.94457461882564,
2618.947837113288,
1151.037334565415
],
"color": "#3f789e",
"flags": {}
}
],
"config": {},
"extra": {
"ds": {
"scale": 0.478422236552884,
"offset": [
2954.002121530293,
881.0704803917905
]
},
"frontendVersion": "1.52.7",
"VHS_latentpreview": false,
"VHS_latentpreviewrate": 0,
"VHS_MetadataImage": true,
"VHS_KeepIntermediate": true
},
"version": 0.4
}
We generate 5 seconds at a time with MiniMax H3 I2VA, and repeat that N times.
List mode feeds the prompts one at a time, while the last frame of each generated clip is passed to the next iteration.
Starting image
The image used for the first frame goes into initial_iteration_value.
Prompts (List)
The 5 second clip is repeated once per element in the List.
Write N self-contained prompts — 0–5 s, 5–10 s and so on — bundle them into a List, and feed that into Start Loop.
Last frame into the next pass
The last frame of the clip that came out becomes the first frame of the next iteration.
Output video
Everything gets joined later, so accumulate is turned on.
The last frame would otherwise duplicate the first frame of the next clip, so we drop it before connecting to output_value.
Concatenate Video
The clips from all four prompts come out together as a List.
Concatenate Video is what turns them into one.
Only video0 is connected, which looks odd, but that is all it takes.
Output
To be honest, this workflow is not quite strong enough for real use.
All I2VA has to go on is that first frame. The last frame of a clip, though, sometimes shows neither the character nor the background. You can see it in the output — the woman turns into someone else partway through. Handing over a reference image with Ref2VA would be the better approach.
The seams between clips are a concern too. Ideally you would keep the first couple of seconds of the previous clip as overlap and generate only the rest — the technique usually called Extension — but there is no simple node for it, so this workflow settles for less.