Add Playwright tests for async execution

This commit is contained in:
Jacob Segal
2025-07-17 18:27:09 -07:00
parent aae20d9417
commit ada4f1d533
12 changed files with 2603 additions and 2 deletions

View File

@@ -0,0 +1,293 @@
{
"id": "test-subgraph-workflow",
"revision": 0,
"last_node_id": 12,
"last_link_id": 10,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [50, 200],
"size": [315, 314],
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [1], "slot_index": 0 },
{ "name": "MASK", "type": "MASK", "links": null, "slot_index": 1 }
],
"properties": { "Node name for S&R": "LoadImage" },
"widgets_values": ["example.png", "image"]
},
{
"id": 10,
"type": "test-subgraph-1",
"pos": [400, 200],
"size": [200, 80],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "IMAGE", "type": "IMAGE", "link": 1 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [9] }
],
"title": "Test Subgraph",
"properties": {},
"widgets_values": []
},
{
"id": 11,
"type": "SaveImage",
"pos": [700, 200],
"size": [315, 270],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{ "name": "images", "type": "IMAGE", "link": 9 }
],
"outputs": [],
"properties": {},
"widgets_values": ["ComfyUI"]
}
],
"links": [
[1, 1, 0, 10, 0, "IMAGE"],
[9, 10, 0, 11, 0, "IMAGE"]
],
"groups": [],
"definitions": {
"subgraphs": [
{
"id": "test-subgraph-1",
"version": 1,
"state": {
"lastGroupId": 0,
"lastNodeId": 7,
"lastLinkId": 6,
"lastRerouteId": 0
},
"revision": 0,
"config": {},
"name": "Test Subgraph",
"inputNode": {
"id": -10,
"bounding": [-154, 200, 120, 60]
},
"outputNode": {
"id": -20,
"bounding": [800, 200, 120, 60]
},
"inputs": [
{
"id": "input-1",
"name": "IMAGE",
"type": "IMAGE",
"linkIds": [1],
"localized_name": "IMAGE",
"pos": {
"0": -134,
"1": 220
}
}
],
"outputs": [
{
"id": "output-1",
"name": "IMAGE",
"type": "IMAGE",
"linkIds": [5],
"localized_name": "IMAGE",
"pos": {
"0": 820,
"1": 220
}
}
],
"widgets": [],
"nodes": [
{
"id": 3,
"type": "TestSleep",
"pos": [100, 200],
"size": [210, 86],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 1 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [2], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestSleep" },
"widgets_values": [2.0]
},
{
"id": 5,
"type": "test-subgraph-2",
"pos": [350, 200],
"size": [200, 80],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "IMAGE", "type": "IMAGE", "link": 2 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [5] }
],
"title": "Nested Test Subgraph",
"properties": {},
"widgets_values": []
}
],
"groups": [],
"links": [
{
"id": 1,
"origin_id": -10,
"origin_slot": 0,
"target_id": 3,
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 2,
"origin_id": 3,
"origin_slot": 0,
"target_id": 5,
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 5,
"origin_id": 5,
"origin_slot": 0,
"target_id": -20,
"target_slot": 0,
"type": "IMAGE"
}
],
"extra": {}
},
{
"id": "test-subgraph-2",
"version": 1,
"state": {
"lastGroupId": 0,
"lastNodeId": 7,
"lastLinkId": 4,
"lastRerouteId": 0
},
"revision": 0,
"config": {},
"name": "Nested Test Subgraph",
"inputNode": {
"id": -10,
"bounding": [-154, 200, 120, 60]
},
"outputNode": {
"id": -20,
"bounding": [600, 200, 120, 60]
},
"inputs": [
{
"id": "input-1",
"name": "IMAGE",
"type": "IMAGE",
"linkIds": [1],
"localized_name": "IMAGE",
"pos": {
"0": -134,
"1": 220
}
}
],
"outputs": [
{
"id": "output-1",
"name": "IMAGE",
"type": "IMAGE",
"linkIds": [4],
"localized_name": "IMAGE",
"pos": {
"0": 620,
"1": 220
}
}
],
"widgets": [],
"nodes": [
{
"id": 6,
"type": "TestSleep",
"pos": [100, 150],
"size": [210, 86],
"flags": {},
"order": 0,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 1 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [2], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestSleep" },
"widgets_values": [2.0]
},
{
"id": 7,
"type": "TestAsyncProgressNode",
"pos": [350, 150],
"size": [210, 126],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 2 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [4], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestAsyncProgressNode" },
"widgets_values": [3.0, 10]
}
],
"groups": [],
"links": [
{
"id": 1,
"origin_id": -10,
"origin_slot": 0,
"target_id": 6,
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 2,
"origin_id": 6,
"origin_slot": 0,
"target_id": 7,
"target_slot": 0,
"type": "IMAGE"
},
{
"id": 4,
"origin_id": 7,
"origin_slot": 0,
"target_id": -20,
"target_slot": 0,
"type": "IMAGE"
}
],
"extra": {}
}
]
},
"config": {},
"extra": {},
"version": 0.4
}

