From 76a6b4c8f70aa1aae2700c18f98a97e8d5fa0a46 Mon Sep 17 00:00:00 2001 From: Elite Date: Fri, 21 Feb 2025 19:07:45 +0000 Subject: [PATCH] update the depthmask background workflow --- ... 1.5 TensorRT w DepthMask accelerated.json | 1093 +++++++++++++---- 1 file changed, 864 insertions(+), 229 deletions(-) diff --git a/workflows/ui/SD 1.5 TensorRT w DepthMask accelerated.json b/workflows/ui/SD 1.5 TensorRT w DepthMask accelerated.json index 80feb42c..9a38027f 100644 --- a/workflows/ui/SD 1.5 TensorRT w DepthMask accelerated.json +++ b/workflows/ui/SD 1.5 TensorRT w DepthMask accelerated.json @@ -1,263 +1,898 @@ { - "1": { - "inputs": { - "image": "dead_inside_512.png", - "upload": "image" - }, - "class_type": "LoadImage", - "_meta": { - "title": "Load Image" - } - }, - "2": { - "inputs": { - "engine": "depth_anything_v2_vitb-fp16.engine", - "images": [ - "1", - 0 + "last_node_id": 22, + "last_link_id": 42, + "nodes": [ + { + "id": 5, + "type": "CLIPTextEncode", + "pos": [ + 515, + 318 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 23 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 29 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "hulk" ] }, - "class_type": "DepthAnythingTensorrt", - "_meta": { - "title": "Depth Anything Tensorrt" - } - }, - "3": { - "inputs": { - "unet_name": "ComfyUI_STAT_SD15_$stat-b-1-h-512-w-512_00001_.engine", - "model_type": "SD15" - }, - "class_type": "TensorRTLoader", - "_meta": { - "title": "TensorRT Loader" - } - }, - "4": { - "inputs": { - "ckpt_name": "dreamshaper_8.safetensors" + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 515, + 648 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 24 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 30 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ] }, - "class_type": "CheckpointLoaderSimple", - "_meta": { - "title": "Load Checkpoint" - } - }, - "5": { - "inputs": { - "text": "hulk", - "clip": [ - "4", + { + "id": 7, + "type": "KSampler", + "pos": [ + 1430, + 318 + ], + "size": [ + 315, + 262 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 25 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 26 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 27 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 28 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 35 + ] + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 57213233739937, + "randomize", + 1, + 0.6, + "lcm", + "normal", 1 ] }, - "class_type": "CLIPTextEncode", - "_meta": { - "title": "CLIP Text Encode (Prompt)" - } - }, - "6": { - "inputs": { - "text": "", - "clip": [ - "4", + { + "id": 9, + "type": "ControlNetApplyAdvanced", + "pos": [ + 1015, + 318 + ], + "size": [ + 315, + 186 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "link": 29 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 30 + }, + { + "name": "control_net", + "type": "CONTROL_NET", + "link": 31 + }, + { + "name": "image", + "type": "IMAGE", + "link": 32 + }, + { + "name": "vae", + "type": "VAE", + "shape": 7, + "link": null + } + ], + "outputs": [ + { + "name": "positive", + "type": "CONDITIONING", + "links": [ + 26 + ] + }, + { + "name": "negative", + "type": "CONDITIONING", + "links": [ + 27 + ] + } + ], + "properties": { + "Node name for S&R": "ControlNetApplyAdvanced" + }, + "widgets_values": [ + 1, + 0, 1 ] }, - "class_type": "CLIPTextEncode", - "_meta": { - "title": "CLIP Text Encode (Prompt)" - } - }, - "7": { - "inputs": { - "seed": 304967743548771, - "steps": 1, - "cfg": 0.6, - "sampler_name": "lcm", - "scheduler": "normal", - "denoise": 1, - "model": [ - "3", - 0 - ], - "positive": [ - "9", - 0 - ], - "negative": [ - "9", - 1 + { + "id": 10, + "type": "TorchCompileLoadControlNet", + "pos": [ + 515, + 978 + ], + "size": [ + 327.5999755859375, + 106 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "controlnet", + "type": "CONTROL_NET", + "link": 33 + } + ], + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [ + 31 + ] + } ], - "latent_image": [ - "16", - 0 + "properties": { + "Node name for S&R": "TorchCompileLoadControlNet" + }, + "widgets_values": [ + "inductor", + false, + "reduce-overhead" ] }, - "class_type": "KSampler", - "_meta": { - "title": "KSampler" - } - }, - "8": { - "inputs": { - "control_net_name": "1.5/control_v11f1p_sd15_depth_fp16.safetensors" + { + "id": 11, + "type": "VAELoader", + "pos": [ + 100, + 990 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 34 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader" + }, + "widgets_values": [ + "taesd" + ] }, - "class_type": "ControlNetLoader", - "_meta": { - "title": "Load ControlNet Model" - } - }, - "9": { - "inputs": { - "strength": 1, - "start_percent": 0, - "end_percent": 1, - "positive": [ - "5", - 0 - ], - "negative": [ - "6", - 0 - ], - "control_net": [ - "10", - 0 - ], - "image": [ - "1", - 0 + { + "id": 13, + "type": "TorchCompileLoadVAE", + "pos": [ + 515, + 1214 + ], + "size": [ + 315, + 154 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "vae", + "type": "VAE", + "link": 34 + } + ], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 36 + ] + } + ], + "properties": { + "Node name for S&R": "TorchCompileLoadVAE" + }, + "widgets_values": [ + "inductor", + true, + "reduce-overhead", + true, + true ] }, - "class_type": "ControlNetApplyAdvanced", - "_meta": { - "title": "Apply ControlNet" - } - }, - "10": { - "inputs": { - "backend": "inductor", - "fullgraph": false, - "mode": "reduce-overhead", - "controlnet": [ - "8", - 0 + { + "id": 14, + "type": "VAEDecode", + "pos": [ + 1845, + 130 + ], + "size": [ + 210, + 46 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 35 + }, + { + "name": "vae", + "type": "VAE", + "link": 36 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 39 + ] + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 15, + "type": "PreviewImage", + "pos": [ + 2570, + 130 + ], + "size": [ + 210, + 26 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 37 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 16, + "type": "EmptyLatentImage", + "pos": [ + 100, + 1178 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 28 + ] + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 ] }, - "class_type": "TorchCompileLoadControlNet", - "_meta": { - "title": "TorchCompileLoadControlNet" - } - }, - "11": { - "inputs": { - "vae_name": "taesd" + { + "id": 20, + "type": "ImageToMask", + "pos": [ + 1015, + 130 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 38 + } + ], + "outputs": [ + { + "name": "MASK", + "type": "MASK", + "links": [ + 42 + ] + } + ], + "properties": { + "Node name for S&R": "ImageToMask" + }, + "widgets_values": [ + "red" + ] }, - "class_type": "VAELoader", - "_meta": { - "title": "Load VAE" - } - }, - "13": { - "inputs": { - "backend": "inductor", - "fullgraph": true, - "mode": "reduce-overhead", - "compile_encoder": true, - "compile_decoder": true, - "vae": [ - "11", - 0 + { + "id": 21, + "type": "Composite", + "pos": [ + 2155, + 130 + ], + "size": [ + 315, + 98 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "foregrounds", + "type": "IMAGE", + "link": 39 + }, + { + "name": "backgrounds", + "type": "IMAGE", + "link": 40 + }, + { + "name": "foreground_masks", + "type": "MASK", + "link": 41 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 37 + ] + } + ], + "properties": { + "Node name for S&R": "Composite" + }, + "widgets_values": [ + "cuda" ] }, - "class_type": "TorchCompileLoadVAE", - "_meta": { - "title": "TorchCompileLoadVAE" - } - }, - "14": { - "inputs": { - "samples": [ - "7", - 0 - ], - "vae": [ - "13", - 0 + { + "id": 22, + "type": "ThresholdMask", + "pos": [ + 1430, + 130 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 42 + } + ], + "outputs": [ + { + "name": "MASK", + "type": "MASK", + "links": [ + 41 + ] + } + ], + "properties": { + "Node name for S&R": "ThresholdMask" + }, + "widgets_values": [ + 0.5 ] }, - "class_type": "VAEDecode", - "_meta": { - "title": "VAE Decode" - } - }, - "15": { - "inputs": { - "images": [ - "21", - 0 + { + "id": 3, + "type": "TensorRTLoader", + "pos": [ + 100, + 362 + ], + "size": [ + 315, + 82 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 25 + ] + } + ], + "properties": { + "Node name for S&R": "TensorRTLoader" + }, + "widgets_values": [ + "static-dreamshaper8_SD15_$stat-b-1-h-512-w-512_00001_.engine", + "SD15" ] }, - "class_type": "PreviewImage", - "_meta": { - "title": "Preview Image" - } - }, - "16": { - "inputs": { - "width": 512, - "height": 512, - "batch_size": 1 + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 100, + 574 + ], + "size": [ + 315, + 98 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": null + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 23, + 24 + ] + }, + { + "name": "VAE", + "type": "VAE", + "links": null + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5/dreamshaper-8.safetensors" + ] }, - "class_type": "EmptyLatentImage", - "_meta": { - "title": "Empty Latent Image" - } - }, - "20": { - "inputs": { - "channel": "red", - "image": [ - "2", - 0 + { + "id": 8, + "type": "ControlNetLoader", + "pos": [ + 100, + 802 + ], + "size": [ + 282, + 72.30000305175781 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [ + 33 + ] + } + ], + "properties": { + "Node name for S&R": "ControlNetLoader" + }, + "widgets_values": [ + "control_v11f1p_sd15_depth_fp16.safetensors" ] }, - "class_type": "ImageToMask", - "_meta": { - "title": "Convert Image to Mask" - } - }, - "21": { - "inputs": { - "mode": "cuda", - "foregrounds": [ - "14", - 0 - ], - "backgrounds": [ - "1", - 0 - ], - "foreground_masks": [ - "22", - 0 + { + "id": 2, + "type": "DepthAnythingTensorrt", + "pos": [ + 515, + 130 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 22 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 38 + ] + } + ], + "properties": { + "Node name for S&R": "DepthAnythingTensorrt" + }, + "widgets_values": [ + "depth_anything_vitl14-fp16.engine" ] }, - "class_type": "Composite", - "_meta": { - "title": "Composite" + { + "id": 1, + "type": "LoadImage", + "pos": [ + 100, + 130 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 22, + 32, + 40 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "example.png", + "image" + ] } - }, - "22": { - "inputs": { - "value": 0.5, - "mask": [ - "20", - 0 + ], + "links": [ + [ + 22, + 1, + 0, + 2, + 0, + "IMAGE" + ], + [ + 23, + 4, + 1, + 5, + 0, + "CLIP" + ], + [ + 24, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 25, + 3, + 0, + 7, + 0, + "MODEL" + ], + [ + 26, + 9, + 0, + 7, + 1, + "CONDITIONING" + ], + [ + 27, + 9, + 1, + 7, + 2, + "CONDITIONING" + ], + [ + 28, + 16, + 0, + 7, + 3, + "LATENT" + ], + [ + 29, + 5, + 0, + 9, + 0, + "CONDITIONING" + ], + [ + 30, + 6, + 0, + 9, + 1, + "CONDITIONING" + ], + [ + 31, + 10, + 0, + 9, + 2, + "CONTROL_NET" + ], + [ + 32, + 1, + 0, + 9, + 3, + "IMAGE" + ], + [ + 33, + 8, + 0, + 10, + 0, + "CONTROL_NET" + ], + [ + 34, + 11, + 0, + 13, + 0, + "VAE" + ], + [ + 35, + 7, + 0, + 14, + 0, + "LATENT" + ], + [ + 36, + 13, + 0, + 14, + 1, + "VAE" + ], + [ + 37, + 21, + 0, + 15, + 0, + "IMAGE" + ], + [ + 38, + 2, + 0, + 20, + 0, + "IMAGE" + ], + [ + 39, + 14, + 0, + 21, + 0, + "IMAGE" + ], + [ + 40, + 1, + 0, + 21, + 1, + "IMAGE" + ], + [ + 41, + 22, + 0, + 21, + 2, + "MASK" + ], + [ + 42, + 20, + 0, + 22, + 0, + "MASK" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.75131480090158, + "offset": [ + 446.8796822243205, + 6.82800377987391 ] - }, - "class_type": "ThresholdMask", - "_meta": { - "title": "ThresholdMask" } - } + }, + "version": 0.4 } \ No newline at end of file