diff --git a/assets/example.png b/assets/example.png new file mode 100644 index 0000000..14817f0 Binary files /dev/null and b/assets/example.png differ diff --git a/example/Snap Area example.json b/example/Snap Area example.json new file mode 100644 index 0000000..ba2b875 --- /dev/null +++ b/example/Snap Area example.json @@ -0,0 +1,206 @@ +{ + "last_node_id": 5, + "last_link_id": 3, + "nodes": [ + { + "id": 2, + "type": "LoadImage", + "pos": { + "0": 890, + "1": 640 + }, + "size": [ + 320, + 340 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 1 + ], + "shape": 3, + "label": "图像" + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3, + "label": "遮罩" + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "ComfyUI_temp_omgsc_00002_.png", + "image" + ] + }, + { + "id": 1, + "type": "AreaCalculator", + "pos": { + "0": 1230, + "1": 640 + }, + "size": [ + 210, + 80 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 1, + "label": "image" + } + ], + "outputs": [ + { + "name": "面积", + "type": "INT", + "links": [ + 2 + ], + "shape": 3, + "label": "面积", + "slot_index": 0 + }, + { + "name": "占比%", + "type": "INT", + "links": [ + 3 + ], + "shape": 3, + "label": "占比%", + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "AreaCalculator" + }, + "widgets_values": [ + "black" + ] + }, + { + "id": 4, + "type": "Display Int (rgthree)", + "pos": { + "0": 1500, + "1": 580 + }, + "size": [ + 315, + 76 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "input", + "type": "INT", + "link": 2, + "widget": { + "name": "input" + }, + "label": "输入", + "dir": 3 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "Display Int (rgthree)" + }, + "widgets_values": [ + 0, + "" + ] + }, + { + "id": 5, + "type": "Display Int (rgthree)", + "pos": { + "0": 1500, + "1": 720 + }, + "size": [ + 315, + 76 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "input", + "type": "INT", + "link": 3, + "widget": { + "name": "input" + }, + "label": "输入", + "dir": 3 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "Display Int (rgthree)" + }, + "widgets_values": [ + 0, + "" + ] + } + ], + "links": [ + [ + 1, + 2, + 0, + 1, + 0, + "IMAGE" + ], + [ + 2, + 1, + 0, + 4, + 0, + "INT" + ], + [ + 3, + 1, + 1, + 5, + 0, + "INT" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 2.143588810000002, + "offset": [ + -794.0233330383926, + -449.2264101434639 + ] + } + }, + "version": 0.4 +} \ No newline at end of file