diff --git a/pyproject.toml b/pyproject.toml index 7f08b70..bffe2f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,12 @@ [project] name = "comfyui_panels" description = "Comics/Manga like panel layouts." -version = "1.1.4" -license = { file = "LICENSE" } -dependencies = ["shapely==2.1.1", "matplotlib==3.10.6", "opencv-python~=4.8.1.78"] +version = "1.1.5" +license = "MIT" +dependencies = ["shapely==2.1.1", "matplotlib==3.10.6", "opencv-python>=4.13"] + +[tool.setuptools] +packages = [] [project.urls] Repository = "https://github.com/bmad4ever/comfyui_panels" diff --git a/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.jpg b/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.jpg new file mode 100644 index 0000000..99b3d26 Binary files /dev/null and b/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.jpg differ diff --git a/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.json b/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.json new file mode 100644 index 0000000..d1856ad --- /dev/null +++ b/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.json @@ -0,0 +1,1324 @@ +{ + "id": "bedc8e49-22df-4e4c-9131-ca3416b0b573", + "revision": 0, + "last_node_id": 57, + "last_link_id": 135, + "nodes": [ + { + "id": 10, + "type": "ConditioningZeroOut", + "pos": [ + 3305.441650390625, + 1213.3902587890625 + ], + "size": [ + 204.134765625, + 26 + ], + "flags": { + "collapsed": true + }, + "order": 19, + "mode": 0, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 8 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 6 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "ConditioningZeroOut" + }, + "widgets_values": [] + }, + { + "id": 12, + "type": "VAELoader", + "pos": [ + 1949.061767578125, + 849.966796875 + ], + "size": [ + 320.233642578125, + 58 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 11, + 16, + 25 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "VAELoader" + }, + "widgets_values": [ + "qwen_image_vae.safetensors" + ] + }, + { + "id": 41, + "type": "StringConcatenate", + "pos": [ + 2564.916259765625, + 705.1135864257812 + ], + "size": [ + 227.3355255126953, + 166 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "string_b", + "type": "STRING", + "widget": { + "name": "string_b" + }, + "link": 135 + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 80 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "StringConcatenate" + }, + "widgets_values": [ + "add a single speech bubble from image 2 to image 1 with the text: ", + "", + "" + ] + }, + { + "id": 21, + "type": "MaskPreview", + "pos": [ + 2667.698974609375, + 1365.3485107421875 + ], + "size": [ + 140, + 246 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 126 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "MaskPreview" + }, + "widgets_values": [] + }, + { + "id": 14, + "type": "VAEDecode", + "pos": [ + 3789.8876953125, + 1147.703125 + ], + "size": [ + 140, + 46 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 15 + }, + { + "name": "vae", + "type": "VAE", + "link": 16 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 23, + 121 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 34, + "type": "PrimitiveStringMultiline", + "pos": [ + 1965.066650390625, + 454.1806945800781 + ], + "size": [ + 210, + 88 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 133 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "PrimitiveStringMultiline" + }, + "widgets_values": [ + "I'VE GOT YOU CORNERED!" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 39, + "type": "PrimitiveStringMultiline", + "pos": [ + 1966.675048828125, + 598.7504272460938 + ], + "size": [ + 210, + 88 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 134 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "PrimitiveStringMultiline" + }, + "widgets_values": [ + "HEY! YOU'VE GOT THIS WRONG, I'M ON YOUR SIDE!" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 6, + "type": "CFGNorm", + "pos": [ + 3500.19873046875, + 1090.4952392578125 + ], + "size": [ + 270, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 1 + } + ], + "outputs": [ + { + "name": "patched_model", + "type": "MODEL", + "links": [ + 5 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "CFGNorm" + }, + "widgets_values": [ + 1, + false + ] + }, + { + "id": 5, + "type": "ModelSamplingAuraFlow", + "pos": [ + 3499.8154296875, + 1041.1734619140625 + ], + "size": [ + 270, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 4 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 1 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "ModelSamplingAuraFlow" + }, + "widgets_values": [ + 3 + ] + }, + { + "id": 26, + "type": "Note", + "pos": [ + 2243.7724609375, + 1198.1339111328125 + ], + "size": [ + 266.0765686035156, + 92.50411987304688 + ], + "flags": { + "collapsed": false + }, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "the mask should have \"generous\" margins; otherwise some of the content at the edges might get distorted, and important visual information, such as the source of the speech, is not taken into account." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 25, + "type": "PreviewImage", + "pos": [ + 2824.0234375, + 1363.2138671875 + ], + "size": [ + 140, + 246 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 127 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 51, + "type": "bmad_PasteCrops", + "pos": [ + 3986.186279296875, + 1209.4744873046875 + ], + "size": [ + 222.56231689453125, + 86 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "base_image", + "type": "IMAGE", + "link": 100 + }, + { + "name": "cropped_images", + "type": "IMAGE", + "link": 121 + }, + { + "name": "masks", + "type": "MASK", + "link": 124 + }, + { + "name": "bboxes", + "type": "BBOX", + "link": 125 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 107 + ] + } + ], + "properties": { + "cnr_id": "comfyui_panels", + "ver": "a4325913fc7f9759d4f6f2112824395f7db095c7", + "Node name for S&R": "bmad_PasteCrops", + "aux_id": "bmad4ever/comfyui_panels" + }, + "widgets_values": [] + }, + { + "id": 19, + "type": "VAEEncode", + "pos": [ + 2990.522705078125, + 1140.832763671875 + ], + "size": [ + 140, + 46 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "pixels", + "type": "IMAGE", + "link": 130 + }, + { + "name": "vae", + "type": "VAE", + "link": 25 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 52 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "VAEEncode" + }, + "widgets_values": [] + }, + { + "id": 18, + "type": "SetLatentNoiseMask", + "pos": [ + 2986.810302734375, + 1241.9473876953125 + ], + "size": [ + 188.1373046875, + 46 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 52 + }, + { + "name": "mask", + "type": "MASK", + "link": 123 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 120 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.64", + "Node name for S&R": "SetLatentNoiseMask" + }, + "widgets_values": [] + }, + { + "id": 56, + "type": "bmad_CropMaskHolesQuantizedPadded", + "pos": [ + 2522.332763671875, + 1131.177490234375 + ], + "size": [ + 210, + 98 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 122 + }, + { + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": 131 + } + ], + "outputs": [ + { + "name": "cropped_masks", + "shape": 6, + "type": "MASK", + "links": [ + 123, + 124, + 126 + ] + }, + { + "name": "cropped_images", + "shape": 6, + "type": "IMAGE", + "links": [ + 127, + 130, + 132 + ] + }, + { + "name": "crop_boxes", + "shape": 6, + "type": "BBOX", + "links": [ + 125 + ] + } + ], + "properties": { + "cnr_id": "comfyui_panels", + "ver": "a4325913fc7f9759d4f6f2112824395f7db095c7", + "Node name for S&R": "bmad_CropMaskHolesQuantizedPadded", + "aux_id": "bmad4ever/comfyui_panels" + }, + "widgets_values": [ + 16 + ] + }, + { + "id": 17, + "type": "PreviewImage", + "pos": [ + 3793.5159140625005, + 1337.201046875001 + ], + "size": [ + 396.7499000000007, + 258 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 23 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [] + }, + { + "id": 24, + "type": "PreviewImage", + "pos": [ + 4234.6640625, + 1156.453857421875 + ], + "size": [ + 276, + 432.63997192382794 + ], + "flags": {}, + "order": 24, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 107 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 2, + "type": "LoadImage", + "pos": [ + 1955.318115234375, + 1359.6353759765625 + ], + "size": [ + 270, + 314 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 10 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load Image (Speech Bubbles)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "bubble.jpg", + "image" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 9, + "type": "CLIPLoader", + "pos": [ + 3109.1513671875, + 804.5313110351562 + ], + "size": [ + 371.4522399902344, + 106 + ], + "flags": { + "collapsed": false + }, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 7 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "CLIPLoader" + }, + "widgets_values": [ + "qwen2.5\\qwen_2.5_vl_7b_fp8_scaled.safetensors", + "qwen_image", + "default" + ] + }, + { + "id": 3, + "type": "UnetLoaderGGUF", + "pos": [ + 3501.2109375, + 802.1852416992188 + ], + "size": [ + 374.9490051269531, + 58 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 3 + ] + } + ], + "properties": { + "cnr_id": "comfyui-gguf", + "ver": "1.1.4", + "Node name for S&R": "UnetLoaderGGUF" + }, + "widgets_values": [ + "qwen\\Qwen-Image-Edit-2509-Q4_K_M.gguf" + ] + }, + { + "id": 8, + "type": "LoraLoaderModelOnly", + "pos": [ + 3500.63720703125, + 909.1355590820312 + ], + "size": [ + 516.2432861328125, + 82 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 3 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 4 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "LoraLoaderModelOnly" + }, + "widgets_values": [ + "qwen_lightning\\Qwen-Image-Lightning-8steps-V2.0-bf16.safetensors", + 1 + ] + }, + { + "id": 1, + "type": "LoadImage", + "pos": [ + 1960.478759765625, + 988.9674682617188 + ], + "size": [ + 270, + 314.00006103515625 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 100, + 131 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 122 + ] + } + ], + "title": "Load Image (Comic's Page)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "LoadImage", + "image": "clipspace/clipspace-painted-masked-1782252581299.png [input]" + }, + "widgets_values": [ + "clipspace/clipspace-painted-masked-1782252581299.png [input]", + "image" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 11, + "type": "TextEncodeQwenImageEditPlus", + "pos": [ + 3243.70361328125, + 1149.472900390625 + ], + "size": [ + 249.9341796875, + 168 + ], + "flags": { + "collapsed": true + }, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 7 + }, + { + "name": "vae", + "shape": 7, + "type": "VAE", + "link": 11 + }, + { + "name": "image1", + "shape": 7, + "type": "IMAGE", + "link": 132 + }, + { + "name": "image2", + "shape": 7, + "type": "IMAGE", + "link": 10 + }, + { + "name": "image3", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 80 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 8, + 22 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "TextEncodeQwenImageEditPlus" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 57, + "type": "CreateList", + "pos": [ + 2254.687074524776, + 525.8764707306095 + ], + "size": [ + 140, + 66 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "label": "input0", + "name": "inputs.input0", + "type": "STRING", + "link": 133 + }, + { + "label": "input1", + "name": "inputs.input1", + "shape": 7, + "type": "STRING", + "link": 134 + }, + { + "label": "input2", + "name": "inputs.input2", + "shape": 7, + "type": "STRING", + "link": null + } + ], + "outputs": [ + { + "name": "list", + "shape": 6, + "type": "STRING", + "links": [ + 135 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.24.0", + "Node name for S&R": "CreateList" + } + }, + { + "id": 4, + "type": "KSampler", + "pos": [ + 3505.391845703125, + 1145.427001953125 + ], + "size": [ + 270, + 262 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 5 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 22 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 6 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 120 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 15 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.62", + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 72304872954, + "fixed", + 8, + 1, + "euler_ancestral_cfg_pp", + "simple", + 1 + ] + } + ], + "links": [ + [ + 1, + 5, + 0, + 6, + 0, + "MODEL" + ], + [ + 3, + 3, + 0, + 8, + 0, + "MODEL" + ], + [ + 4, + 8, + 0, + 5, + 0, + "MODEL" + ], + [ + 5, + 6, + 0, + 4, + 0, + "MODEL" + ], + [ + 6, + 10, + 0, + 4, + 2, + "CONDITIONING" + ], + [ + 7, + 9, + 0, + 11, + 0, + "CLIP" + ], + [ + 8, + 11, + 0, + 10, + 0, + "CONDITIONING" + ], + [ + 10, + 2, + 0, + 11, + 3, + "IMAGE" + ], + [ + 11, + 12, + 0, + 11, + 1, + "VAE" + ], + [ + 15, + 4, + 0, + 14, + 0, + "LATENT" + ], + [ + 16, + 12, + 0, + 14, + 1, + "VAE" + ], + [ + 22, + 11, + 0, + 4, + 1, + "CONDITIONING" + ], + [ + 23, + 14, + 0, + 17, + 0, + "IMAGE" + ], + [ + 25, + 12, + 0, + 19, + 1, + "VAE" + ], + [ + 52, + 19, + 0, + 18, + 0, + "LATENT" + ], + [ + 80, + 41, + 0, + 11, + 5, + "STRING" + ], + [ + 100, + 1, + 0, + 51, + 0, + "IMAGE" + ], + [ + 107, + 51, + 0, + 24, + 0, + "IMAGE" + ], + [ + 120, + 18, + 0, + 4, + 3, + "LATENT" + ], + [ + 121, + 14, + 0, + 51, + 1, + "IMAGE" + ], + [ + 122, + 1, + 1, + 56, + 0, + "MASK" + ], + [ + 123, + 56, + 0, + 18, + 1, + "MASK" + ], + [ + 124, + 56, + 0, + 51, + 2, + "MASK" + ], + [ + 125, + 56, + 2, + 51, + 3, + "BBOX" + ], + [ + 126, + 56, + 0, + 21, + 0, + "MASK" + ], + [ + 127, + 56, + 1, + 25, + 0, + "IMAGE" + ], + [ + 130, + 56, + 1, + 19, + 0, + "IMAGE" + ], + [ + 131, + 1, + 0, + 56, + 1, + "IMAGE" + ], + [ + 132, + 56, + 1, + 11, + 2, + "IMAGE" + ], + [ + 133, + 34, + 0, + 57, + 0, + "STRING" + ], + [ + 134, + 39, + 0, + 57, + 1, + "STRING" + ], + [ + 135, + 57, + 0, + 41, + 0, + "STRING" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.4240976183724849, + "offset": [ + -1653.9624030552363, + -77.02869058341723 + ] + }, + "frontendVersion": "1.44.19" + }, + "version": 0.4 +} \ No newline at end of file diff --git a/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.png b/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.png deleted file mode 100644 index 9bbd0d2..0000000 Binary files a/workflows/QwenEdit2509 Oneshot Multiple Speech Bubbles.png and /dev/null differ