diff --git a/examples/Rubberhose_00224_.png b/examples/Rubberhose_00224_.png new file mode 100644 index 0000000..d473931 Binary files /dev/null and b/examples/Rubberhose_00224_.png differ diff --git a/examples/example_workflow.json b/examples/example_workflow.json new file mode 100644 index 0000000..552a7a0 --- /dev/null +++ b/examples/example_workflow.json @@ -0,0 +1,334 @@ +{ + "id": "a7ae0076-1954-4958-9c4f-6b060bc0543c", + "revision": 0, + "last_node_id": 10, + "last_link_id": 6, + "nodes": [ + { + "id": 3, + "type": "VectorizerAINode", + "pos": [ + 1952.170654296875, + 13.687800407409668 + ], + "size": [ + 414.8005065917969, + 348 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 6 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 4 + ] + }, + { + "name": "svg_data", + "type": "STRING", + "links": [ + 3 + ] + } + ], + "properties": { + "aux_id": "rickrender/ComfyUI-Vectorizer-API", + "ver": "23e94cf7b9cd1e8210b1ac6e81de1618da9df5ac", + "Node name for S&R": "VectorizerAINode" + }, + "widgets_values": [ + "", + "", + "scaled_png", + "production", + 4, + "SVG/vector", + "SVG/vector_raw", + 0, + true, + true, + true + ] + }, + { + "id": 4, + "type": "Note", + "pos": [ + 1960.788330078125, + 427.8229064941406 + ], + "size": [ + 414.212158203125, + 338.44049072265625 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The API node interfaces with vectorizer.ai to convert the gernerated image into a scalable vector graphic file.\n\n---------------------------------------------------------\nModes: \n\ntest = free result with watermark for dev/testing purposes.\n\nproduction = final version a result costs 1 credit.\n---------------------------------------------------------\nOutput format:\nSVG - Only an SVG file will be produced. \n\nPNG - Only a PNG based on the SVG will be produced. \n\nSCALED_PNG - SVG file and scaled PNG will be produced.\n\nScaling is set to 4 to upscaled to 4096 in this instance.\n---------------------------------------------------------\n\nYour app_id and api_secret values can be saved in a file named \"config.json\" located in the custom_nodes/ComfyUI-Vectorizer-API folder in the root directory, credentials can also be directly entered into the fields within the node." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 5, + "type": "BackgroundRemoverSVGNode", + "pos": [ + 2417.090087890625, + 416.7936096191406 + ], + "size": [ + 288.9956970214844, + 146 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "svg_data", + "type": "STRING", + "link": 3 + } + ], + "outputs": [ + { + "name": "image_rgba", + "type": "IMAGE", + "links": [ + 5 + ] + }, + { + "name": "mask", + "type": "MASK", + "links": [] + }, + { + "name": "modified_svg_data", + "type": "STRING", + "links": [] + } + ], + "properties": { + "aux_id": "rickrender/ComfyUI-Vectorizer-API", + "ver": "23e94cf7b9cd1e8210b1ac6e81de1618da9df5ac", + "Node name for S&R": "BackgroundRemoverSVGNode" + }, + "widgets_values": [ + 4, + true, + "SVG/vector_edited" + ] + }, + { + "id": 6, + "type": "Note", + "pos": [ + 2427.8251953125, + 618.817626953125 + ], + "size": [ + 272.72515869140625, + 151.01153564453125 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The \"Background Remover (Shape)\" node works by detecting single largest vector shape in the returned SVG file from vectorizer.ai regardless of color. This is the cleanest form of background removal because it isn't pixel based. " + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 7, + "type": "Note", + "pos": [ + 2428.529541015625, + 819.9007568359375 + ], + "size": [ + 272.72515869140625, + 151.01153564453125 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The \"Background Remover (Color)\" node works by detecting the primary color at the border of the input image to determine what the chroma key value will be. In this example the value detected would be the saturated green. The threshold value allows for smaller adjustments, too high of a value will remove other colors." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 8, + "type": "PreviewImage", + "pos": [ + 2412.35400390625, + 15.341730117797852 + ], + "size": [ + 301.6251525878906, + 335.54302978515625 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 4 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.49", + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 2744.03125, + 24.653419494628906 + ], + "size": [ + 582.0178833007812, + 605.7946166992188 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 5 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.49", + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "SVG/vector_alpha" + ] + }, + { + "id": 10, + "type": "LoadImage", + "pos": [ + 1384.81591796875, + 21.321231842041016 + ], + "size": [ + 498.1614990234375, + 689.2748413085938 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 6 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.49", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "Rubberhose_00224_.png", + "image" + ] + } + ], + "links": [ + [ + 3, + 3, + 1, + 5, + 0, + "STRING" + ], + [ + 4, + 3, + 0, + 8, + 0, + "IMAGE" + ], + [ + 5, + 5, + 0, + 9, + 0, + "IMAGE" + ], + [ + 6, + 10, + 0, + 3, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.9229599817707047, + "offset": [ + -886.435068783151, + 158.44825483533648 + ] + }, + "frontendVersion": "1.23.4", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} \ No newline at end of file diff --git a/examples/vector_alpha_00004_.png b/examples/vector_alpha_00004_.png new file mode 100644 index 0000000..6686fec Binary files /dev/null and b/examples/vector_alpha_00004_.png differ diff --git a/examples/vector_edited_00001.svg b/examples/vector_edited_00001.svg new file mode 100644 index 0000000..8f9c83a --- /dev/null +++ b/examples/vector_edited_00001.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/vector_raw_00002.svg b/examples/vector_raw_00002.svg new file mode 100644 index 0000000..5a88326 --- /dev/null +++ b/examples/vector_raw_00002.svg @@ -0,0 +1,2684 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/vector_raw_00002_scaled_4.0x.png b/examples/vector_raw_00002_scaled_4.0x.png new file mode 100644 index 0000000..7c1cca7 Binary files /dev/null and b/examples/vector_raw_00002_scaled_4.0x.png differ