diff --git a/typescripts/comfyui/img2img_api_v0.0.6.json b/typescripts/comfyui/img2img_api.json similarity index 90% rename from typescripts/comfyui/img2img_api_v0.0.6.json rename to typescripts/comfyui/img2img_api.json index edd9f45..9ea4f23 100644 --- a/typescripts/comfyui/img2img_api_v0.0.6.json +++ b/typescripts/comfyui/img2img_api.json @@ -199,8 +199,8 @@ 0 ], "clip": [ - "16", - 1 + "109", + 0 ] }, "class_type": "LoadLorasFromPrompt" @@ -213,19 +213,12 @@ 0 ], "clip": [ - "16", - 1 + "109", + 0 ] }, "class_type": "LoadLorasFromPrompt" }, - "87": { - "inputs": { - "image": "ComfyUI_temp_cqoqp_00001_.png", - "choose file to upload": "image" - }, - "class_type": "LoadImage" - }, "88": { "inputs": { "images": [ @@ -255,17 +248,21 @@ }, "91": { "inputs": { - "is_enabled_1": "enable", + "is_enabled_1": "disable", "preprocessor_name_1": "CannyEdgePreprocessor", "control_net_name_1": "control_lora_rank128_v11p_sd15_canny_fp16.safetensors", "strength_1": 1, + "threshold_a_1": 100, + "threshold_b_1": 200, "start_percent_1": 0, "end_percent_1": 1, "resolution_1": 512, "is_enabled_2": "disable", - "preprocessor_name_2": "CannyEdgePreprocessor", - "control_net_name_2": "control_lora_rank128_v11e_sd15_ip2p_fp16.safetensors", + "preprocessor_name_2": "OpenposePreprocessor", + "control_net_name_2": "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", "strength_2": 1, + "threshold_a_2": 0, + "threshold_b_2": 0, "start_percent_2": 0, "end_percent_2": 1, "resolution_2": 512, @@ -273,6 +270,8 @@ "preprocessor_name_3": "InpaintPreprocessor", "control_net_name_3": "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", "strength_3": 1, + "threshold_a_3": 0, + "threshold_b_3": 0, "start_percent_3": 0, "end_percent_3": 1, "resolution_3": 512, @@ -283,12 +282,18 @@ "negative": [ "7", 0 - ], - "image_1": [ - "87", - 0 ] }, "class_type": "ControlNetScript" + }, + "109": { + "inputs": { + "stop_at_clip_layer": -1, + "clip": [ + "16", + 1 + ] + }, + "class_type": "CLIPSetLastLayer" } } \ No newline at end of file diff --git a/typescripts/comfyui/img2img_workflow_v0.0.6.json b/typescripts/comfyui/img2img_workflow.json similarity index 96% rename from typescripts/comfyui/img2img_workflow_v0.0.6.json rename to typescripts/comfyui/img2img_workflow.json index 87a1c6a..8776d70 100644 --- a/typescripts/comfyui/img2img_workflow_v0.0.6.json +++ b/typescripts/comfyui/img2img_workflow.json @@ -1,6 +1,6 @@ { - "last_node_id": 107, - "last_link_id": 200, + "last_node_id": 109, + "last_link_id": 204, "nodes": [ { "id": 8, @@ -14,7 +14,7 @@ "1": 46 }, "flags": {}, - "order": 31, + "order": 32, "mode": 0, "inputs": [ { @@ -54,7 +54,7 @@ "1": 46 }, "flags": {}, - "order": 35, + "order": 36, "mode": 0, "inputs": [ { @@ -94,7 +94,7 @@ 26 ], "flags": {}, - "order": 20, + "order": 21, "mode": 0, "inputs": [ { @@ -201,7 +201,7 @@ 26 ], "flags": {}, - "order": 19, + "order": 20, "mode": 0, "inputs": [ { @@ -238,7 +238,7 @@ "1": 200 }, "flags": {}, - "order": 16, + "order": 17, "mode": 0, "inputs": [ { @@ -249,7 +249,7 @@ { "name": "clip", "type": "CLIP", - "link": 139 + "link": 204 } ], "outputs": [ @@ -301,7 +301,7 @@ "1": 262 }, "flags": {}, - "order": 34, + "order": 35, "mode": 0, "inputs": [ { @@ -353,69 +353,6 @@ 0.4 ] }, - { - "id": 76, - "type": "LoadLorasFromPrompt", - "pos": [ - -283, - 168 - ], - "size": { - "0": 462, - "1": 200 - }, - "flags": {}, - "order": 17, - "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": [ - "" - ] - }, { "id": 85, "type": "Reroute", @@ -428,7 +365,7 @@ 26 ], "flags": {}, - "order": 29, + "order": 30, "mode": 0, "inputs": [ { @@ -466,7 +403,7 @@ "1": 180.6060791015625 }, "flags": {}, - "order": 18, + "order": 19, "mode": 0, "inputs": [ { @@ -513,7 +450,7 @@ 26 ], "flags": {}, - "order": 28, + "order": 29, "mode": 0, "inputs": [ { @@ -551,7 +488,7 @@ "1": 82 }, "flags": {}, - "order": 32, + "order": 33, "mode": 0, "inputs": [ { @@ -580,48 +517,6 @@ 2 ] }, - { - "id": 94, - "type": "LoadImage", - "pos": [ - -1920, - -1670 - ], - "size": { - "0": 285.6000061035156, - "1": 314 - }, - "flags": { - "collapsed": false - }, - "order": 1, - "mode": 2, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 166 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "title": "Load Image | id:controlnet_image_2", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "AnimateDiff_00005_ (1) (2).gif", - "image" - ] - }, { "id": 93, "type": "LoadImage", @@ -634,7 +529,7 @@ "1": 314 }, "flags": {}, - "order": 2, + "order": 1, "mode": 2, "outputs": [ { @@ -662,46 +557,6 @@ "image" ] }, - { - "id": 96, - "type": "LoadImage", - "pos": [ - -2060, - -1240 - ], - "size": { - "0": 285.6000061035156, - "1": 314 - }, - "flags": {}, - "order": 3, - "mode": 2, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 168 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "title": "Load Image | id:controlnet_image_3", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "AnimateDiff_00005_ (1) (2).gif", - "image" - ] - }, { "id": 95, "type": "LoadImage", @@ -714,7 +569,7 @@ "1": 314 }, "flags": {}, - "order": 4, + "order": 2, "mode": 2, "outputs": [ { @@ -742,53 +597,6 @@ "image" ] }, - { - "id": 16, - "type": "CheckpointLoaderSimple", - "pos": [ - -1297, - 369 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 5, - "mode": 0, - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "links": [ - 192 - ], - "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_8.safetensors" - ] - }, { "id": 6, "type": "CLIPTextEncode", @@ -801,7 +609,7 @@ "1": 164.31304931640625 }, "flags": {}, - "order": 21, + "order": 22, "mode": 0, "inputs": [ { @@ -848,7 +656,7 @@ "1": 58 }, "flags": {}, - "order": 15, + "order": 16, "mode": 0, "inputs": [ { @@ -888,7 +696,7 @@ "1": 102 }, "flags": {}, - "order": 22, + "order": 23, "mode": 4, "inputs": [ { @@ -934,7 +742,7 @@ "1": 282.4336242675781 }, "flags": {}, - "order": 33, + "order": 34, "mode": 0, "inputs": [ { @@ -960,7 +768,7 @@ "1": 102 }, "flags": {}, - "order": 27, + "order": 28, "mode": 4, "inputs": [ { @@ -1007,7 +815,7 @@ "1": 166 }, "flags": {}, - "order": 14, + "order": 15, "mode": 4, "inputs": [ { @@ -1075,7 +883,7 @@ "1": 58 }, "flags": {}, - "order": 6, + "order": 3, "mode": 4, "outputs": [ { @@ -1150,7 +958,7 @@ "1": 46 }, "flags": {}, - "order": 13, + "order": 14, "mode": 0, "inputs": [ { @@ -1191,7 +999,7 @@ "1": 106 }, "flags": {}, - "order": 7, + "order": 4, "mode": 2, "outputs": [ { @@ -1223,7 +1031,7 @@ "1": 262 }, "flags": {}, - "order": 30, + "order": 31, "mode": 0, "inputs": [ { @@ -1286,7 +1094,7 @@ "flags": { "collapsed": false }, - "order": 8, + "order": 5, "mode": 2, "outputs": [ { @@ -1314,48 +1122,6 @@ "image" ] }, - { - "id": 87, - "type": "LoadImage", - "pos": [ - -2310, - -2188 - ], - "size": { - "0": 306.4342346191406, - "1": 314 - }, - "flags": { - "collapsed": false - }, - "order": 9, - "mode": 0, - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 164 - ], - "shape": 3, - "slot_index": 0 - }, - { - "name": "MASK", - "type": "MASK", - "links": null, - "shape": 3 - } - ], - "title": "Load Image | id:controlnet_image_1", - "properties": { - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "ComfyUI_temp_cqoqp_00001_.png", - "image" - ] - }, { "id": 58, "type": "LoadImage", @@ -1368,7 +1134,7 @@ "1": 314 }, "flags": {}, - "order": 10, + "order": 6, "mode": 0, "outputs": [ { @@ -1396,19 +1162,124 @@ "image" ] }, + { + "id": 89, + "type": "PreviewImage", + "pos": [ + -280, + -1260 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 162 + } + ], + "title": "Preview Image | id:preprocessor_output_2", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 90, + "type": "PreviewImage", + "pos": [ + -40, + -1260 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 163 + } + ], + "title": "Preview Image | id:preprocessor_output_3", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 88, + "type": "PreviewImage", + "pos": [ + -530, + -1260 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 161 + } + ], + "title": "Preview Image | id:preprocessor_output_1", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 12, + "type": "SaveImage", + "pos": [ + 2367, + 49 + ], + "size": { + "0": 407.53717041015625, + "1": 468.13226318359375 + }, + "flags": {}, + "order": 37, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 17 + } + ], + "title": "Save Image | id:hires_output", + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, { "id": 91, "type": "ControlNetScript", "pos": [ - -1120, - -1050 + -1381, + -1042 ], "size": { "0": 506.0240173339844, - "1": 678 + "1": 822 }, "flags": {}, - "order": 23, + "order": 24, "mode": 0, "inputs": [ { @@ -1425,7 +1296,7 @@ { "name": "image_1", "type": "IMAGE", - "link": 164 + "link": 201 }, { "name": "mask_1", @@ -1506,18 +1377,22 @@ "Node name for S&R": "ControlNetScript" }, "widgets_values": [ - "enable", + "disable", "CannyEdgePreprocessor", "control_lora_rank128_v11p_sd15_canny_fp16.safetensors", 1, + 100, + 200, 0, 1, 512, "disable", - "CannyEdgePreprocessor", - "control_lora_rank128_v11e_sd15_ip2p_fp16.safetensors", + "OpenposePreprocessor", + "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", 1, 0, + 0, + 0, 1, 512, "disable", @@ -1525,113 +1400,284 @@ "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", 1, 0, + 0, + 0, 1, 512 ] }, { - "id": 89, - "type": "PreviewImage", + "id": 16, + "type": "CheckpointLoaderSimple", "pos": [ - -280, - -1260 + -1297, + 369 ], "size": { - "0": 336, - "1": 246 + "0": 315, + "1": 98 }, "flags": {}, - "order": 25, + "order": 7, "mode": 0, - "inputs": [ + "outputs": [ { - "name": "images", - "type": "IMAGE", - "link": 162 + "name": "MODEL", + "type": "MODEL", + "links": [ + 192 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 202 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [], + "slot_index": 2 } ], - "title": "Preview Image | id:preprocessor_output_2", + "title": "Load Checkpoint | id:checkpoint", "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 90, - "type": "PreviewImage", - "pos": [ - -40, - -1260 - ], - "size": { - "0": 336, - "1": 246 + "Node name for S&R": "CheckpointLoaderSimple" }, - "flags": {}, - "order": 26, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 163 - } - ], - "title": "Preview Image | id:preprocessor_output_3", - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 88, - "type": "PreviewImage", - "pos": [ - -530, - -1260 - ], - "size": { - "0": 336, - "1": 246 - }, - "flags": {}, - "order": 24, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 161 - } - ], - "title": "Preview Image | id:preprocessor_output_1", - "properties": { - "Node name for S&R": "PreviewImage" - } - }, - { - "id": 12, - "type": "SaveImage", - "pos": [ - 2367, - 49 - ], - "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" + "dreamshaper_8.safetensors" + ] + }, + { + "id": 76, + "type": "LoadLorasFromPrompt", + "pos": [ + -283, + 168 + ], + "size": { + "0": 462, + "1": 200 + }, + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 140 + }, + { + "name": "clip", + "type": "CLIP", + "link": 203 + } + ], + "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": [ + "" + ] + }, + { + "id": 109, + "type": "CLIPSetLastLayer", + "pos": [ + -845.5936890258794, + 460.91404269409134 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 202 + } + ], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 203, + 204 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "CLIP Set Last Layer | id:clip_skip", + "properties": { + "Node name for S&R": "CLIPSetLastLayer" + }, + "widgets_values": [ + -1 + ] + }, + { + "id": 87, + "type": "LoadImage", + "pos": [ + -2310, + -2190 + ], + "size": { + "0": 306.4342346191406, + "1": 314 + }, + "flags": { + "collapsed": false + }, + "order": 8, + "mode": 2, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 201 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "title": "Load Image | id:controlnet_image_1", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "ComfyUI_temp_cqoqp_00001_.png", + "image" + ] + }, + { + "id": 94, + "type": "LoadImage", + "pos": [ + -1920, + -1670 + ], + "size": { + "0": 285.6000061035156, + "1": 314 + }, + "flags": { + "collapsed": false + }, + "order": 9, + "mode": 2, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 166 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "title": "Load Image | id:controlnet_image_2", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "AnimateDiff_00005_ (1) (2).gif", + "image" + ] + }, + { + "id": 96, + "type": "LoadImage", + "pos": [ + -2060, + -1240 + ], + "size": { + "0": 285.6000061035156, + "1": 314 + }, + "flags": {}, + "order": 10, + "mode": 2, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 168 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "title": "Load Image | id:controlnet_image_3", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "AnimateDiff_00005_ (1) (2).gif", + "image" ] } ], @@ -1756,14 +1802,6 @@ 0, "CLIP" ], - [ - 132, - 16, - 1, - 76, - 1, - "CLIP" - ], [ 133, 76, @@ -1804,14 +1842,6 @@ 0, "CLIP" ], - [ - 139, - 16, - 1, - 78, - 1, - "CLIP" - ], [ 140, 78, @@ -1884,14 +1914,6 @@ 0, "IMAGE" ], - [ - 164, - 87, - 0, - 91, - 2, - "IMAGE" - ], [ 165, 92, @@ -2035,6 +2057,38 @@ 63, 0, "LATENT" + ], + [ + 201, + 87, + 0, + 91, + 2, + "IMAGE" + ], + [ + 202, + 16, + 1, + 109, + 0, + "CLIP" + ], + [ + 203, + 109, + 0, + 76, + 1, + "CLIP" + ], + [ + 204, + 109, + 0, + 78, + 1, + "CLIP" ] ], "groups": [ diff --git a/typescripts/comfyui/inpaint_api.json b/typescripts/comfyui/inpaint_api.json index 33c7075..6f662ed 100644 --- a/typescripts/comfyui/inpaint_api.json +++ b/typescripts/comfyui/inpaint_api.json @@ -166,8 +166,8 @@ 0 ], "clip": [ - "16", - 1 + "162", + 0 ] }, "class_type": "LoadLorasFromPrompt" @@ -180,8 +180,8 @@ 0 ], "clip": [ - "16", - 1 + "162", + 0 ] }, "class_type": "LoadLorasFromPrompt" @@ -282,13 +282,17 @@ "preprocessor_name_1": "OpenposePreprocessor", "control_net_name_1": "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", "strength_1": 1, + "threshold_a_1": 100, + "threshold_b_1": 200, "start_percent_1": 0, "end_percent_1": 1, "resolution_1": 512, "is_enabled_2": "disable", - "preprocessor_name_2": "InpaintPreprocessor", - "control_net_name_2": "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", + "preprocessor_name_2": "OpenposePreprocessor", + "control_net_name_2": "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", "strength_2": 1, + "threshold_a_2": 0, + "threshold_b_2": 0, "start_percent_2": 0, "end_percent_2": 1, "resolution_2": 512, @@ -296,6 +300,8 @@ "preprocessor_name_3": "InpaintPreprocessor", "control_net_name_3": "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", "strength_3": 1, + "threshold_a_3": 0, + "threshold_b_3": 0, "start_percent_3": 0, "end_percent_3": 1, "resolution_3": 512, @@ -322,6 +328,14 @@ "mask_2": [ "83", 0 + ], + "image_3": [ + "58", + 0 + ], + "mask_3": [ + "83", + 0 ] }, "class_type": "ControlNetScript" @@ -335,5 +349,15 @@ ] }, "class_type": "RepeatLatentBatch" + }, + "162": { + "inputs": { + "stop_at_clip_layer": -1, + "clip": [ + "16", + 1 + ] + }, + "class_type": "CLIPSetLastLayer" } } \ No newline at end of file diff --git a/typescripts/comfyui/inpaint_workflow.json b/typescripts/comfyui/inpaint_workflow.json index 91f2cd9..2ea65f3 100644 --- a/typescripts/comfyui/inpaint_workflow.json +++ b/typescripts/comfyui/inpaint_workflow.json @@ -1,6 +1,6 @@ { - "last_node_id": 160, - "last_link_id": 306, + "last_node_id": 162, + "last_link_id": 311, "nodes": [ { "id": 13, @@ -14,7 +14,7 @@ "1": 46 }, "flags": {}, - "order": 36, + "order": 37, "mode": 0, "inputs": [ { @@ -54,7 +54,7 @@ 26 ], "flags": {}, - "order": 20, + "order": 25, "mode": 0, "inputs": [ { @@ -126,7 +126,7 @@ 26 ], "flags": {}, - "order": 17, + "order": 16, "mode": 0, "inputs": [ { @@ -200,7 +200,7 @@ "1": 46 }, "flags": {}, - "order": 33, + "order": 34, "mode": 0, "inputs": [ { @@ -277,7 +277,7 @@ "1": 82 }, "flags": {}, - "order": 32, + "order": 33, "mode": 0, "inputs": [ { @@ -318,7 +318,7 @@ "1": 474 }, "flags": {}, - "order": 34, + "order": 35, "mode": 0, "inputs": [ { @@ -382,7 +382,7 @@ 26 ], "flags": {}, - "order": 19, + "order": 24, "mode": 0, "inputs": [ { @@ -419,7 +419,7 @@ "1": 200 }, "flags": {}, - "order": 9, + "order": 15, "mode": 0, "inputs": [ { @@ -430,7 +430,7 @@ { "name": "clip", "type": "CLIP", - "link": 139 + "link": 309 } ], "outputs": [ @@ -515,7 +515,7 @@ "1": 246 }, "flags": {}, - "order": 23, + "order": 22, "mode": 2, "inputs": [ { @@ -540,7 +540,7 @@ "1": 246 }, "flags": {}, - "order": 24, + "order": 23, "mode": 2, "inputs": [ { @@ -565,7 +565,7 @@ "1": 246 }, "flags": {}, - "order": 22, + "order": 21, "mode": 2, "inputs": [ { @@ -622,7 +622,7 @@ "1": 200 }, "flags": {}, - "order": 14, + "order": 18, "mode": 0, "inputs": [ { @@ -633,7 +633,7 @@ { "name": "clip", "type": "CLIP", - "link": 132 + "link": 310 } ], "outputs": [ @@ -685,7 +685,7 @@ "1": 164.31304931640625 }, "flags": {}, - "order": 25, + "order": 27, "mode": 0, "inputs": [ { @@ -733,7 +733,7 @@ "1": 180.6060791015625 }, "flags": {}, - "order": 15, + "order": 19, "mode": 0, "inputs": [ { @@ -781,7 +781,7 @@ "1": 282.4336242675781 }, "flags": {}, - "order": 35, + "order": 36, "mode": 0, "inputs": [ { @@ -862,273 +862,6 @@ 768 ] }, - { - "id": 16, - "type": "CheckpointLoaderSimple", - "pos": [ - -3105, - 1139 - ], - "size": { - "0": 315, - "1": 98 - }, - "flags": {}, - "order": 4, - "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": [ - "aniverse_v15Pruned.safetensors" - ] - }, - { - "id": 159, - "type": "ControlNetScript", - "pos": [ - -1160, - 70 - ], - "size": { - "0": 506.0240173339844, - "1": 678 - }, - "flags": {}, - "order": 27, - "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": 10, - "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": 11, - "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", @@ -1141,7 +874,7 @@ "1": 58 }, "flags": {}, - "order": 16, + "order": 14, "mode": 4, "inputs": [ { @@ -1178,7 +911,7 @@ "1": 314 }, "flags": {}, - "order": 5, + "order": 4, "mode": 0, "outputs": [ { @@ -1219,7 +952,7 @@ "1": 314 }, "flags": {}, - "order": 6, + "order": 5, "mode": 0, "outputs": [ { @@ -1261,7 +994,7 @@ "1": 446 }, "flags": {}, - "order": 31, + "order": 32, "mode": 0, "inputs": [ { @@ -1310,7 +1043,7 @@ "Node name for S&R": "KSampler" }, "widgets_values": [ - 109789101278740, + 794911936203426, "randomize", 20, 7, @@ -1331,7 +1064,7 @@ "1": 468.13226318359375 }, "flags": {}, - "order": 37, + "order": 38, "mode": 0, "inputs": [ { @@ -1358,7 +1091,7 @@ "1": 82 }, "flags": {}, - "order": 7, + "order": 6, "mode": 0, "outputs": [ { @@ -1393,7 +1126,7 @@ 26 ], "flags": {}, - "order": 21, + "order": 20, "mode": 0, "inputs": [ { @@ -1431,7 +1164,7 @@ "1": 214 }, "flags": {}, - "order": 18, + "order": 17, "mode": 0, "inputs": [ { @@ -1522,7 +1255,7 @@ "original", 512, 768, - 933689295201272, + 455409161612873, "randomize" ] }, @@ -1578,7 +1311,7 @@ "1": 246 }, "flags": {}, - "order": 29, + "order": 30, "mode": 0, "inputs": [ { @@ -1592,32 +1325,6 @@ "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", @@ -1630,7 +1337,7 @@ "1": 246 }, "flags": {}, - "order": 28, + "order": 29, "mode": 0, "inputs": [ { @@ -1643,6 +1350,347 @@ "properties": { "Node name for S&R": "PreviewImage" } + }, + { + "id": 159, + "type": "ControlNetScript", + "pos": [ + -1160, + 70 + ], + "size": { + "0": 506.0240173339844, + "1": 822 + }, + "flags": {}, + "order": 28, + "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": 307 + }, + { + "name": "mask_3", + "type": "IMAGE", + "link": 308 + } + ], + "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, + 100, + 200, + 0, + 1, + 512, + "disable", + "OpenposePreprocessor", + "control_lora_rank128_v11p_sd15_openpose_fp16.safetensors", + 1, + 0, + 0, + 0, + 1, + 512, + "disable", + "InpaintPreprocessor", + "control_lora_rank128_v11p_sd15_inpaint_fp16.safetensors", + 1, + 0, + 0, + 0, + 1, + 512 + ] + }, + { + "id": 158, + "type": "PreviewImage", + "pos": [ + -330, + -212 + ], + "size": { + "0": 336, + "1": 246 + }, + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 293 + } + ], + "title": "Preview Image | id:preprocessor_output_3", + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 147, + "type": "ImageScale", + "pos": [ + -1084, + -646 + ], + "size": { + "0": 315, + "1": 130 + }, + "flags": {}, + "order": 9, + "mode": 4, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 274 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 296, + 303, + 307 + ], + "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": 10, + "mode": 4, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 282 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 283, + 302, + 304, + 308 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ImageScale" + }, + "widgets_values": [ + "nearest-exact", + 512, + 768, + "disabled" + ] + }, + { + "id": 16, + "type": "CheckpointLoaderSimple", + "pos": [ + -3298, + 1138 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 7, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 141 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 311 + ], + "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": [ + "aniverse_v15Pruned.safetensors" + ] + }, + { + "id": 162, + "type": "CLIPSetLastLayer", + "pos": [ + -2959, + 1098 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 311 + } + ], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 309, + 310 + ], + "shape": 3, + "slot_index": 0 + } + ], + "title": "CLIP Set Last Layer | id:clip_skip", + "properties": { + "Node name for S&R": "CLIPSetLastLayer" + }, + "widgets_values": [ + -1 + ] } ], "links": [ @@ -1718,14 +1766,6 @@ 0, "CLIP" ], - [ - 132, - 16, - 1, - 76, - 1, - "CLIP" - ], [ 133, 76, @@ -1766,14 +1806,6 @@ 0, "CLIP" ], - [ - 139, - 16, - 1, - 78, - 1, - "CLIP" - ], [ 140, 78, @@ -2069,6 +2101,46 @@ 3, 3, "LATENT" + ], + [ + 307, + 147, + 0, + 159, + 6, + "IMAGE" + ], + [ + 308, + 152, + 0, + 159, + 7, + "IMAGE" + ], + [ + 309, + 162, + 0, + 78, + 1, + "CLIP" + ], + [ + 310, + 162, + 0, + 76, + 1, + "CLIP" + ], + [ + 311, + 16, + 1, + 162, + 0, + "CLIP" ] ], "groups": [ diff --git a/typescripts/comfyui/main_ui.tsx b/typescripts/comfyui/main_ui.tsx index d57ebdc..c3cbc45 100644 --- a/typescripts/comfyui/main_ui.tsx +++ b/typescripts/comfyui/main_ui.tsx @@ -1,8 +1,8 @@ import txt2img from './txt2img_workflow.json' import txt2img_api from './txt2img_api.json' -import img2img from './img2img_workflow_v0.0.6.json' -import img2img_api from './img2img_api_v0.0.6.json' +import img2img from './img2img_workflow.json' +import img2img_api from './img2img_api.json' import inpaint from './inpaint_workflow.json' import inpaint_api from './inpaint_api.json' @@ -119,6 +119,7 @@ function mutePromptNode(nodes: any[], prompt: any, node_name_id: string) { } const txt2img_map: Record = { model: 'checkpoint.ckpt_name', + comfy_clip_skip: 'clip_skip.stop_at_clip_layer', vae: 'vae.vae_name', width: 'latent_image.width', height: 'latent_image.height', @@ -162,6 +163,7 @@ const controlnet_txt2img_map: Record = { const img2img_map: Record = { init_image: 'init_image.image', // note: this is not init_images but init_image model: 'checkpoint.ckpt_name', + comfy_clip_skip: 'clip_skip.stop_at_clip_layer', vae: 'vae.vae_name', width: 'init_image_scale.width', height: 'init_image_scale.height', @@ -193,8 +195,8 @@ const img2img_map: Record = { const inpaint_map: Record = { init_image: 'init_image.image', // note: this is not init_images but init_image comfy_mask: 'mask_image.image', - model: 'checkpoint.ckpt_name', + comfy_clip_skip: 'clip_skip.stop_at_clip_layer', vae: 'vae.vae_name', width: 'width.Value', height: 'height.Value', @@ -252,6 +254,7 @@ async function addMissingSettings(plugin_settings: Record) { plugin_settings['hr_denoising_strength'] = sd_tab_util.store.data.hr_denoising_strength plugin_settings['hr_sampler_name'] = sd_tab_util.store.data.sampler_name // use the same sampler for the first and second pass (hires) upscale sampling steps + plugin_settings['comfy_clip_skip'] = -1 * plugin_settings['clip_skip'] if ('init_images' in plugin_settings) { const base64 = plugin_settings['init_images'][0] diff --git a/utility/session.js b/utility/session.js index 38ea487..13e0cf7 100644 --- a/utility/session.js +++ b/utility/session.js @@ -416,6 +416,8 @@ async function getSettings(session_data) { payload['original_negative_prompt'] = negative_prompt } + payload['clip_skip'] = + settings_tab_ts.store.data.CLIP_stop_at_last_layers payload = { ...payload, // prompt: prompt,