View File

@@ -0,0 +1,139 @@
{
"last_node_id": 12,
"last_link_id": 10,
"nodes": [
{
"id": 1,
"type": "LoadImage",
"pos": [26, 200],
"size": [315, 314],
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [1, 2, 3], "slot_index": 0 },
{ "name": "MASK", "type": "MASK", "links": null, "slot_index": 1 }
],
"properties": { "Node name for S&R": "LoadImage" },
"widgets_values": ["example.png", "image"]
},
{
"id": 2,
"type": "TestSleep",
"pos": [400, 100],
"size": [210, 86],
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 1 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [4], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestSleep" },
"widgets_values": [2.0]
},
{
"id": 3,
"type": "TestSleep",
"pos": [400, 250],
"size": [210, 86],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 2 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [5], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestSleep" },
"widgets_values": [2.5]
},
{
"id": 4,
"type": "TestAsyncProgressNode",
"pos": [400, 400],
"size": [210, 126],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{ "name": "value", "type": "IMAGE", "link": 3 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [6], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestAsyncProgressNode" },
"widgets_values": [3.0, 10]
},
{
"id": 5,
"type": "TestVariadicAverage",
"pos": [700, 200],
"size": [210, 106],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{ "name": "input1", "type": "IMAGE", "link": 4 },
{ "name": "input2", "type": "IMAGE", "link": 5 },
{ "name": "input3", "type": "IMAGE", "link": 6 }
],
"outputs": [
{ "name": "IMAGE", "type": "IMAGE", "links": [7], "slot_index": 0 }
],
"properties": { "Node name for S&R": "TestVariadicAverage" }
},
{
"id": 6,
"type": "SaveImage",
"pos": [1000, 200],
"size": [315, 270],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{ "name": "images", "type": "IMAGE", "link": 7 }
],
"properties": {},
"widgets_values": ["ComfyUI"]
},
{
"id": 7,
"type": "CLIPTextEncode",
"pos": [700, 400],
"size": [210, 54],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [
{ "name": "clip", "type": "CLIP", "link": null }
],
"outputs": [
{ "name": "CONDITIONING", "type": "CONDITIONING", "links": [], "slot_index": 0 }
],
"properties": { "Node name for S&R": "CLIPTextEncode" },
"widgets_values": ["test"]
}
],
"links": [
[1, 1, 0, 2, 0, "IMAGE"],
[2, 1, 0, 3, 0, "IMAGE"],
[3, 1, 0, 4, 0, "IMAGE"],
[4, 2, 0, 5, 0, "IMAGE"],
[5, 3, 0, 5, 1, "IMAGE"],
[6, 4, 0, 5, 2, "IMAGE"],
[7, 5, 0, 6, 0, "IMAGE"]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}

View File

