From 32e775cf2b13aa7bd798ef4e9ddbf3757a07cf67 Mon Sep 17 00:00:00 2001 From: Abdullah Alfaraj <7842232+AbdullahAlfaraj@users.noreply.github.com> Date: Sun, 19 Nov 2023 03:05:52 +0300 Subject: [PATCH] support batch size in inpaint mode --- ...aint_api_v0.0.10.json => inpaint_api.json} | 24 +- ...low_v0.0.10.json => inpaint_workflow.json} | 464 ++-- .../comfyui/inpaint_workflow_v0.0.10 (1).json | 2091 ----------------- typescripts/comfyui/main_ui.tsx | 6 +- 4 files changed, 276 insertions(+), 2309 deletions(-) rename typescripts/comfyui/{inpaint_api_v0.0.10.json => inpaint_api.json} (93%) rename typescripts/comfyui/{inpaint_workflow_v0.0.10.json => inpaint_workflow.json} (97%) delete mode 100644 typescripts/comfyui/inpaint_workflow_v0.0.10 (1).json diff --git a/typescripts/comfyui/inpaint_api_v0.0.10.json b/typescripts/comfyui/inpaint_api.json similarity index 93% rename from typescripts/comfyui/inpaint_api_v0.0.10.json rename to typescripts/comfyui/inpaint_api.json index 5e6898e..33c7075 100644 --- a/typescripts/comfyui/inpaint_api_v0.0.10.json +++ b/typescripts/comfyui/inpaint_api.json @@ -9,7 +9,7 @@ "cfg": 7, "sampler_name": "euler_ancestral", "scheduler": "karras", - "denoise": 1, + "denoise": 0.71, "model": [ "76", 0 @@ -23,7 +23,7 @@ 4 ], "latent_image": [ - "135", + "160", 0 ] }, @@ -130,7 +130,7 @@ }, "16": { "inputs": { - "ckpt_name": "dreamshaper_8Inpainting.safetensors" + "ckpt_name": "aniverse_v15Pruned.safetensors" }, "class_type": "CheckpointLoaderSimple" }, @@ -153,7 +153,7 @@ }, "58": { "inputs": { - "image": "pasted/image (13).png", + "image": "04b380cb676f37e52d5963a0982edd5e.jpg", "choose file to upload": "image" }, "class_type": "LoadImage" @@ -188,7 +188,7 @@ }, "83": { "inputs": { - "image": "pasted/image (14).png", + "image": "pasted/image (4).png", "choose file to upload": "image" }, "class_type": "LoadImage" @@ -207,7 +207,7 @@ }, "135": { "inputs": { - "content_mask": "latent_nothing", + "content_mask": "original", "width": [ "126", 0 @@ -237,7 +237,7 @@ }, "141": { "inputs": { - "seed": 370804183246305 + "seed": 519416762507340 }, "class_type": "APS_Seed" }, @@ -325,5 +325,15 @@ ] }, "class_type": "ControlNetScript" + }, + "160": { + "inputs": { + "amount": 1, + "samples": [ + "135", + 0 + ] + }, + "class_type": "RepeatLatentBatch" } } \ No newline at end of file diff --git a/typescripts/comfyui/inpaint_workflow_v0.0.10.json b/typescripts/comfyui/inpaint_workflow.json similarity index 97% rename from typescripts/comfyui/inpaint_workflow_v0.0.10.json rename to typescripts/comfyui/inpaint_workflow.json index bac7819..91f2cd9 100644 --- a/typescripts/comfyui/inpaint_workflow_v0.0.10.json +++ b/typescripts/comfyui/inpaint_workflow.json @@ -1,6 +1,6 @@ { - "last_node_id": 159, - "last_link_id": 304, + "last_node_id": 160, + "last_link_id": 306, "nodes": [ { "id": 13, @@ -14,7 +14,7 @@ "1": 46 }, "flags": {}, - "order": 35, + "order": 36, "mode": 0, "inputs": [ { @@ -200,7 +200,7 @@ "1": 46 }, "flags": {}, - "order": 32, + "order": 33, "mode": 0, "inputs": [ { @@ -277,7 +277,7 @@ "1": 82 }, "flags": {}, - "order": 31, + "order": 32, "mode": 0, "inputs": [ { @@ -318,7 +318,7 @@ "1": 474 }, "flags": {}, - "order": 33, + "order": 34, "mode": 0, "inputs": [ { @@ -553,79 +553,6 @@ "Node name for S&R": "PreviewImage" } }, - { - "id": 141, - "type": "APS_Seed", - "pos": [ - 359, - 532 - ], - "size": { - "0": 361.20001220703125, - "1": 82 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "s", - "type": "INT", - "links": [ - 259, - 260 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Auto-Photoshop-SD Seed | id:first_pass_seed", - "properties": { - "Node name for S&R": "APS_Seed" - }, - "widgets_values": [ - 248827423249163, - "randomize" - ] - }, - { - "id": 121, - "type": "Reroute", - "pos": [ - 2069, - 410 - ], - "size": [ - 90.4, - 26 - ], - "flags": {}, - "order": 21, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 290 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 217 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - }, - "color": "#223", - "bgcolor": "#335" - }, { "id": 148, "type": "PreviewImage", @@ -663,7 +590,7 @@ "1": 106 }, "flags": {}, - "order": 2, + "order": 1, "mode": 0, "outputs": [ { @@ -854,7 +781,7 @@ "1": 282.4336242675781 }, "flags": {}, - "order": 34, + "order": 35, "mode": 0, "inputs": [ { @@ -869,33 +796,6 @@ "ComfyUI" ] }, - { - "id": 12, - "type": "SaveImage", - "pos": [ - 3162, - 1131 - ], - "size": { - "0": 407.53717041015625, - "1": 468.13226318359375 - }, - "flags": {}, - "order": 36, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 17 - } - ], - "title": "Save Image | id:hires_output", - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, { "id": 126, "type": "Integer", @@ -908,7 +808,7 @@ "1": 58 }, "flags": {}, - "order": 3, + "order": 2, "mode": 0, "outputs": [ { @@ -941,7 +841,7 @@ "1": 58 }, "flags": {}, - "order": 4, + "order": 3, "mode": 0, "outputs": [ { @@ -974,7 +874,7 @@ "1": 98 }, "flags": {}, - "order": 5, + "order": 4, "mode": 0, "outputs": [ { @@ -1021,7 +921,7 @@ "1": 678 }, "flags": {}, - "order": 26, + "order": 27, "mode": 0, "inputs": [ { @@ -1278,7 +1178,7 @@ "1": 314 }, "flags": {}, - "order": 6, + "order": 5, "mode": 0, "outputs": [ { @@ -1319,7 +1219,7 @@ "1": 314 }, "flags": {}, - "order": 7, + "order": 6, "mode": 0, "outputs": [ { @@ -1350,82 +1250,174 @@ ] }, { - "id": 157, - "type": "PreviewImage", + "id": 3, + "type": "KSampler", "pos": [ - -610, - -240 + 757, + 831 ], "size": { - "0": 336, - "1": 246 + "0": 315, + "1": 446 }, "flags": {}, - "order": 28, - "mode": 2, + "order": 31, + "mode": 0, "inputs": [ { - "name": "images", - "type": "IMAGE", - "link": 292 + "name": "model", + "type": "MODEL", + "link": 263 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 298, + "slot_index": 1 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 299 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 306 + }, + { + "name": "seed", + "type": "INT", + "link": 260, + "widget": { + "name": "seed" + } } ], - "title": "Preview Image | id:preprocessor_output_2", + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 78, + 278 + ], + "slot_index": 0 + } + ], + "title": "KSampler | id:sampler", "properties": { - "Node name for S&R": "PreviewImage" - } + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 109789101278740, + "randomize", + 20, + 7, + "euler_ancestral", + "karras", + 0.71 + ] }, { - "id": 156, - "type": "PreviewImage", + "id": 12, + "type": "SaveImage", "pos": [ - -860, - -240 + 3162, + 1131 ], "size": { - "0": 336, - "1": 246 + "0": 407.53717041015625, + "1": 468.13226318359375 }, "flags": {}, - "order": 27, - "mode": 2, + "order": 37, + "mode": 0, "inputs": [ { "name": "images", "type": "IMAGE", - "link": 291 + "link": 17 } ], - "title": "Preview Image | id:preprocessor_output_1", - "properties": { - "Node name for S&R": "PreviewImage" - } + "title": "Save Image | id:hires_output", + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] }, { - "id": 158, - "type": "PreviewImage", + "id": 141, + "type": "APS_Seed", "pos": [ - -370, - -240 + 359, + 532 ], "size": { - "0": 336, - "1": 246 + "0": 361.20001220703125, + "1": 82 }, "flags": {}, - "order": 29, - "mode": 2, - "inputs": [ + "order": 7, + "mode": 0, + "outputs": [ { - "name": "images", - "type": "IMAGE", - "link": 293 + "name": "s", + "type": "INT", + "links": [ + 259, + 260 + ], + "shape": 3, + "slot_index": 0 } ], - "title": "Preview Image | id:preprocessor_output_3", + "title": "Auto-Photoshop-SD Seed | id:first_pass_seed", "properties": { - "Node name for S&R": "PreviewImage" - } + "Node name for S&R": "APS_Seed" + }, + "widgets_values": [ + 519416762507340, + "fixed" + ] + }, + { + "id": 121, + "type": "Reroute", + "pos": [ + 2069, + 410 + ], + "size": [ + 90.4, + 26 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 290 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 305 + ], + "slot_index": 0 + } + ], + "properties": { + "showOutputText": true, + "horizontal": false + }, + "color": "#223", + "bgcolor": "#335" }, { "id": 135, @@ -1530,53 +1522,29 @@ "original", 512, 768, - 771262702963796, + 933689295201272, "randomize" ] }, { - "id": 3, - "type": "KSampler", + "id": 160, + "type": "RepeatLatentBatch", "pos": [ - 757, - 831 + 1752, + 517 ], "size": { "0": 315, - "1": 446 + "1": 58 }, "flags": {}, - "order": 30, + "order": 26, "mode": 0, "inputs": [ { - "name": "model", - "type": "MODEL", - "link": 263 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 298, - "slot_index": 1 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 299 - }, - { - "name": "latent_image", + "name": "samples", "type": "LATENT", - "link": 217 - }, - { - "name": "seed", - "type": "INT", - "link": 260, - "widget": { - "name": "seed" - } + "link": 305 } ], "outputs": [ @@ -1584,25 +1552,97 @@ "name": "LATENT", "type": "LATENT", "links": [ - 78, - 278 + 306 ], + "shape": 3, "slot_index": 0 } ], - "title": "KSampler | id:sampler", + "title": "Repeat Latent Batch | id:latent_batch", "properties": { - "Node name for S&R": "KSampler" + "Node name for S&R": "RepeatLatentBatch" }, "widgets_values": [ - 574883933962509, - "randomize", - 20, - 7, - "euler_ancestral", - "karras", - 0.71 + 1 ] + }, + { + "id": 157, + "type": "PreviewImage", + "pos": [ + -610, + -240 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 292 + } + ], + "title": "Preview Image | id:preprocessor_output_2", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 158, + "type": "PreviewImage", + "pos": [ + -370, + -240 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 293 + } + ], + "title": "Preview Image | id:preprocessor_output_3", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 156, + "type": "PreviewImage", + "pos": [ + -860, + -240 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 291 + } + ], + "title": "Preview Image | id:preprocessor_output_1", + "properties": { + "Node name for S&R": "PreviewImage" + } } ], "links": [ @@ -1798,14 +1838,6 @@ 0, "*" ], - [ - 217, - 121, - 0, - 3, - 3, - "LATENT" - ], [ 247, 115, @@ -2021,6 +2053,22 @@ 159, 3, "IMAGE" + ], + [ + 305, + 121, + 0, + 160, + 0, + "LATENT" + ], + [ + 306, + 160, + 0, + 3, + 3, + "LATENT" ] ], "groups": [ diff --git a/typescripts/comfyui/inpaint_workflow_v0.0.10 (1).json b/typescripts/comfyui/inpaint_workflow_v0.0.10 (1).json deleted file mode 100644 index 4b292de..0000000 --- a/typescripts/comfyui/inpaint_workflow_v0.0.10 (1).json +++ /dev/null @@ -1,2091 +0,0 @@ -{ - "last_node_id": 159, - "last_link_id": 304, - "nodes": [ - { - "id": 13, - "type": "VAEDecode", - "pos": [ - 2680, - 940 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 35, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 15 - }, - { - "name": "vae", - "type": "VAE", - "link": 201 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 17 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 66, - "type": "Reroute", - "pos": [ - 160, - 1010 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 20, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 134 - } - ], - "outputs": [ - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 100 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 114, - "type": "Reroute", - "pos": [ - 960, - 1580 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 195 - } - ], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "links": [ - 196 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 116, - "type": "Reroute", - "pos": [ - 2510, - 780 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 17, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 202, - "slot_index": 0 - } - ], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "links": [ - 201 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 113, - "type": "Reroute", - "pos": [ - 69, - 1605 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 193 - } - ], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "links": [ - 195, - 197 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1312, - 1545 - ], - "size": { - "0": 210, - "1": 46 - }, - "flags": {}, - "order": 32, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 278 - }, - { - "name": "vae", - "type": "VAE", - "link": 196 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 9 - ], - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "VAEDecode" - } - }, - { - "id": 115, - "type": "Reroute", - "pos": [ - 369, - 420 - ], - "size": [ - 75, - 26 - ], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 197 - } - ], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "links": [ - 202, - 247 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 55, - "type": "LatentUpscaleBy", - "pos": [ - 1876, - 1198 - ], - "size": { - "0": 315, - "1": 82 - }, - "flags": {}, - "order": 31, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 78 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 79 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Upscale Latent By | id:scaler", - "properties": { - "Node name for S&R": "LatentUpscaleBy" - }, - "widgets_values": [ - "nearest-exact", - 2 - ] - }, - { - "id": 11, - "type": "KSampler", - "pos": [ - 2227, - 1000 - ], - "size": { - "0": 315, - "1": 474 - }, - "flags": {}, - "order": 33, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 95, - "slot_index": 0 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 12, - "slot_index": 1 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 13, - "slot_index": 2 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 79, - "slot_index": 3 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 15 - ], - "slot_index": 0 - } - ], - "title": "KSampler | id:hires_sampler", - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 4820153955672, - "fixed", - 20, - 8, - "dpmpp_2m", - "simple", - 0.4 - ] - }, - { - "id": 65, - "type": "Reroute", - "pos": [ - 190, - 920 - ], - "size": [ - 82, - 26 - ], - "flags": {}, - "order": 19, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 133 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 95, - 263 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - } - }, - { - "id": 78, - "type": "LoadLorasFromPrompt", - "pos": [ - -2610, - 1250 - ], - "size": { - "0": 462, - "1": 200 - }, - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 141 - }, - { - "name": "clip", - "type": "CLIP", - "link": 139 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 140 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 138 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "STRING", - "type": "STRING", - "links": [ - 137 - ], - "shape": 3, - "slot_index": 2 - } - ], - "title": "Load Loras From Prompt | id:multi_loras_negative_prompt", - "properties": { - "Node name for S&R": "LoadLorasFromPrompt" - }, - "widgets_values": [ - "bad hands, text, watermark" - ] - }, - { - "id": 57, - "type": "VAELoader", - "pos": [ - -396, - 1595 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 0, - "mode": 0, - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "links": [ - 193 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Load VAE | id:vae", - "properties": { - "Node name for S&R": "VAELoader" - }, - "widgets_values": [ - "vae-ft-mse-840000-ema-pruned.safetensors" - ] - }, - { - "id": 142, - "type": "PreviewImage", - "pos": [ - 2490, - 150 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 23, - "mode": 2, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 261 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 149, - "type": "PreviewImage", - "pos": [ - 2250, - 450 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 24, - "mode": 2, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 277 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 141, - "type": "APS_Seed", - "pos": [ - 359, - 532 - ], - "size": { - "0": 361.20001220703125, - "1": 82 - }, - "flags": {}, - "order": 1, - "mode": 0, - "outputs": [ - { - "name": "s", - "type": "INT", - "links": [ - 259, - 260 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Auto-Photoshop-SD Seed | id:first_pass_seed", - "properties": { - "Node name for S&R": "APS_Seed" - }, - "widgets_values": [ - 370804183246305, - "randomize" - ] - }, - { - "id": 121, - "type": "Reroute", - "pos": [ - 2069, - 410 - ], - "size": [ - 90.4, - 26 - ], - "flags": {}, - "order": 21, - "mode": 0, - "inputs": [ - { - "name": "", - "type": "*", - "link": 290 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 217 - ], - "slot_index": 0 - } - ], - "properties": { - "showOutputText": true, - "horizontal": false - }, - "color": "#223", - "bgcolor": "#335" - }, - { - "id": 148, - "type": "PreviewImage", - "pos": [ - 2270, - -116 - ], - "size": { - "0": 210, - "1": 246 - }, - "flags": {}, - "order": 22, - "mode": 2, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 276 - } - ], - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 155, - "type": "EmptyLatentImage", - "pos": [ - 1329.5197187499998, - 447.17789685058585 - ], - "size": { - "0": 315, - "1": 106 - }, - "flags": {}, - "order": 2, - "mode": 0, - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "EmptyLatentImage" - }, - "widgets_values": [ - 512, - 768, - 1 - ] - }, - { - "id": 76, - "type": "LoadLorasFromPrompt", - "pos": [ - -2600, - 980 - ], - "size": { - "0": 462, - "1": 200 - }, - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 140 - }, - { - "name": "clip", - "type": "CLIP", - "link": 132 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 133 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 134 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "STRING", - "type": "STRING", - "links": [ - 135 - ], - "shape": 3, - "slot_index": 2 - } - ], - "title": "Load Loras From Prompt | id:multi_loras_positive_prompt", - "properties": { - "Node name for S&R": "LoadLorasFromPrompt" - }, - "widgets_values": [ - "young teen:1.2, (cute black girl:1.2)" - ] - }, - { - "id": 6, - "type": "CLIPTextEncode", - "pos": [ - -1740, - 820 - ], - "size": { - "0": 422.84503173828125, - "1": 164.31304931640625 - }, - "flags": {}, - "order": 25, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 100 - }, - { - "name": "text", - "type": "STRING", - "link": 135, - "widget": { - "name": "text" - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 12, - 294 - ], - "slot_index": 0 - } - ], - "title": "CLIP Text Encode (Prompt) | id:positive_prompt", - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "lora_bright_style girl" - ] - }, - { - "id": 7, - "type": "CLIPTextEncode", - "pos": [ - -1760, - 1050 - ], - "size": { - "0": 425.27801513671875, - "1": 180.6060791015625 - }, - "flags": {}, - "order": 16, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 138 - }, - { - "name": "text", - "type": "STRING", - "link": 137, - "widget": { - "name": "text" - } - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 13, - 295 - ], - "slot_index": 0 - } - ], - "title": "CLIP Text Encode (Prompt) | id:negative_prompt", - "properties": { - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "bad hands, text, watermark\n" - ] - }, - { - "id": 126, - "type": "Integer", - "pos": [ - 500, - 80 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 3, - "mode": 0, - "outputs": [ - { - "name": "INT", - "type": "INT", - "links": [ - 253 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Integer| id:width", - "properties": { - "Node name for S&R": "Integer" - }, - "widgets_values": [ - 512 - ] - }, - { - "id": 127, - "type": "Integer", - "pos": [ - 500, - 200 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 4, - "mode": 0, - "outputs": [ - { - "name": "INT", - "type": "INT", - "links": [ - 254 - ], - "shape": 3, - "slot_index": 0 - } - ], - "title": "Integer | id:height", - "properties": { - "Node name for S&R": "Integer" - }, - "widgets_values": [ - 768 - ] - }, - { - "id": 159, - "type": "ControlNetScript", - "pos": [ - -1160, - 70 - ], - "size": { - "0": 506.0240173339844, - "1": 678 - }, - "flags": {}, - "order": 26, - "mode": 0, - "inputs": [ - { - "name": "positive", - "type": "CONDITIONING", - "link": 294 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 295, - "slot_index": 1 - }, - { - "name": "image_1", - "type": "IMAGE", - "link": 296 - }, - { - "name": "mask_1", - "type": "IMAGE", - "link": 304, - "slot_index": 3 - }, - { - "name": "image_2", - "type": "IMAGE", - "link": 303 - }, - { - "name": "mask_2", - "type": "IMAGE", - "link": 302 - }, - { - "name": "image_3", - "type": "IMAGE", - "link": null - }, - { - "name": "mask_3", - "type": "IMAGE", - "link": null - } - ], - "outputs": [ - { - "name": "preprocessed_image_1", - "type": "IMAGE", - "links": [ - 291 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "preprocessed_image_2", - "type": "IMAGE", - "links": [ - 292 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "preprocessed_image_3", - "type": "IMAGE", - "links": [ - 293 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "positive", - "type": "CONDITIONING", - "links": [ - 298 - ], - "shape": 3, - "slot_index": 3 - }, - { - "name": "negative", - "type": "CONDITIONING", - "links": [ - 299 - ], - "shape": 3, - "slot_index": 4 - } - ], - "title": "ControlNet Script | id:controlnet_script", - "properties": { - "Node name for S&R": "ControlNetScript" - }, - "widgets_values": [ - "disable", - "OpenposePreprocessor", - "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", - 1, - 0, - 1, - 512, - "disable", - "InpaintPreprocessor", - "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", - 1, - 0, - 1, - 512, - "disable", - "InpaintPreprocessor", - "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", - 1, - 0, - 1, - 512 - ] - }, - { - "id": 147, - "type": "ImageScale", - "pos": [ - -1070, - -680 - ], - "size": { - "0": 315, - "1": 130 - }, - "flags": {}, - "order": 11, - "mode": 4, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 274 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 296, - 303 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ImageScale" - }, - "widgets_values": [ - "nearest-exact", - 512, - 768, - "disabled" - ] - }, - { - "id": 152, - "type": "ImageScale", - "pos": [ - -1030, - -1050 - ], - "size": { - "0": 315, - "1": 130 - }, - "flags": {}, - "order": 9, - "mode": 4, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 282 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 283, - 302, - 304 - ], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ImageScale" - }, - "widgets_values": [ - "nearest-exact", - 512, - 768, - "disabled" - ] - }, - { - "id": 153, - "type": "ImageToMask", - "pos": [ - -720, - -840 - ], - "size": { - "0": 315, - "1": 58 - }, - "flags": {}, - "order": 14, - "mode": 4, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 283 - } - ], - "outputs": [ - { - "name": "MASK", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 0 - } - ], - "properties": { - "Node name for S&R": "ImageToMask" - }, - "widgets_values": [ - "red" - ] - }, - { - "id": 83, - "type": "LoadImage", - "pos": [ - 601, - -277 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 5, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 257, - 282 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": [], - "shape": 3, - "slot_index": 1 - } - ], - "title": "Load Image | id:mask_image", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "pasted/image (14).png", - "image" - ] - }, - { - "id": 3, - "type": "KSampler", - "pos": [ - 757, - 831 - ], - "size": { - "0": 315, - "1": 446 - }, - "flags": {}, - "order": 30, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 263 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 298, - "slot_index": 1 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 299 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 217 - }, - { - "name": "seed", - "type": "INT", - "link": 260, - "widget": { - "name": "seed" - } - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 78, - 278 - ], - "slot_index": 0 - } - ], - "title": "KSampler | id:sampler", - "properties": { - "Node name for S&R": "KSampler" - }, - "widgets_values": [ - 520196330675958, - "randomize", - 20, - 7, - "euler_ancestral", - "karras", - 1 - ] - }, - { - "id": 135, - "type": "ContentMaskLatent", - "pos": [ - 1312, - 89 - ], - "size": { - "0": 418.1999816894531, - "1": 214 - }, - "flags": {}, - "order": 18, - "mode": 0, - "inputs": [ - { - "name": "init_image", - "type": "IMAGE", - "link": 258 - }, - { - "name": "mask", - "type": "IMAGE", - "link": 257 - }, - { - "name": "vae", - "type": "VAE", - "link": 247, - "slot_index": 2 - }, - { - "name": "width", - "type": "INT", - "link": 253, - "widget": { - "name": "width" - }, - "slot_index": 3 - }, - { - "name": "height", - "type": "INT", - "link": 254, - "widget": { - "name": "height" - } - }, - { - "name": "seed", - "type": "INT", - "link": 259, - "widget": { - "name": "seed" - } - } - ], - "outputs": [ - { - "name": "latents", - "type": "LATENT", - "links": [ - 290 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "original_preview", - "type": "IMAGE", - "links": [ - 276 - ], - "shape": 3, - "slot_index": 1 - }, - { - "name": "latent_noise_preview", - "type": "IMAGE", - "links": [ - 261 - ], - "shape": 3, - "slot_index": 2 - }, - { - "name": "latent_nothing_preview", - "type": "IMAGE", - "links": [ - 277 - ], - "shape": 3, - "slot_index": 3 - } - ], - "title": "Content Mask Latent | id:content_mask_latent", - "properties": { - "Node name for S&R": "ContentMaskLatent" - }, - "widgets_values": [ - "latent_nothing", - 512, - 768, - 282350396232002, - "randomize" - ] - }, - { - "id": 16, - "type": "CheckpointLoaderSimple", - "pos": [ - -3105, - 1139 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 6, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 141 - ], - "slot_index": 0 - }, - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 132, - 139 - ], - "slot_index": 1 - }, - { - "name": "VAE", - "type": "VAE", - "links": [], - "slot_index": 2 - } - ], - "title": "Load Checkpoint | id:checkpoint", - "properties": { - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "dreamshaper_8Inpainting.safetensors" - ] - }, - { - "id": 12, - "type": "SaveImage", - "pos": [ - 3162, - 1131 - ], - "size": { - "0": 407.53717041015625, - "1": 468.13226318359375 - }, - "flags": {}, - "order": 36, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 17 - } - ], - "title": "Save Image | id:hires_output", - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 1546, - 1609 - ], - "size": { - "0": 277.20001220703125, - "1": 282.4336242675781 - }, - "flags": {}, - "order": 34, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 9 - } - ], - "title": "Save Image | id:first_pass_output", - "properties": {}, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 58, - "type": "LoadImage", - "pos": [ - 933, - -569 - ], - "size": { - "0": 315, - "1": 314 - }, - "flags": {}, - "order": 7, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 258, - 274 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "title": "Load Image | id:init_image", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "pasted/image (13).png", - "image" - ] - }, - { - "id": 156, - "type": "PreviewImage", - "pos": [ - -860, - -240 - ], - "size": { - "0": 336, - "1": 246 - }, - "flags": {}, - "order": 27, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 291 - } - ], - "title": "Preview Image | id:preprocessor_output_1", - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 157, - "type": "PreviewImage", - "pos": [ - -610, - -240 - ], - "size": { - "0": 336, - "1": 246 - }, - "flags": {}, - "order": 28, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 292 - } - ], - "title": "Preview Image | id:preprocessor_output_2", - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 158, - "type": "PreviewImage", - "pos": [ - -370, - -240 - ], - "size": { - "0": 336, - "1": 246 - }, - "flags": {}, - "order": 29, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 293 - } - ], - "title": "Preview Image | id:preprocessor_output_3", - "properties": { - "Node name for S&R": "PreviewImage" - } - } - ], - "links": [ - [ - 9, - 8, - 0, - 9, - 0, - "IMAGE" - ], - [ - 12, - 6, - 0, - 11, - 1, - "CONDITIONING" - ], - [ - 13, - 7, - 0, - 11, - 2, - "CONDITIONING" - ], - [ - 15, - 11, - 0, - 13, - 0, - "LATENT" - ], - [ - 17, - 13, - 0, - 12, - 0, - "IMAGE" - ], - [ - 78, - 3, - 0, - 55, - 0, - "LATENT" - ], - [ - 79, - 55, - 0, - 11, - 3, - "LATENT" - ], - [ - 95, - 65, - 0, - 11, - 0, - "MODEL" - ], - [ - 100, - 66, - 0, - 6, - 0, - "CLIP" - ], - [ - 132, - 16, - 1, - 76, - 1, - "CLIP" - ], - [ - 133, - 76, - 0, - 65, - 0, - "*" - ], - [ - 134, - 76, - 1, - 66, - 0, - "*" - ], - [ - 135, - 76, - 2, - 6, - 1, - "STRING" - ], - [ - 137, - 78, - 2, - 7, - 1, - "STRING" - ], - [ - 138, - 78, - 1, - 7, - 0, - "CLIP" - ], - [ - 139, - 16, - 1, - 78, - 1, - "CLIP" - ], - [ - 140, - 78, - 0, - 76, - 0, - "MODEL" - ], - [ - 141, - 16, - 0, - 78, - 0, - "MODEL" - ], - [ - 193, - 57, - 0, - 113, - 0, - "*" - ], - [ - 195, - 113, - 0, - 114, - 0, - "*" - ], - [ - 196, - 114, - 0, - 8, - 1, - "VAE" - ], - [ - 197, - 113, - 0, - 115, - 0, - "*" - ], - [ - 201, - 116, - 0, - 13, - 1, - "VAE" - ], - [ - 202, - 115, - 0, - 116, - 0, - "*" - ], - [ - 217, - 121, - 0, - 3, - 3, - "LATENT" - ], - [ - 247, - 115, - 0, - 135, - 2, - "VAE" - ], - [ - 253, - 126, - 0, - 135, - 3, - "INT" - ], - [ - 254, - 127, - 0, - 135, - 4, - "INT" - ], - [ - 257, - 83, - 0, - 135, - 1, - "IMAGE" - ], - [ - 258, - 58, - 0, - 135, - 0, - "IMAGE" - ], - [ - 259, - 141, - 0, - 135, - 5, - "INT" - ], - [ - 260, - 141, - 0, - 3, - 4, - "INT" - ], - [ - 261, - 135, - 2, - 142, - 0, - "IMAGE" - ], - [ - 263, - 65, - 0, - 3, - 0, - "MODEL" - ], - [ - 274, - 58, - 0, - 147, - 0, - "IMAGE" - ], - [ - 276, - 135, - 1, - 148, - 0, - "IMAGE" - ], - [ - 277, - 135, - 3, - 149, - 0, - "IMAGE" - ], - [ - 278, - 3, - 0, - 8, - 0, - "LATENT" - ], - [ - 282, - 83, - 0, - 152, - 0, - "IMAGE" - ], - [ - 283, - 152, - 0, - 153, - 0, - "IMAGE" - ], - [ - 290, - 135, - 0, - 121, - 0, - "*" - ], - [ - 291, - 159, - 0, - 156, - 0, - "IMAGE" - ], - [ - 292, - 159, - 1, - 157, - 0, - "IMAGE" - ], - [ - 293, - 159, - 2, - 158, - 0, - "IMAGE" - ], - [ - 294, - 6, - 0, - 159, - 0, - "CONDITIONING" - ], - [ - 295, - 7, - 0, - 159, - 1, - "CONDITIONING" - ], - [ - 296, - 147, - 0, - 159, - 2, - "IMAGE" - ], - [ - 298, - 159, - 3, - 3, - 1, - "CONDITIONING" - ], - [ - 299, - 159, - 4, - 3, - 2, - "CONDITIONING" - ], - [ - 302, - 152, - 0, - 159, - 5, - "IMAGE" - ], - [ - 303, - 147, - 0, - 159, - 4, - "IMAGE" - ], - [ - 304, - 152, - 0, - 159, - 3, - "IMAGE" - ] - ], - "groups": [ - { - "title": "Txt2Img", - "bounding": [ - 433, - 692, - 1386, - 1295 - ], - "color": "#a1309b", - "font_size": 24, - "locked": false - }, - { - "title": "Save Intermediate Image", - "bounding": [ - 1283, - 1497, - 529, - 440 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - }, - { - "title": "Hires Fix", - "bounding": [ - 1864, - 887, - 762, - 544 - ], - "color": "#b58b2a", - "font_size": 24, - "locked": false - }, - { - "title": "Save Final Image", - "bounding": [ - 2671, - 785, - 976, - 856 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - }, - { - "title": "inpaint workflow", - "bounding": [ - -248, - -966, - 697, - 249 - ], - "color": "#3f789e", - "font_size": 24, - "locked": false - } - ], - "config": {}, - "extra": {}, - "version": 0.4 -} \ No newline at end of file diff --git a/typescripts/comfyui/main_ui.tsx b/typescripts/comfyui/main_ui.tsx index e8b2e39..4bb204f 100644 --- a/typescripts/comfyui/main_ui.tsx +++ b/typescripts/comfyui/main_ui.tsx @@ -4,8 +4,8 @@ import txt2img_api from './txt2img_api_v0.0.6.json' import img2img from './img2img_workflow_v0.0.6.json' import img2img_api from './img2img_api_v0.0.6.json' -import inpaint from './inpaint_workflow_v0.0.10.json' -import inpaint_api from './inpaint_api_v0.0.10.json' +import inpaint from './inpaint_workflow.json' +import inpaint_api from './inpaint_api.json' import vae_settings from '../settings/vae' import sd_tab_util from '../sd_tab/util' @@ -196,7 +196,7 @@ const inpaint_map: Record = { vae: 'vae.vae_name', width: 'width.Value', height: 'height.Value', - // batch_size: 'latent_batch.amount', + batch_size: 'latent_batch.amount', // prompt: 'positive_prompt.text', prompt: 'multi_loras_positive_prompt.prompt', negative_prompt: 'multi_loras_negative_prompt.prompt',