diff --git a/example/controlnet.json b/example/controlnet.json new file mode 100644 index 0000000..9e04cac --- /dev/null +++ b/example/controlnet.json @@ -0,0 +1,567 @@ +{ + "last_node_id": 66, + "last_link_id": 156, + "nodes": [ + { + "id": 52, + "type": "LoadImage", + "pos": [ + 563, + 988 + ], + "size": { + "0": 315, + "1": 314 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 125 + ], + "shape": 3, + "label": "图像", + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3, + "label": "遮罩" + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "engin-akyurt-aXVro7lQyUM-unsplash.jpg", + "image" + ] + }, + { + "id": 63, + "type": "Pops_Repo_Choice", + "pos": [ + 945, + 536 + ], + "size": { + "0": 315, + "1": 154 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "repo_id", + "type": "STRING", + "links": [ + 151 + ], + "shape": 3, + "label": "repo_id", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Pops_Repo_Choice" + }, + "widgets_values": [ + "kandinsky-community\\kandinsky-2-2-prior", + "", + "kandinsky-community\\kandinsky-2-2-decoder", + "", + "F:/test/ComfyUI/models/diffusers/pOpsPaper/operators" + ] + }, + { + "id": 57, + "type": "SaveImage", + "pos": [ + 2101, + 912 + ], + "size": { + "0": 330.43426513671875, + "1": 319.4027404785156 + }, + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 156, + "label": "图像", + "slot_index": 0 + } + ], + "properties": {}, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 23, + "type": "Imgae_To_Path", + "pos": [ + 962, + 789 + ], + "size": { + "0": 292.20001220703125, + "1": 102 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 126, + "label": "image", + "slot_index": 0 + }, + { + "name": "image_operator", + "type": "IMAGE", + "link": 125, + "label": "image_operator" + } + ], + "outputs": [ + { + "name": "inputs_a", + "type": "STRING", + "links": [ + 107 + ], + "shape": 3, + "label": "inputs_a", + "slot_index": 0 + }, + { + "name": "inputs_b", + "type": "STRING", + "links": [ + 108 + ], + "shape": 3, + "label": "inputs_b", + "slot_index": 1 + } + ], + "properties": { + "Node name for S&R": "Imgae_To_Path" + }, + "widgets_values": [ + 1024, + 1024 + ] + }, + { + "id": 3, + "type": "LoadImage", + "pos": [ + 551, + 598 + ], + "size": { + "0": 315, + "1": 314 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 126, + 152 + ], + "shape": 3, + "label": "图像", + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3, + "label": "遮罩" + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "birmingham-museums-trust-q2OwlfXAYfo-unsplash (1).jpg", + "image" + ] + }, + { + "id": 49, + "type": "Pops_Prior_Embedding", + "pos": [ + 1302, + 758 + ], + "size": { + "0": 315, + "1": 418 + }, + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "repo_id", + "type": "STRING", + "link": 151, + "widget": { + "name": "repo_id" + }, + "label": "repo_id" + }, + { + "name": "inputs_a", + "type": "STRING", + "link": 107, + "widget": { + "name": "inputs_a" + }, + "label": "inputs_a" + }, + { + "name": "inputs_b", + "type": "STRING", + "link": 108, + "widget": { + "name": "inputs_b" + }, + "label": "inputs_b" + } + ], + "outputs": [ + { + "name": "model", + "type": "MODEL", + "links": [], + "shape": 3, + "label": "model", + "slot_index": 0 + }, + { + "name": "prior", + "type": "MODEL", + "links": [], + "shape": 3, + "label": "prior", + "slot_index": 1 + }, + { + "name": "prior_pipeline", + "type": "MODEL", + "links": [], + "shape": 3, + "label": "prior_pipeline", + "slot_index": 2 + }, + { + "name": "positive", + "type": "CONDITIONING", + "links": [ + 154 + ], + "shape": 3, + "label": "positive", + "slot_index": 3 + }, + { + "name": "negative", + "type": "CONDITIONING", + "links": [], + "shape": 3, + "label": "negative", + "slot_index": 4 + }, + { + "name": "input_hidden_state", + "type": "CONDITIONING", + "links": [], + "shape": 3, + "label": "input_hidden_state", + "slot_index": 5 + }, + { + "name": "img_emb_file", + "type": "STRING", + "links": [], + "shape": 3, + "label": "img_emb_file", + "slot_index": 6 + } + ], + "properties": { + "Node name for S&R": "Pops_Prior_Embedding" + }, + "widgets_values": [ + "", + "shiny", + "", + "", + false, + false, + 1, + 1068031740, + "randomize", + 25, + "texturing", + 1024, + 1024 + ] + }, + { + "id": 64, + "type": "CannyEdgePreprocessor", + "pos": [ + 1312, + 575 + ], + "size": { + "0": 315, + "1": 106 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 152, + "label": "图像" + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 153 + ], + "shape": 3, + "label": "图像", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CannyEdgePreprocessor" + }, + "widgets_values": [ + 100, + 200, + 512 + ] + }, + { + "id": 66, + "type": "ControlNetLoader", + "pos": [ + 1305, + 1265 + ], + "size": { + "0": 315, + "1": 58 + }, + "flags": {}, + "order": 3, + "mode": 0, + "outputs": [ + { + "name": "CONTROL_NET", + "type": "CONTROL_NET", + "links": [ + 155 + ], + "shape": 3, + "label": "ControlNet" + } + ], + "properties": { + "Node name for S&R": "ControlNetLoader" + }, + "widgets_values": [ + "diffusers_xl_canny_full.safetensors" + ] + }, + { + "id": 65, + "type": "Pops_Controlnet_Sampler", + "pos": [ + 1737, + 897 + ], + "size": { + "0": 315, + "1": 290 + }, + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 153, + "label": "image" + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 154, + "label": "positive", + "slot_index": 1 + }, + { + "name": "control_net", + "type": "CONTROL_NET", + "link": 155, + "label": "control_net", + "slot_index": 2 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 156 + ], + "shape": 3, + "label": "image", + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Pops_Controlnet_Sampler" + }, + "widgets_values": [ + "sdxl\\sdxl_vae.safetensors", + "0SDXL\\juggernautXL_v8Rundiffusion.safetensors", + 1077817195, + "randomize", + 50, + 1, + 0.5, + 512, + 512 + ] + } + ], + "links": [ + [ + 107, + 23, + 0, + 49, + 1, + "STRING" + ], + [ + 108, + 23, + 1, + 49, + 2, + "STRING" + ], + [ + 125, + 52, + 0, + 23, + 1, + "IMAGE" + ], + [ + 126, + 3, + 0, + 23, + 0, + "IMAGE" + ], + [ + 151, + 63, + 0, + 49, + 0, + "STRING" + ], + [ + 152, + 3, + 0, + 64, + 0, + "IMAGE" + ], + [ + 153, + 64, + 0, + 65, + 0, + "IMAGE" + ], + [ + 154, + 49, + 3, + 65, + 1, + "CONDITIONING" + ], + [ + 155, + 66, + 0, + 65, + 2, + "CONTROL_NET" + ], + [ + 156, + 65, + 0, + 57, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 1, + "offset": [ + -385.74859749605423, + -395.9021269720864 + ] + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/example/example_controlnet.png b/example/example_controlnet.png new file mode 100644 index 0000000..4e4cbc7 Binary files /dev/null and b/example/example_controlnet.png differ