@@ -0,0 +1,193 @@
{
"last_node_id": 12,
"last_link_id": 13,
"nodes": [
{
"id": 1,
"type": "CheckpointLoaderSimple",
"pos": [26, 474],
"size": [315, 98],
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{ "name": "MODEL", "type": "MODEL", "links": [1, 10], "slot_index": 0 },
{ "name": "CLIP", "type": "CLIP", "links": [2, 3], "slot_index": 1 },
{ "name": "VAE", "type": "VAE", "links": [8, 11], "slot_index": 2 }
],
"properties": {},
"widgets_values": ["v1-5-pruned-emaonly-fp16.safetensors"]
},
{
"id": 2,
"type": "CLIPTextEncode",
"pos": [415, 186],
"size": [422.84503173828125, 164.31304931640625],
"flags": {},
"order": 2,
"mode": 0,
"inputs": [{ "name": "clip", "type": "CLIP", "link": 2 }],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [4, 12],
"slot_index": 0
}
],
"properties": {},
"widgets_values": [
"beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
]
},
{
"id": 3,
"type": "CLIPTextEncode",
"pos": [413, 389],
"size": [425.27801513671875, 180.6060791015625],
"flags": {},
"order": 3,
"mode": 0,
"inputs": [{ "name": "clip", "type": "CLIP", "link": 3 }],
"outputs": [
{
"name": "CONDITIONING",
"type": "CONDITIONING",
"links": [5, 13],
"slot_index": 0
}
],
"properties": {},
"widgets_values": ["text, watermark"]
},
{
"id": 4,
"type": "EmptyLatentImage",
"pos": [473, 609],
"size": [315, 106],
"flags": {},
"order": 1,
"mode": 0,
"outputs": [{ "name": "LATENT", "type": "LATENT", "links": [6, 14], "slot_index": 0 }],
"properties": {},
"widgets_values": [512, 512, 1]
},
{
"id": 5,
"type": "KSampler",
"pos": [863, 186],
"size": [315, 262],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{ "name": "model", "type": "MODEL", "link": 1 },
{ "name": "positive", "type": "CONDITIONING", "link": 4 },
{ "name": "negative", "type": "CONDITIONING", "link": 5 },
{ "name": "latent_image", "type": "LATENT", "link": 6 }
],
"outputs": [{ "name": "LATENT", "type": "LATENT", "links": [7], "slot_index": 0 }],
"properties": {},
"widgets_values": [156680208700286, true, 2, 8, "euler", "normal", 1]
},
{
"id": 6,
"type": "VAEDecode",
"pos": [1209, 188],
"size": [210, 46],
"flags": {},
"order": 5,
"mode": 0,
"inputs": [
{ "name": "samples", "type": "LATENT", "link": 7 },
{ "name": "vae", "type": "VAE", "link": 8 }
],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [9], "slot_index": 0 }],
"properties": {}
},
{
"id": 7,
"type": "SaveImage",
"pos": [1451, 189],
"size": [210, 26],
"flags": {},
"order": 6,
"mode": 0,
"inputs": [{ "name": "images", "type": "IMAGE", "link": 9 }],
"properties": {},
"widgets_values": ["ComfyUI"]
},
{
"id": 8,
"type": "KSampler",
"pos": [863, 486],
"size": [315, 262],
"flags": {},
"order": 7,
"mode": 0,
"inputs": [
{ "name": "model", "type": "MODEL", "link": 10 },
{ "name": "positive", "type": "CONDITIONING", "link": 12 },
{ "name": "negative", "type": "CONDITIONING", "link": 13 },
{ "name": "latent_image", "type": "LATENT", "link": 14 }
],
"outputs": [{ "name": "LATENT", "type": "LATENT", "links": [15], "slot_index": 0 }],
"properties": {},
"widgets_values": [156680208700287, true, 3, 8, "euler", "normal", 1]
},
{
"id": 9,
"type": "VAEDecode",
"pos": [1209, 488],
"size": [210, 46],
"flags": {},
"order": 8,
"mode": 0,
"inputs": [
{ "name": "samples", "type": "LATENT", "link": 15 },
{ "name": "vae", "type": "VAE", "link": 11 }
],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [16], "slot_index": 0 }],
"properties": {}
},
{
"id": 10,
"type": "SaveImage",
"pos": [1451, 489],
"size": [210, 26],
"flags": {},
"order": 9,
"mode": 0,
"inputs": [{ "name": "images", "type": "IMAGE", "link": 16 }],
"properties": {},
"widgets_values": ["ComfyUI"]
}
],
"links": [
[1, 1, 0, 5, 0, "MODEL"],
[2, 1, 1, 2, 0, "CLIP"],
[3, 1, 1, 3, 0, "CLIP"],
[4, 2, 0, 5, 1, "CONDITIONING"],
[5, 3, 0, 5, 2, "CONDITIONING"],
[6, 4, 0, 5, 3, "LATENT"],
[7, 5, 0, 6, 0, "LATENT"],
[8, 1, 2, 6, 1, "VAE"],
[9, 6, 0, 7, 0, "IMAGE"],
[10, 1, 0, 8, 0, "MODEL"],
[11, 1, 2, 9, 1, "VAE"],
[12, 2, 0, 8, 1, "CONDITIONING"],
[13, 3, 0, 8, 2, "CONDITIONING"],
[14, 4, 0, 8, 3, "LATENT"],
[15, 8, 0, 9, 0, "LATENT"],
[16, 9, 0, 10, 0, "IMAGE"]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"offset": [0, 0],
"scale": 1
}
},
"version": 0.4
}