diff --git a/README.md b/README.md index 2b508b4..27b0d62 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,8 @@ The input comes from the [load image with metadata](#node-load-image-with-metada ![Metadata extractor](./docs/metadata-extractor.png) +**Sample:** [metadata-extractor.json](./samples/metadata-extractor.json) + >
> Other metadata sample (photoshop) > @@ -63,6 +65,8 @@ There are tree potential "outputs": `values_changed`, `dictionary_item_added`, ` ![Metadata extractor](./docs/metadata-comparator.png) +**Sample:** [metadata-comparator.json](./samples/metadata-comparator.json) + **Notes:** - I use [DeepDiff](https://pypi.org/project/deepdiff) for that, for more info check the link. - If you want to compare two JSONs, you can use the [JSON comparator](#node-JSON-comparator) node. @@ -90,6 +94,8 @@ With this node, you will be able to see the JSON produced from your entire promp ![Show metadata](./docs/debugger-show-metadata.png) +**Sample:** [debugger-metadata.json](./samples/debugger-metadata.json) + >
> Parameters > @@ -105,6 +111,8 @@ You can see on the console or display any text or data from the nodes. Connect i ![Show any](./docs/debugger-show-any.png) +**Sample:** [debugger-any.json](./samples/debugger-any.json) + >
> Parameters > @@ -122,6 +130,8 @@ As same the previous one, but it formatted the value to JSON (only display). ![Show any](./docs/debugger-show-json.png) +**Sample:** [debugger-json.json](./samples/debugger-json.json) + >
> Parameters > @@ -139,6 +149,8 @@ This node is the same as the default one, but it adds three features: Prompt, Me ![Load image with metadata](./docs/image-load.png) +**Sample:** [image-load.json](./samples/image-load.json) + >
> Parameters > @@ -164,6 +176,8 @@ This node is used to preview the image with the **current prompt** and additiona As you can see the seed, steps, and cfg were changed +**Sample:** [image-preview-image.json](./samples/image-preview-image.json) + >
> Parameters > @@ -187,6 +201,8 @@ It supports same features as [preview from image](#node-preview-from-image) (cac ![Preview from metadata](./docs/image-preview-metadata.png) +**Sample:** [image-preview-metadata.json](./samples/image-preview-metadata.json) + ### Node: Show resolution This node is used to show the resolution of an image. @@ -195,6 +211,8 @@ This node is used to show the resolution of an image. ![Show resolution](./docs/image-resolution.png) +**Sample:** [image-resolution.json](./samples/image-resolution.json) + >
> Parameters > @@ -225,10 +243,14 @@ With pipes: ![Pipes](./docs/pipe-1.png) +**Sample:** [pipe-1.json](./samples/pipe-1.json) + Editing pipes: ![Pipes](./docs/pipe-2.png) +**Sample:** [pipe-2.json](./samples/pipe-2.json) + >
> Parameters > @@ -263,6 +285,8 @@ This node is so useful to compare two JSONs and see the differences. ![JSON comparator](./docs/utils-json-comparator.png) +**Sample:** [utils-json-comparator.json](./samples/utils-json-comparator.json) + >
> Parameters @@ -287,6 +311,8 @@ It **should** connect as a pipe. ![JSON comparator](./docs/utils-stats.png) +**Sample:** [utils-stats.json](./samples/utils-stats.json) + >
> Parameters > @@ -319,6 +345,8 @@ A set of nodes with list of values (any or strings/texts) for any propose (news ![Lists](./docs/list-string.png) +**Sample:** [list-strings.json](./samples/list-strings.json) + >
> Parameters > @@ -336,6 +364,8 @@ You can concatenate any value (it will try to convert to string and show the val ![Lists](./docs/list-any.png) +**Sample:** [list-any.json](./samples/list-any.json) + >
> Parameters > @@ -355,17 +385,20 @@ You have predefined switches (string, latent, image, conditioning) but you can u ![Switches](./docs/switches.png) +**Sample:** [switch.json](./samples/switch.json) + ## About **Notes from the author:** -- This is my first project in python ¯\_(ツ)_/¯ (PR are welcome!) +- This is my first project in python ¯\\_(ツ)_/¯ (PR are welcome!) - I'm software engineer but in other languages (web technologies) - My instagram is: https://www.instagram.com/crystian.ia I'll publish my works on it, consider follow me for news! :) - I'm not a native english speaker, so sorry for my english :P ## To do +- [ ] Review the priority of list of nodes - [ ] Add support for others image formats (jpg, gif, etc.) - [ ] Several unit tests - [ ] Add permanent cache for preview/metadata image (to survive to F5! or restart the server) diff --git a/docs/metadata-comparator-mark.png b/docs/metadata-comparator-mark.png new file mode 100644 index 0000000..6f65e77 Binary files /dev/null and b/docs/metadata-comparator-mark.png differ diff --git a/samples/debugger-any.json b/samples/debugger-any.json new file mode 100644 index 0000000..470a60f --- /dev/null +++ b/samples/debugger-any.json @@ -0,0 +1,102 @@ +{ + "last_node_id": 4, + "last_link_id": 4, + "nodes": [ + { + "id": 3, + "type": "Show any [Crystools]", + "pos": [ + 475, + 250 + ], + "size": { + "0": 400, + "1": 750 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 3 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + }, + "widgets_values": [ + false, + true, + "" + ] + }, + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 100, + 75 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": [ + 3 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + } + ], + "links": [ + [ + 3, + 1, + 2, + 3, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/debugger-json.json b/samples/debugger-json.json new file mode 100644 index 0000000..bb6dace --- /dev/null +++ b/samples/debugger-json.json @@ -0,0 +1,182 @@ +{ + "last_node_id": 4, + "last_link_id": 4, + "nodes": [ + { + "id": 4, + "type": "Show any to JSON [Crystools]", + "pos": [ + 900, + 175 + ], + "size": { + "0": 400, + "1": 825 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 4 + } + ], + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Show any to JSON [Crystools]" + } + }, + { + "id": 2, + "type": "Show any to JSON [Crystools]", + "pos": [ + 1350, + 50 + ], + "size": [ + 400, + 950 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 2 + } + ], + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Show any to JSON [Crystools]" + } + }, + { + "id": 3, + "type": "Show any [Crystools]", + "pos": [ + 475, + 250 + ], + "size": [ + 400, + 750 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 3 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 100, + 75 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": [ + 2, + 3 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [ + 4 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + } + ], + "links": [ + [ + 2, + 1, + 2, + 2, + 0, + "*" + ], + [ + 3, + 1, + 2, + 3, + 0, + "*" + ], + [ + 4, + 1, + 3, + 4, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/debugger-metadata.json b/samples/debugger-metadata.json new file mode 100644 index 0000000..98f9053 --- /dev/null +++ b/samples/debugger-metadata.json @@ -0,0 +1,382 @@ +{ + "last_node_id": 13, + "last_link_id": 11, + "nodes": [ + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 413, + 389 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 415, + 186 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 4 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 473, + 609 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1209, + 188 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 6, + "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": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1451, + 189 + ], + "size": [ + 200, + 275 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 863, + 186 + ], + "size": [ + 325, + 475 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 10, + "type": "Show Metadata [Crystools]", + "pos": [ + 1225, + 525 + ], + "size": [ + 450, + 525 + ], + "flags": {}, + "order": 1, + "mode": 0, + "properties": {} + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 26, + 474 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "sd-v1-5-pruned-emaonly.safetensors" + ] + } + ], + "links": [ + [ + 1, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 4, + 6, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 6, + 7, + 0, + 3, + 2, + "CONDITIONING" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/image-load.json b/samples/image-load.json new file mode 100644 index 0000000..2e8e56d --- /dev/null +++ b/samples/image-load.json @@ -0,0 +1,59 @@ +{ + "last_node_id": 1, + "last_link_id": 0, + "nodes": [ + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 150, + 200 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + } + ], + "links": [], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/image-preview-image.json b/samples/image-preview-image.json new file mode 100644 index 0000000..ed8c506 --- /dev/null +++ b/samples/image-preview-image.json @@ -0,0 +1,373 @@ +{ + "last_node_id": 14, + "last_link_id": 12, + "nodes": [ + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 413, + 389 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 415, + 186 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 4 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 473, + 609 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1209, + 188 + ], + "size": { + "0": 210, + "1": 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": [ + 12 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 26, + 474 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "sd-v1-5-pruned-emaonly.safetensors" + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 863, + 186 + ], + "size": { + "0": 325, + "1": 475 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 14, + "type": "Preview from image [Crystools]", + "pos": [ + 1525, + 175 + ], + "size": [ + 400, + 800 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 12 + } + ], + "outputs": [ + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Preview from image [Crystools]" + } + } + ], + "links": [ + [ + 1, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 4, + 6, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 6, + 7, + 0, + 3, + 2, + "CONDITIONING" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 12, + 8, + 0, + 14, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/image-preview-metadata.json b/samples/image-preview-metadata.json new file mode 100644 index 0000000..a9efe19 --- /dev/null +++ b/samples/image-preview-metadata.json @@ -0,0 +1,104 @@ +{ + "last_node_id": 2, + "last_link_id": 1, + "nodes": [ + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 150, + 200 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [ + 1 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 2, + "type": "Preview from metadata [Crystools]", + "pos": [ + 575, + 200 + ], + "size": [ + 425, + 675 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "metadata_raw", + "type": "METADATA_RAW", + "link": 1 + } + ], + "outputs": [ + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Preview from metadata [Crystools]" + } + } + ], + "links": [ + [ + 1, + 1, + 3, + 2, + 0, + "METADATA_RAW" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/image-resolution.json b/samples/image-resolution.json new file mode 100644 index 0000000..cde672c --- /dev/null +++ b/samples/image-resolution.json @@ -0,0 +1,512 @@ +{ + "last_node_id": 13, + "last_link_id": 11, + "nodes": [ + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 413, + 389 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 415, + 186 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 4 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 473, + 609 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 26, + 474 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5\\3d\\disneyPixarCartoon_v10.safetensors" + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 863, + 186 + ], + "size": [ + 325, + 475 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1209, + 188 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 9, + 10 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1475, + 250 + ], + "size": [ + 200, + 275 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 10, + "type": "Get resolution [Crystools]", + "pos": [ + 1475, + 100 + ], + "size": { + "0": 200, + "1": 100 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 10 + } + ], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": null, + "shape": 3 + }, + { + "name": "height", + "type": "INT", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Get resolution [Crystools]" + } + }, + { + "id": 12, + "type": "Load image with metadata [Crystools]", + "pos": [ + 1350, + 625 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 11 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 13, + "type": "Get resolution [Crystools]", + "pos": [ + 1725, + 625 + ], + "size": { + "0": 200, + "1": 100 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 11 + } + ], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": null, + "shape": 3 + }, + { + "name": "height", + "type": "INT", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Get resolution [Crystools]" + } + } + ], + "links": [ + [ + 1, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 4, + 6, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 6, + 7, + 0, + 3, + 2, + "CONDITIONING" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 10, + 8, + 0, + 10, + 0, + "IMAGE" + ], + [ + 11, + 12, + 0, + 13, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/list-any.json b/samples/list-any.json new file mode 100644 index 0000000..75c4568 --- /dev/null +++ b/samples/list-any.json @@ -0,0 +1,375 @@ +{ + "last_node_id": 15, + "last_link_id": 13, + "nodes": [ + { + "id": 10, + "type": "Primitive integer [Crystools]", + "pos": [ + 175, + 525 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "int", + "type": "INT", + "links": [ + 9 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive integer [Crystools]" + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 11, + "type": "Primitive float [Crystools]", + "pos": [ + 175, + 625 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "float", + "type": "FLOAT", + "links": [ + 10 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive float [Crystools]" + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 9, + "type": "Primitive string multiline [Crystools]", + "pos": [ + 90, + 275 + ], + "size": { + "0": 400, + "1": 200 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": [ + 8 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive string multiline [Crystools]" + }, + "widgets_values": [ + "sample\nmultiline" + ] + }, + { + "id": 12, + "type": "Primitive string [Crystools]", + "pos": [ + 240, + 175 + ], + "size": { + "0": 250, + "1": 58 + }, + "flags": {}, + "order": 3, + "mode": 0, + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": [ + 6 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive string [Crystools]" + }, + "widgets_values": [ + "sample" + ] + }, + { + "id": 14, + "type": "Load image with metadata [Crystools]", + "pos": [ + 165, + 750 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 4, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 11 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 7, + "type": "List of any [Crystools]", + "pos": [ + 600, + 325 + ], + "size": { + "0": 210, + "1": 166 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "any_1", + "type": "*", + "link": 5 + }, + { + "name": "any_2", + "type": "*", + "link": 6 + }, + { + "name": "any_3", + "type": "*", + "link": 8 + }, + { + "name": "any_4", + "type": "*", + "link": 9 + }, + { + "name": "any_5", + "type": "*", + "link": 10 + }, + { + "name": "any_6", + "type": "*", + "link": 11 + }, + { + "name": "any_7", + "type": "*", + "link": null + }, + { + "name": "any_8", + "type": "*", + "link": null + } + ], + "outputs": [ + { + "name": "any_list", + "type": "COMBO", + "links": [ + 12 + ], + "shape": 6, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "List of any [Crystools]" + } + }, + { + "id": 15, + "type": "Show any [Crystools]", + "pos": [ + 850, + 325 + ], + "size": [ + 575, + 625 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 12 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 8, + "type": "Primitive boolean [Crystools]", + "pos": [ + 175, + 75 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 5, + "mode": 0, + "outputs": [ + { + "name": "boolean", + "type": "BOOLEAN", + "links": [ + 5 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive boolean [Crystools]" + }, + "widgets_values": [ + true + ] + } + ], + "links": [ + [ + 5, + 8, + 0, + 7, + 0, + "*" + ], + [ + 6, + 12, + 0, + 7, + 1, + "*" + ], + [ + 8, + 9, + 0, + 7, + 2, + "*" + ], + [ + 9, + 10, + 0, + 7, + 3, + "*" + ], + [ + 10, + 11, + 0, + 7, + 4, + "*" + ], + [ + 11, + 14, + 0, + 7, + 5, + "*" + ], + [ + 12, + 7, + 0, + 15, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/list-strings.json b/samples/list-strings.json new file mode 100644 index 0000000..8d08b5c --- /dev/null +++ b/samples/list-strings.json @@ -0,0 +1,177 @@ +{ + "last_node_id": 6, + "last_link_id": 4, + "nodes": [ + { + "id": 3, + "type": "Primitive string [Crystools]", + "pos": [ + 50, + 100 + ], + "size": { + "0": 250, + "1": 58 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": [ + 2 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Primitive string [Crystools]" + }, + "widgets_values": [ + "folder2" + ] + }, + { + "id": 2, + "type": "List of strings [Crystools]", + "pos": [ + 350, + 100 + ], + "size": { + "0": 325, + "1": 275 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "string_2", + "type": "STRING", + "link": 2, + "widget": { + "name": "string_2" + } + } + ], + "outputs": [ + { + "name": "concatenated", + "type": "STRING", + "links": [ + 4 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "list_string", + "type": "ListString", + "links": [ + 3 + ], + "shape": 6, + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "List of strings [Crystools]" + }, + "widgets_values": [ + "folder1", + "", + "folder3", + "", + "", + "", + "", + "", + "/" + ] + }, + { + "id": 6, + "type": "Show any [Crystools]", + "pos": [ + 775, + 100 + ], + "size": { + "0": 375, + "1": 150 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 4 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 5, + "type": "Show any [Crystools]", + "pos": [ + 775, + 325 + ], + "size": { + "0": 375, + "1": 150 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 3 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + } + ], + "links": [ + [ + 2, + 3, + 0, + 2, + 0, + "STRING" + ], + [ + 3, + 2, + 1, + 5, + 0, + "*" + ], + [ + 4, + 2, + 0, + 6, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/metadata-comparator.json b/samples/metadata-comparator.json new file mode 100644 index 0000000..4201dac --- /dev/null +++ b/samples/metadata-comparator.json @@ -0,0 +1,168 @@ +{ + "last_node_id": 10, + "last_link_id": 9, + "nodes": [ + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 100, + 75 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [ + 8 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 9, + "type": "Load image with metadata [Crystools]", + "pos": [ + 100, + 500 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [ + 9 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00315_21-81-heun.png", + "image" + ] + }, + { + "id": 10, + "type": "Metadata comparator [Crystools]", + "pos": [ + 550, + 100 + ], + "size": [ + 375, + 750 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "metadata_raw_old", + "type": "METADATA_RAW", + "link": 8 + }, + { + "name": "metadata_raw_new", + "type": "METADATA_RAW", + "link": 9 + } + ], + "outputs": [ + { + "name": "diff", + "type": "JSON", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Metadata comparator [Crystools]" + } + } + ], + "links": [ + [ + 8, + 1, + 3, + 10, + 0, + "METADATA_RAW" + ], + [ + 9, + 9, + 3, + 10, + 1, + "METADATA_RAW" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/metadata-extractor.json b/samples/metadata-extractor.json new file mode 100644 index 0000000..890ea4a --- /dev/null +++ b/samples/metadata-extractor.json @@ -0,0 +1,350 @@ +{ + "last_node_id": 8, + "last_link_id": 7, + "nodes": [ + { + "id": 5, + "type": "Show any [Crystools]", + "pos": [ + 1100, + 575 + ], + "size": [ + 475, + 225 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 4 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 4, + "type": "Show any [Crystools]", + "pos": [ + 1100, + 50 + ], + "size": [ + 475, + 450 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 3 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 8, + "type": "Show any [Crystools]", + "pos": [ + 100, + 900 + ], + "size": [ + 450, + 375 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 7 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 100, + 75 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": null, + "shape": 3 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": [ + 1 + ], + "shape": 3, + "slot_index": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 2, + "type": "Metadata extractor [Crystools]", + "pos": [ + 125, + 625 + ], + "size": { + "0": 355.20001220703125, + "1": 126 + }, + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "metadata_raw", + "type": "METADATA_RAW", + "link": 1 + } + ], + "outputs": [ + { + "name": "prompt", + "type": "JSON", + "links": [ + 2 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "workflow", + "type": "JSON", + "links": [ + 3 + ], + "shape": 3, + "slot_index": 1 + }, + { + "name": "file info", + "type": "JSON", + "links": [ + 4 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "raw to JSON", + "type": "JSON", + "links": [ + 5 + ], + "shape": 3, + "slot_index": 3 + }, + { + "name": "raw to property", + "type": "STRING", + "links": [ + 6 + ], + "shape": 3, + "slot_index": 4 + }, + { + "name": "raw to csv", + "type": "STRING", + "links": [ + 7 + ], + "shape": 3, + "slot_index": 5 + } + ], + "properties": { + "Node name for S&R": "Metadata extractor [Crystools]" + } + }, + { + "id": 6, + "type": "Show any [Crystools]", + "pos": [ + 1100, + 900 + ], + "size": [ + 475, + 375 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 5 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 7, + "type": "Show any [Crystools]", + "pos": [ + 600, + 900 + ], + "size": [ + 450, + 375 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 6 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + }, + { + "id": 3, + "type": "Show any [Crystools]", + "pos": [ + 625, + 50 + ], + "size": [ + 425, + 450 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 2 + } + ], + "properties": { + "Node name for S&R": "Show any [Crystools]" + } + } + ], + "links": [ + [ + 1, + 1, + 3, + 2, + 0, + "METADATA_RAW" + ], + [ + 2, + 2, + 0, + 3, + 0, + "*" + ], + [ + 3, + 2, + 1, + 4, + 0, + "*" + ], + [ + 4, + 2, + 2, + 5, + 0, + "*" + ], + [ + 5, + 2, + 3, + 6, + 0, + "*" + ], + [ + 6, + 2, + 4, + 7, + 0, + "*" + ], + [ + 7, + 2, + 5, + 8, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/pipe-1.json b/samples/pipe-1.json new file mode 100644 index 0000000..535052b --- /dev/null +++ b/samples/pipe-1.json @@ -0,0 +1,564 @@ +{ + "last_node_id": 15, + "last_link_id": 29, + "nodes": [ + { + "id": 3, + "type": "KSampler", + "pos": [ + 1350, + 125 + ], + "size": [ + 325, + 475 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 17 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 26 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 25 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 24 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1400, + 675 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": 27 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 9 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1400, + 800 + ], + "size": [ + 200, + 275 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 75, + 525 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 22 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 15, + "type": "Pipe from any [Crystools]", + "pos": [ + 975, + 200 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": 12 + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": null, + "shape": 3 + }, + { + "name": "any_1", + "type": "*", + "links": [ + 17 + ], + "shape": 3, + "slot_index": 1 + }, + { + "name": "any_2", + "type": "*", + "links": [ + 27 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "any_3", + "type": "*", + "links": [ + 26 + ], + "shape": 3, + "slot_index": 3 + }, + { + "name": "any_4", + "type": "*", + "links": [ + 25 + ], + "shape": 3, + "slot_index": 4 + }, + { + "name": "any_5", + "type": "*", + "links": [ + 24 + ], + "shape": 3, + "slot_index": 5 + }, + { + "name": "any_6", + "type": "*", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Pipe from any [Crystools]" + } + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 75, + 275 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 29 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 175, + 100 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 13 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 28 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5\\3d\\disneyPixarCartoon_v10.safetensors" + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 175, + 775 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 21 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 14, + "type": "Pipe to/edit any [Crystools]", + "pos": [ + 625, + 200 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": null + }, + { + "name": "any_1", + "type": "*", + "link": 13 + }, + { + "name": "any_2", + "type": "*", + "link": 28 + }, + { + "name": "any_3", + "type": "*", + "link": 29 + }, + { + "name": "any_4", + "type": "*", + "link": 22 + }, + { + "name": "any_5", + "type": "*", + "link": 21 + }, + { + "name": "any_6", + "type": "*", + "link": null + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": [ + 12 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Pipe to/edit any [Crystools]" + } + } + ], + "links": [ + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 12, + 14, + 0, + 15, + 0, + "CPipeAny" + ], + [ + 13, + 4, + 0, + 14, + 1, + "*" + ], + [ + 17, + 15, + 1, + 3, + 0, + "MODEL" + ], + [ + 21, + 5, + 0, + 14, + 5, + "*" + ], + [ + 22, + 7, + 0, + 14, + 4, + "*" + ], + [ + 24, + 15, + 5, + 3, + 3, + "LATENT" + ], + [ + 25, + 15, + 4, + 3, + 2, + "CONDITIONING" + ], + [ + 26, + 15, + 3, + 3, + 1, + "CONDITIONING" + ], + [ + 27, + 15, + 2, + 8, + 1, + "VAE" + ], + [ + 28, + 4, + 2, + 14, + 2, + "*" + ], + [ + 29, + 6, + 0, + 14, + 3, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/pipe-2.json b/samples/pipe-2.json new file mode 100644 index 0000000..a110319 --- /dev/null +++ b/samples/pipe-2.json @@ -0,0 +1,849 @@ +{ + "last_node_id": 19, + "last_link_id": 37, + "nodes": [ + { + "id": 3, + "type": "KSampler", + "pos": [ + 1350, + 125 + ], + "size": [ + 325, + 475 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 17 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 26 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 25 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 24 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1400, + 675 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 7 + }, + { + "name": "vae", + "type": "VAE", + "link": 27 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 9 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1400, + 800 + ], + "size": [ + 200, + 275 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 75, + 525 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 22 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 15, + "type": "Pipe from any [Crystools]", + "pos": [ + 975, + 200 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": 32 + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": null, + "shape": 3 + }, + { + "name": "any_1", + "type": "*", + "links": [ + 17 + ], + "shape": 3, + "slot_index": 1 + }, + { + "name": "any_2", + "type": "*", + "links": [ + 27 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "any_3", + "type": "*", + "links": [ + 26 + ], + "shape": 3, + "slot_index": 3 + }, + { + "name": "any_4", + "type": "*", + "links": [ + 25 + ], + "shape": 3, + "slot_index": 4 + }, + { + "name": "any_5", + "type": "*", + "links": [ + 24 + ], + "shape": 3, + "slot_index": 5 + }, + { + "name": "any_6", + "type": "*", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Pipe from any [Crystools]" + } + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 75, + 275 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 29 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 175, + 775 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 21 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 14, + "type": "Pipe to/edit any [Crystools]", + "pos": [ + 625, + 200 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": null + }, + { + "name": "any_1", + "type": "*", + "link": 13 + }, + { + "name": "any_2", + "type": "*", + "link": 28 + }, + { + "name": "any_3", + "type": "*", + "link": 29 + }, + { + "name": "any_4", + "type": "*", + "link": 22 + }, + { + "name": "any_5", + "type": "*", + "link": 21 + }, + { + "name": "any_6", + "type": "*", + "link": 33 + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": [ + 30 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Pipe to/edit any [Crystools]" + } + }, + { + "id": 16, + "type": "Pipe to/edit any [Crystools]", + "pos": [ + 950, + 475 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": 31 + }, + { + "name": "any_1", + "type": "*", + "link": null + }, + { + "name": "any_2", + "type": "*", + "link": null + }, + { + "name": "any_3", + "type": "*", + "link": 37 + }, + { + "name": "any_4", + "type": "*", + "link": null + }, + { + "name": "any_5", + "type": "*", + "link": null + }, + { + "name": "any_6", + "type": "*", + "link": null + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": [ + 32 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Pipe to/edit any [Crystools]" + } + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 175, + 100 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 13 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5, + 33 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 28 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5\\3d\\disneyPixarCartoon_v10.safetensors" + ] + }, + { + "id": 17, + "type": "Pipe from any [Crystools]", + "pos": [ + 650, + 475 + ], + "size": { + "0": 216.59999084472656, + "1": 146 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "link": 30 + } + ], + "outputs": [ + { + "name": "CPipeAny", + "type": "CPipeAny", + "links": [ + 31 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "any_1", + "type": "*", + "links": [], + "shape": 3, + "slot_index": 1 + }, + { + "name": "any_2", + "type": "*", + "links": [], + "shape": 3, + "slot_index": 2 + }, + { + "name": "any_3", + "type": "*", + "links": [ + 35 + ], + "shape": 3, + "slot_index": 3 + }, + { + "name": "any_4", + "type": "*", + "links": [], + "shape": 3, + "slot_index": 4 + }, + { + "name": "any_5", + "type": "*", + "links": [], + "shape": 3, + "slot_index": 5 + }, + { + "name": "any_6", + "type": "*", + "links": [ + 34 + ], + "shape": 3, + "slot_index": 6 + } + ], + "properties": { + "Node name for S&R": "Pipe from any [Crystools]" + } + }, + { + "id": 19, + "type": "ConditioningCombine", + "pos": [ + 925, + 750 + ], + "size": { + "0": 342.5999755859375, + "1": 46 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "conditioning_1", + "type": "CONDITIONING", + "link": 35 + }, + { + "name": "conditioning_2", + "type": "CONDITIONING", + "link": 36 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 37 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "ConditioningCombine" + } + }, + { + "id": 18, + "type": "CLIPTextEncode", + "pos": [ + 650, + 775 + ], + "size": [ + 200, + 75.99999237060547 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 34 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 36 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "at night" + ] + } + ], + "links": [ + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 13, + 4, + 0, + 14, + 1, + "*" + ], + [ + 17, + 15, + 1, + 3, + 0, + "MODEL" + ], + [ + 21, + 5, + 0, + 14, + 5, + "*" + ], + [ + 22, + 7, + 0, + 14, + 4, + "*" + ], + [ + 24, + 15, + 5, + 3, + 3, + "LATENT" + ], + [ + 25, + 15, + 4, + 3, + 2, + "CONDITIONING" + ], + [ + 26, + 15, + 3, + 3, + 1, + "CONDITIONING" + ], + [ + 27, + 15, + 2, + 8, + 1, + "VAE" + ], + [ + 28, + 4, + 2, + 14, + 2, + "*" + ], + [ + 29, + 6, + 0, + 14, + 3, + "*" + ], + [ + 30, + 14, + 0, + 17, + 0, + "CPipeAny" + ], + [ + 31, + 17, + 0, + 16, + 0, + "CPipeAny" + ], + [ + 32, + 16, + 0, + 15, + 0, + "CPipeAny" + ], + [ + 33, + 4, + 1, + 14, + 6, + "*" + ], + [ + 34, + 17, + 6, + 18, + 0, + "CLIP" + ], + [ + 35, + 17, + 3, + 19, + 0, + "CONDITIONING" + ], + [ + 36, + 18, + 0, + 19, + 1, + "CONDITIONING" + ], + [ + 37, + 19, + 0, + 16, + 3, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/switch.json b/samples/switch.json new file mode 100644 index 0000000..e29ac1a --- /dev/null +++ b/samples/switch.json @@ -0,0 +1,496 @@ +{ + "last_node_id": 12, + "last_link_id": 16, + "nodes": [ + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 425, + 525 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 475, + 750 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1675, + 325 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 8, + "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": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1900, + 325 + ], + "size": { + "0": 210, + "1": 275 + }, + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 50, + 625 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5, + 14 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5\\3d\\disneyPixarCartoon_v10.safetensors" + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 1325, + 325 + ], + "size": { + "0": 325, + "1": 475 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 13 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 7 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 425, + 325 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 16 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 10, + "type": "CLIPTextEncode", + "pos": [ + 425, + 100 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 14 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 15 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, in the bottle should be a cat (seen the camera:1.2), purple galaxy bottle," + ] + }, + { + "id": 11, + "type": "Switch conditioning [Crystools]", + "pos": [ + 950, + 200 + ], + "size": { + "0": 315, + "1": 78 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "on_true", + "type": "CONDITIONING", + "link": 15 + }, + { + "name": "on_false", + "type": "CONDITIONING", + "link": 16 + } + ], + "outputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "links": [ + 13 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Switch conditioning [Crystools]" + }, + "widgets_values": [ + true + ] + }, + { + "id": 12, + "type": "Note", + "pos": [ + 950, + 75 + ], + "size": [ + 300, + 52 + ], + "flags": {}, + "order": 2, + "mode": 0, + "properties": { + "text": "" + }, + "widgets_values": [ + "change the switch to select a prompt" + ], + "color": "#432", + "bgcolor": "#653" + } + ], + "links": [ + [ + 1, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 6, + 7, + 0, + 3, + 2, + "CONDITIONING" + ], + [ + 7, + 3, + 0, + 8, + 0, + "LATENT" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 13, + 11, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 14, + 4, + 1, + 10, + 0, + "CLIP" + ], + [ + 15, + 10, + 0, + 11, + 0, + "CONDITIONING" + ], + [ + 16, + 6, + 0, + 11, + 1, + "CONDITIONING" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/utils-json-comparator.json b/samples/utils-json-comparator.json new file mode 100644 index 0000000..d301312 --- /dev/null +++ b/samples/utils-json-comparator.json @@ -0,0 +1,212 @@ +{ + "last_node_id": 4, + "last_link_id": 3, + "nodes": [ + { + "id": 1, + "type": "Load image with metadata [Crystools]", + "pos": [ + 200, + 250 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": [ + 1 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00314_20-8-euler.png", + "image" + ] + }, + { + "id": 2, + "type": "Load image with metadata [Crystools]", + "pos": [ + 200, + 700 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": null, + "shape": 3 + }, + { + "name": "mask", + "type": "MASK", + "links": null, + "shape": 3 + }, + { + "name": "prompt", + "type": "JSON", + "links": [ + 2 + ], + "shape": 3, + "slot_index": 2 + }, + { + "name": "Metadata RAW", + "type": "METADATA_RAW", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Load image with metadata [Crystools]" + }, + "widgets_values": [ + "tests/ComfyUI_00315_21-81-heun.png", + "image" + ] + }, + { + "id": 3, + "type": "Json comparator [Crystools]", + "pos": [ + 650, + 275 + ], + "size": { + "0": 279.5999755859375, + "1": 46 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "json_old", + "type": "JSON", + "link": 1 + }, + { + "name": "json_new", + "type": "JSON", + "link": 2 + } + ], + "outputs": [ + { + "name": "json_compared", + "type": "JSON", + "links": [ + 3 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Json comparator [Crystools]" + } + }, + { + "id": 4, + "type": "Show any to JSON [Crystools]", + "pos": [ + 650, + 450 + ], + "size": [ + 325, + 350 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "any_value", + "type": "*", + "link": 3 + } + ], + "outputs": [ + { + "name": "string", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "Show any to JSON [Crystools]" + } + } + ], + "links": [ + [ + 1, + 1, + 2, + 3, + 0, + "JSON" + ], + [ + 2, + 2, + 2, + 3, + 1, + "JSON" + ], + [ + 3, + 3, + 0, + 4, + 0, + "*" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/samples/utils-stats.json b/samples/utils-stats.json new file mode 100644 index 0000000..c5da951 --- /dev/null +++ b/samples/utils-stats.json @@ -0,0 +1,410 @@ +{ + "last_node_id": 10, + "last_link_id": 11, + "nodes": [ + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 413, + 389 + ], + "size": { + "0": 425.27801513671875, + "1": 180.6060791015625 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 5 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "text, watermark" + ] + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 415, + 186 + ], + "size": { + "0": 422.84503173828125, + "1": 164.31304931640625 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 3 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 4 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," + ] + }, + { + "id": 5, + "type": "EmptyLatentImage", + "pos": [ + 473, + 609 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 2 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "EmptyLatentImage" + }, + "widgets_values": [ + 512, + 512, + 1 + ] + }, + { + "id": 8, + "type": "VAEDecode", + "pos": [ + 1675, + 300 + ], + "size": { + "0": 210, + "1": 46 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 11 + }, + { + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 9 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + } + }, + { + "id": 4, + "type": "CheckpointLoaderSimple", + "pos": [ + 26, + 474 + ], + "size": { + "0": 315, + "1": 98 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ], + "slot_index": 0 + }, + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 3, + 5 + ], + "slot_index": 1 + }, + { + "name": "VAE", + "type": "VAE", + "links": [ + 8 + ], + "slot_index": 2 + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "SD1.5\\3d\\disneyPixarCartoon_v10.safetensors" + ] + }, + { + "id": 3, + "type": "KSampler", + "pos": [ + 863, + 186 + ], + "size": [ + 325, + 475 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 2 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 10 + ], + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 156680208700286, + "fixed", + 20, + 8, + "euler", + "normal", + 1 + ] + }, + { + "id": 10, + "type": "Stats system [Crystools]", + "pos": [ + 1275, + 175 + ], + "size": [ + 350, + 125 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "latent", + "type": "LATENT", + "link": 10 + } + ], + "outputs": [ + { + "name": "latent", + "type": "LATENT", + "links": [ + 11 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Stats system [Crystools]" + } + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 1925, + 300 + ], + "size": [ + 200, + 275 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 9 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + } + ], + "links": [ + [ + 1, + 4, + 0, + 3, + 0, + "MODEL" + ], + [ + 2, + 5, + 0, + 3, + 3, + "LATENT" + ], + [ + 3, + 4, + 1, + 6, + 0, + "CLIP" + ], + [ + 4, + 6, + 0, + 3, + 1, + "CONDITIONING" + ], + [ + 5, + 4, + 1, + 7, + 0, + "CLIP" + ], + [ + 6, + 7, + 0, + 3, + 2, + "CONDITIONING" + ], + [ + 8, + 4, + 2, + 8, + 1, + "VAE" + ], + [ + 9, + 8, + 0, + 9, + 0, + "IMAGE" + ], + [ + 10, + 3, + 0, + 10, + 0, + "LATENT" + ], + [ + 11, + 10, + 0, + 8, + 0, + "LATENT" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file