diff --git a/__init__.py b/__init__.py index 87fc590..99c8c6a 100644 --- a/__init__.py +++ b/__init__.py @@ -92,3 +92,17 @@ except ModuleNotFoundError: from .src.LanPaint.nodes import NODE_DISPLAY_NAME_MAPPINGS WEB_DIRECTORY = "./web" + + +# --------------------------------------------------------------------------- +# Server routes โ€” registered only when running inside ComfyUI (the ``server`` +# module and ``folder_paths`` are ComfyUI internals not available in CI/tests). +# --------------------------------------------------------------------------- +try: + from server import PromptServer # noqa: F811 (re-export for convenience) + + from .src.LanPaint.videometa import register_routes + + register_routes(PromptServer.instance) +except Exception: + pass # not running inside ComfyUI โ€” routes are not needed diff --git a/example_workflows/Flux.2.Dev_Inpaint.jpg b/example_workflows/Flux.2.Dev_Inpaint.jpg deleted file mode 100644 index 276c274..0000000 Binary files a/example_workflows/Flux.2.Dev_Inpaint.jpg and /dev/null differ diff --git a/example_workflows/Flux.2.Dev_Inpaint.json b/example_workflows/Flux.2.Dev_Inpaint.json deleted file mode 100644 index c956153..0000000 --- a/example_workflows/Flux.2.Dev_Inpaint.json +++ /dev/null @@ -1,1886 +0,0 @@ -{ - "id": "7c048efb-a059-44e2-970a-43e1eb472d0d", - "revision": 0, - "last_node_id": 96, - "last_link_id": 216, - "nodes": [ - { - "id": 66, - "type": "MarkdownNote", - "pos": [ - -1520, - -90 - ], - "size": [ - 520, - 620 - ], - "flags": { - "collapsed": false - }, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [], - "title": "Model links", - "properties": { - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "We are using quantized weights in this workflow, the original flux 2 repo is [here](https://huggingface.co/black-forest-labs/FLUX.2-dev/)\n\nGuide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Report issue\n\nNote: please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare the required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n\n\n## Model links (for local user)\n\n**text_encoders**\n\n- [mistral_3_small_flux2_bf16.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors)\n\n**loras**\n\n- [Flux_2-Turbo-LoRA_comfyui.safetensors](https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/main/Flux_2-Turbo-LoRA_comfyui.safetensors)\n\n**diffusion_models**\n\n- [flux2_dev_fp8mixed.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€ mistral_3_small_flux2_bf16.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ loras/\nโ”‚ โ”‚ โ””โ”€โ”€ Flux_2-Turbo-LoRA_comfyui.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ flux2_dev_fp8mixed.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ flux2-vae.safetensors\n```\n" - ], - "color": "#432", - "bgcolor": "#000" - }, - { - "id": 79, - "type": "UNETLoader", - "pos": [ - -401.41628465424867, - -156.8843633555234 - ], - "size": [ - 298.1818181818182, - 82 - ], - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "slot_index": 0, - "links": [ - 185 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "UNETLoader", - "models": [ - { - "name": "flux2_dev_fp8mixed.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors", - "directory": "diffusion_models" - }, - { - "name": "flux2_dev_fp8mixed.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors", - "directory": "diffusion_models" - } - ], - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "flux2_dev_fp8mixed.safetensors", - "default" - ] - }, - { - "id": 81, - "type": "CLIPLoader", - "pos": [ - -401.4162846542488, - -19.521307052209544 - ], - "size": [ - 298.1818181818182, - 106 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "CLIP", - "type": "CLIP", - "links": [ - 180 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "CLIPLoader", - "models": [ - { - "name": "mistral_3_small_flux2_bf16.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors", - "directory": "text_encoders" - }, - { - "name": "mistral_3_small_flux2_bf16.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors", - "directory": "text_encoders" - } - ], - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "mistral_3_small_flux2_fp8.safetensors", - "flux2", - "default" - ] - }, - { - "id": 82, - "type": "RandomNoise", - "pos": [ - 604.667192628257, - -167.60127519776313 - ], - "size": [ - 222.3482666015625, - 82 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "NOISE", - "type": "NOISE", - "links": [ - 191 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "RandomNoise", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 221284764102256, - "randomize" - ] - }, - { - "id": 83, - "type": "BasicGuider", - "pos": [ - 604.667192628257, - -47.60127519776313 - ], - "size": [ - 222.3482666015625, - 46 - ], - "flags": {}, - "order": 22, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 185 - }, - { - "name": "conditioning", - "type": "CONDITIONING", - "link": 184 - } - ], - "outputs": [ - { - "name": "GUIDER", - "type": "GUIDER", - "slot_index": 0, - "links": [ - 192 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "BasicGuider", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 84, - "type": "KSamplerSelect", - "pos": [ - 604.667192628257, - 42.39872480223687 - ], - "size": [ - 222.3482666015625, - 58 - ], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "SAMPLER", - "type": "SAMPLER", - "links": [ - 193 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "KSamplerSelect", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "euler" - ] - }, - { - "id": 85, - "type": "Flux2Scheduler", - "pos": [ - 599.6491345888401, - 141.28360079347743 - ], - "size": [ - 222.3482666015625, - 106 - ], - "flags": {}, - "order": 14, - "mode": 0, - "inputs": [ - { - "name": "width", - "type": "INT", - "widget": { - "name": "width" - }, - "link": 187 - }, - { - "name": "height", - "type": "INT", - "widget": { - "name": "height" - }, - "link": 189 - } - ], - "outputs": [ - { - "name": "SIGMAS", - "type": "SIGMAS", - "links": [ - 194 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "Flux2Scheduler", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 20, - 1248, - 832 - ] - }, - { - "id": 78, - "type": "CLIPTextEncode", - "pos": [ - 134.66719262825703, - -138.83597106805018 - ], - "size": [ - 430, - 200 - ], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 180 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 176 - ] - } - ], - "title": "CLIP Text Encode (Positive Prompt)", - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "CLIPTextEncode", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "the woman is wearing a light green dress" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 76, - "type": "FluxGuidance", - "pos": [ - 200.2864376852714, - 104.86432229906939 - ], - "size": [ - 317.4000244140625, - 58 - ], - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "conditioning", - "type": "CONDITIONING", - "link": 176 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 177 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "FluxGuidance", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 4 - ], - "color": "#233", - "bgcolor": "#355" - }, - { - "id": 86, - "type": "EmptyFlux2LatentImage", - "pos": [ - 734.667192628257, - 392.39872480223687 - ], - "size": [ - 270, - 106 - ], - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [ - { - "name": "width", - "type": "INT", - "widget": { - "name": "width" - }, - "link": 188 - }, - { - "name": "height", - "type": "INT", - "widget": { - "name": "height" - }, - "link": 190 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "EmptyFlux2LatentImage", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 1248, - 832, - 1 - ] - }, - { - "id": 88, - "type": "LanPaint_SamplerCustomAdvanced", - "pos": [ - 1001.9202375599866, - -344.1504889090143 - ], - "size": [ - 400, - 568 - ], - "flags": {}, - "order": 23, - "mode": 0, - "inputs": [ - { - "name": "noise", - "type": "NOISE", - "link": 191 - }, - { - "name": "guider", - "type": "GUIDER", - "link": 192 - }, - { - "name": "sampler", - "type": "SAMPLER", - "link": 193 - }, - { - "name": "sigmas", - "type": "SIGMAS", - "link": 194 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 205 - } - ], - "outputs": [ - { - "name": "output", - "type": "LATENT", - "links": [ - 196 - ] - }, - { - "name": "denoised_output", - "type": "LATENT", - "links": [] - } - ], - "properties": { - "cnr_id": "LanPaint", - "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", - "Node name for S&R": "LanPaint_SamplerCustomAdvanced", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 5, - 16, - 0.15, - 1, - 15, - "Image First", - 1, - "LanPaint Custom Sampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", - "๐Ÿ–ผ๏ธ Image Inpainting" - ] - }, - { - "id": 9, - "type": "SaveImage", - "pos": [ - 2146.7738256571624, - -100.1827620657212 - ], - "size": [ - 470, - 470 - ], - "flags": {}, - "order": 26, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 206 - } - ], - "outputs": [], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "SaveImage", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Flux2" - ] - }, - { - "id": 87, - "type": "VAEDecode", - "pos": [ - 1486.9921123979855, - 399.4471845577673 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 24, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 196 - }, - { - "name": "vae", - "type": "VAE", - "link": 179 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "slot_index": 0, - "links": [ - 203 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "VAEDecode", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 77, - "type": "VAELoader", - "pos": [ - -401.41628465424867, - 115.11563664447654 - ], - "size": [ - 298.1818181818182, - 60.429901123046875 - ], - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "slot_index": 0, - "links": [ - 179, - 181, - 207, - 210 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "VAELoader", - "models": [ - { - "name": "flux2-vae.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", - "directory": "vae" - }, - { - "name": "flux2-vae.safetensors", - "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", - "directory": "vae" - } - ], - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "flux2-vae.safetensors" - ] - }, - { - "id": 89, - "type": "ReferenceLatent", - "pos": [ - 182.88585037431145, - 261.7022748558416 - ], - "size": [ - 204.134765625, - 46 - ], - "flags": {}, - "order": 21, - "mode": 4, - "inputs": [ - { - "name": "conditioning", - "type": "CONDITIONING", - "link": 177 - }, - { - "name": "latent", - "shape": 7, - "type": "LATENT", - "link": 201 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 184 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "ReferenceLatent", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 93, - "type": "LanPaint_MaskBlend", - "pos": [ - 1918.4282656529942, - -298.1303483829989 - ], - "size": [ - 270, - 98 - ], - "flags": {}, - "order": 25, - "mode": 0, - "inputs": [ - { - "name": "image1", - "type": "IMAGE", - "link": 216 - }, - { - "name": "image2", - "type": "IMAGE", - "link": 203 - }, - { - "name": "mask", - "type": "MASK", - "link": 202 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 206 - ] - } - ], - "properties": { - "cnr_id": "LanPaint", - "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", - "Node name for S&R": "LanPaint_MaskBlend", - "ue_properties": { - "widget_ue_connectable": { - "blend_overlap": true - }, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 9 - ] - }, - { - "id": 45, - "type": "ImageScaleToTotalPixels", - "pos": [ - -942.2953950329953, - 300.7707910339225 - ], - "size": [ - 270, - 106 - ], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 128 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 208, - 214 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "ImageScaleToTotalPixels", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "lanczos", - 1, - 1 - ] - }, - { - "id": 94, - "type": "VAEEncode", - "pos": [ - -904.8642154697659, - 545.7584311148781 - ], - "size": [ - 140, - 46 - ], - "flags": { - "collapsed": true - }, - "order": 11, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 208 - }, - { - "name": "vae", - "type": "VAE", - "link": 207 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 209 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "VAEEncode", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 95, - "type": "VAEDecode", - "pos": [ - -922.5241424443258, - 609.877550591736 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 209 - }, - { - "name": "vae", - "type": "VAE", - "link": 210 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "slot_index": 0, - "links": [ - 211 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "VAEDecode", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 90, - "type": "GetImageSize", - "pos": [ - -914.6494032834313, - 736.2708355567737 - ], - "size": [ - 140, - 124 - ], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 211 - } - ], - "outputs": [ - { - "name": "width", - "type": "INT", - "links": [ - 187, - 188, - 197, - 212 - ] - }, - { - "name": "height", - "type": "INT", - "links": [ - 189, - 190, - 198, - 213 - ] - }, - { - "name": "batch_size", - "type": "INT", - "links": [] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.7.0", - "Node name for S&R": "GetImageSize", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "width: 1024, height: 1024\n batch size: 1" - ] - }, - { - "id": 91, - "type": "VAEEncode", - "pos": [ - -256.8351358960004, - 471.2386874112704 - ], - "size": [ - 140, - 46 - ], - "flags": { - "collapsed": true - }, - "order": 19, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 215 - }, - { - "name": "vae", - "type": "VAE", - "link": 181 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 200 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "VAEEncode", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 96, - "type": "ImageScale", - "pos": [ - -541.9051701853617, - 509.13038411372514 - ], - "size": [ - 269.921875, - 152.8125 - ], - "flags": {}, - "order": 17, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 214 - }, - { - "name": "width", - "type": "INT", - "widget": { - "name": "width" - }, - "link": 212 - }, - { - "name": "height", - "type": "INT", - "widget": { - "name": "height" - }, - "link": 213 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 215, - 216 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.52", - "Node name for S&R": "ImageScale", - "ue_properties": { - "widget_ue_connectable": { - "width": true, - "height": true - }, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "area", - 512, - 512, - "center" - ] - }, - { - "id": 92, - "type": "SetLatentNoiseMask", - "pos": [ - -47.37803371329864, - 552.1340734941332 - ], - "size": [ - 188.1373046875, - 46 - ], - "flags": {}, - "order": 20, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 200 - }, - { - "name": "mask", - "type": "MASK", - "link": 199 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 201, - 205 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.51", - "Node name for S&R": "SetLatentNoiseMask", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 73, - "type": "MaskToImage", - "pos": [ - -514.7896658923698, - 909.9351737467276 - ], - "size": [ - 193.2779296875, - 26 - ], - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "mask", - "type": "MASK", - "link": 173 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 174 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.51", - "Node name for S&R": "MaskToImage", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 74, - "type": "ImageScale", - "pos": [ - -559.3815806117882, - 1005.5195473781431 - ], - "size": [ - 270, - 130 - ], - "flags": {}, - "order": 16, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 174 - }, - { - "name": "width", - "type": "INT", - "widget": { - "name": "width" - }, - "link": 197 - }, - { - "name": "height", - "type": "INT", - "widget": { - "name": "height" - }, - "link": 198 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 175 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.52", - "Node name for S&R": "ImageScale", - "ue_properties": { - "widget_ue_connectable": { - "width": true, - "height": true - }, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "nearest-exact", - 512, - 512, - "center" - ] - }, - { - "id": 75, - "type": "ImageToMask", - "pos": [ - -556.7866782788742, - 1200.3106983669886 - ], - "size": [ - 270, - 58 - ], - "flags": {}, - "order": 18, - "mode": 0, - "inputs": [ - { - "name": "image", - "type": "IMAGE", - "link": 175 - } - ], - "outputs": [ - { - "name": "MASK", - "type": "MASK", - "links": [ - 199, - 202 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.51", - "Node name for S&R": "ImageToMask", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "red" - ] - }, - { - "id": 46, - "type": "LoadImage", - "pos": [ - -960, - -90 - ], - "size": [ - 274.080078125, - 314 - ], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 128 - ] - }, - { - "name": "MASK", - "type": "MASK", - "links": [ - 173 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.71", - "Node name for S&R": "LoadImage", - "enableTabs": false, - "tabWidth": 65, - "tabXOffset": 10, - "hasSecondTab": false, - "secondTabText": "Send Back", - "secondTabOffset": 80, - "secondTabWidth": 65, - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - }, - "image": "clipspace/clipspace-painted-masked-1768018054791.png [input]" - }, - "widgets_values": [ - "inpaint_1768016968051.png", - "image" - ] - } - ], - "links": [ - [ - 128, - 46, - 0, - 45, - 0, - "IMAGE" - ], - [ - 173, - 46, - 1, - 73, - 0, - "MASK" - ], - [ - 174, - 73, - 0, - 74, - 0, - "IMAGE" - ], - [ - 175, - 74, - 0, - 75, - 0, - "IMAGE" - ], - [ - 176, - 78, - 0, - 76, - 0, - "CONDITIONING" - ], - [ - 177, - 76, - 0, - 89, - 0, - "CONDITIONING" - ], - [ - 179, - 77, - 0, - 87, - 1, - "VAE" - ], - [ - 180, - 81, - 0, - 78, - 0, - "CLIP" - ], - [ - 181, - 77, - 0, - 91, - 1, - "VAE" - ], - [ - 184, - 89, - 0, - 83, - 1, - "CONDITIONING" - ], - [ - 185, - 79, - 0, - 83, - 0, - "MODEL" - ], - [ - 187, - 90, - 0, - 85, - 0, - "INT" - ], - [ - 188, - 90, - 0, - 86, - 0, - "INT" - ], - [ - 189, - 90, - 1, - 85, - 1, - "INT" - ], - [ - 190, - 90, - 1, - 86, - 1, - "INT" - ], - [ - 191, - 82, - 0, - 88, - 0, - "NOISE" - ], - [ - 192, - 83, - 0, - 88, - 1, - "GUIDER" - ], - [ - 193, - 84, - 0, - 88, - 2, - "SAMPLER" - ], - [ - 194, - 85, - 0, - 88, - 3, - "SIGMAS" - ], - [ - 196, - 88, - 0, - 87, - 0, - "LATENT" - ], - [ - 197, - 90, - 0, - 74, - 1, - "INT" - ], - [ - 198, - 90, - 1, - 74, - 2, - "INT" - ], - [ - 199, - 75, - 0, - 92, - 1, - "MASK" - ], - [ - 200, - 91, - 0, - 92, - 0, - "LATENT" - ], - [ - 201, - 92, - 0, - 89, - 1, - "LATENT" - ], - [ - 202, - 75, - 0, - 93, - 2, - "MASK" - ], - [ - 203, - 87, - 0, - 93, - 1, - "IMAGE" - ], - [ - 205, - 92, - 0, - 88, - 4, - "LATENT" - ], - [ - 206, - 93, - 0, - 9, - 0, - "IMAGE" - ], - [ - 207, - 77, - 0, - 94, - 1, - "VAE" - ], - [ - 208, - 45, - 0, - 94, - 0, - "IMAGE" - ], - [ - 209, - 94, - 0, - 95, - 0, - "LATENT" - ], - [ - 210, - 77, - 0, - 95, - 1, - "VAE" - ], - [ - 211, - 95, - 0, - 90, - 0, - "IMAGE" - ], - [ - 212, - 90, - 0, - 96, - 1, - "INT" - ], - [ - 213, - 90, - 1, - 96, - 2, - "INT" - ], - [ - 214, - 45, - 0, - 96, - 0, - "IMAGE" - ], - [ - 215, - 96, - 0, - 91, - 0, - "IMAGE" - ], - [ - 216, - 96, - 0, - 93, - 0, - "IMAGE" - ] - ], - "groups": [ - { - "id": 1, - "title": "Models", - "bounding": [ - -408.2335481707614, - -234.8843633555234, - 318.18181818181813, - 416.0299011230469 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 2, - "title": "Custom sampler", - "bounding": [ - 594.667192628257, - -237.60127519776313, - 558.5359191894531, - 501.6 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 3, - "title": "Image size", - "bounding": [ - 594.667192628257, - 282.39872480223687, - 560, - 285.6 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 4, - "title": "Prompt", - "bounding": [ - 124.667192628257, - -237.60127519776313, - 450, - 420 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - } - ], - "config": {}, - "extra": { - "frontendVersion": "1.35.9", - "workflowRendererVersion": "LG", - "groupNodes": {}, - "VHS_latentpreview": false, - "VHS_latentpreviewrate": 0, - "VHS_MetadataImage": true, - "VHS_KeepIntermediate": true, - "ue_links": [], - "links_added_by_ue": [], - "ds": { - "scale": 0.5530652774381023, - "offset": [ - 394.2039301836752, - 627.2932212537274 - ] - } - }, - "version": 0.4 -} \ No newline at end of file diff --git a/example_workflows/Flux2Dev_ImageEncode_Inpaint.jpg b/example_workflows/Flux2Dev_ImageEncode_Inpaint.jpg new file mode 100644 index 0000000..e126f7c Binary files /dev/null and b/example_workflows/Flux2Dev_ImageEncode_Inpaint.jpg differ diff --git a/example_workflows/Flux2Dev_ImageEncode_Inpaint.json b/example_workflows/Flux2Dev_ImageEncode_Inpaint.json new file mode 100644 index 0000000..728489a --- /dev/null +++ b/example_workflows/Flux2Dev_ImageEncode_Inpaint.json @@ -0,0 +1,1503 @@ +{ + "id": "7c048efb-a059-44e2-970a-43e1eb472d0d", + "revision": 0, + "last_node_id": 101, + "last_link_id": 232, + "nodes": [ + { + "id": 66, + "type": "MarkdownNote", + "pos": [ + -1520, + -90 + ], + "size": [ + 520, + 620 + ], + "flags": { + "collapsed": false + }, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Model links", + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "We are using quantized weights in this workflow, the original flux 2 repo is [here](https://huggingface.co/black-forest-labs/FLUX.2-dev/)\n\nGuide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Report issue\n\nNote: please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare the required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n\n\n## Model links (for local user)\n\n**text_encoders**\n\n- [mistral_3_small_flux2_bf16.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors)\n\n**loras**\n\n- [Flux_2-Turbo-LoRA_comfyui.safetensors](https://huggingface.co/ByteZSzn/Flux.2-Turbo-ComfyUI/resolve/main/Flux_2-Turbo-LoRA_comfyui.safetensors)\n\n**diffusion_models**\n\n- [flux2_dev_fp8mixed.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€ mistral_3_small_flux2_bf16.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ loras/\nโ”‚ โ”‚ โ””โ”€โ”€ Flux_2-Turbo-LoRA_comfyui.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ flux2_dev_fp8mixed.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ flux2-vae.safetensors\n```\n" + ], + "color": "#432", + "bgcolor": "#000" + }, + { + "id": 79, + "type": "UNETLoader", + "pos": [ + -401.41628465424867, + -156.8843633555234 + ], + "size": [ + 298.1818181818182, + 82 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 185 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "flux2_dev_fp8mixed.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors", + "directory": "diffusion_models" + }, + { + "name": "flux2_dev_fp8mixed.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/diffusion_models/flux2_dev_fp8mixed.safetensors", + "directory": "diffusion_models" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "flux2_dev_fp8mixed.safetensors", + "default" + ] + }, + { + "id": 81, + "type": "CLIPLoader", + "pos": [ + -401.4162846542488, + -19.521307052209544 + ], + "size": [ + 298.1818181818182, + 106 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 180 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "mistral_3_small_flux2_bf16.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors", + "directory": "text_encoders" + }, + { + "name": "mistral_3_small_flux2_bf16.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/text_encoders/mistral_3_small_flux2_bf16.safetensors", + "directory": "text_encoders" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "mistral_3_small_flux2_fp8.safetensors", + "flux2", + "default" + ] + }, + { + "id": 82, + "type": "RandomNoise", + "pos": [ + 604.667192628257, + -167.60127519776313 + ], + "size": [ + 222.3482666015625, + 82 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "NOISE", + "type": "NOISE", + "links": [ + 191 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "RandomNoise", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 221284764102256, + "randomize" + ] + }, + { + "id": 83, + "type": "BasicGuider", + "pos": [ + 604.667192628257, + -47.60127519776313 + ], + "size": [ + 222.3482666015625, + 46 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 185 + }, + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 184 + } + ], + "outputs": [ + { + "name": "GUIDER", + "type": "GUIDER", + "slot_index": 0, + "links": [ + 192 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "BasicGuider", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 84, + "type": "KSamplerSelect", + "pos": [ + 604.667192628257, + 42.39872480223687 + ], + "size": [ + 222.3482666015625, + 58 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 193 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "KSamplerSelect", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "euler" + ] + }, + { + "id": 85, + "type": "Flux2Scheduler", + "pos": [ + 599.6491345888401, + 141.28360079347743 + ], + "size": [ + 222.3482666015625, + 106 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 187 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 189 + } + ], + "outputs": [ + { + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 194 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "Flux2Scheduler", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 20, + 1248, + 832 + ] + }, + { + "id": 78, + "type": "CLIPTextEncode", + "pos": [ + 134.66719262825703, + -138.83597106805018 + ], + "size": [ + 430, + 200 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 180 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 176 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "CLIPTextEncode", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "the woman is wearing a light green dress" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 76, + "type": "FluxGuidance", + "pos": [ + 200.2864376852714, + 104.86432229906939 + ], + "size": [ + 317.4000244140625, + 58 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 176 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 177 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "FluxGuidance", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 4 + ], + "color": "#233", + "bgcolor": "#355" + }, + { + "id": 86, + "type": "EmptyFlux2LatentImage", + "pos": [ + 734.667192628257, + 392.39872480223687 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 188 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 190 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "EmptyFlux2LatentImage", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 1248, + 832, + 1 + ] + }, + { + "id": 88, + "type": "LanPaint_SamplerCustomAdvanced", + "pos": [ + 1001.9202375599866, + -344.1504889090143 + ], + "size": [ + 400, + 568 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "noise", + "type": "NOISE", + "link": 191 + }, + { + "name": "guider", + "type": "GUIDER", + "link": 192 + }, + { + "name": "sampler", + "type": "SAMPLER", + "link": 193 + }, + { + "name": "sigmas", + "type": "SIGMAS", + "link": 194 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 221 + } + ], + "outputs": [ + { + "name": "output", + "type": "LATENT", + "links": [ + 222 + ] + }, + { + "name": "denoised_output", + "type": "LATENT", + "links": [ + 222 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "Node name for S&R": "LanPaint_SamplerCustomAdvanced", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 5, + 5.0, + 0.15, + 1, + 15, + "Image First", + 1, + "LanPaint Custom Sampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!" + ] + }, + { + "id": 9, + "type": "SaveImage", + "pos": [ + 2146.7738256571624, + -100.1827620657212 + ], + "size": [ + 470, + 470 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 226 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "SaveImage", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Flux2" + ] + }, + { + "id": 77, + "type": "VAELoader", + "pos": [ + -401.41628465424867, + 115.11563664447654 + ], + "size": [ + 298.1818181818182, + 60.429901123046875 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "slot_index": 0, + "links": [ + 218, + 223 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "flux2-vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", + "directory": "vae" + }, + { + "name": "flux2-vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", + "directory": "vae" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "flux2-vae.safetensors" + ] + }, + { + "id": 89, + "type": "ReferenceLatent", + "pos": [ + 182.88585037431145, + 261.7022748558416 + ], + "size": [ + 204.134765625, + 46 + ], + "flags": {}, + "order": 21, + "mode": 4, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 177 + }, + { + "name": "latent", + "shape": 7, + "type": "LATENT", + "link": 220 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 184 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "ReferenceLatent", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 45, + "type": "ImageScaleToTotalPixels", + "pos": [ + -942.2953950329953, + 300.7707910339225 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 128 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 217, + 224, + 227 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "ImageScaleToTotalPixels", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "lanczos", + 1, + 1 + ] + }, + { + "id": 90, + "type": "GetImageSize", + "pos": [ + -914.6494032834313, + 736.2708355567737 + ], + "size": [ + 140, + 124 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 227 + } + ], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": [ + 187, + 188 + ] + }, + { + "name": "height", + "type": "INT", + "links": [ + 187, + 188 + ] + }, + { + "name": "batch_size", + "type": "INT", + "links": [ + 187, + 188 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.7.0", + "Node name for S&R": "GetImageSize", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "width: 1024, height: 1024\n batch size: 1" + ] + }, + { + "id": 46, + "type": "LoadImage", + "pos": [ + -960, + -90 + ], + "size": [ + 274.080078125, + 314 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 128 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 128 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "LoadImage", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + }, + "image": "clipspace/clipspace-painted-masked-1768018054791.png [input]" + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (16).png", + "image" + ] + }, + { + "id": 97, + "type": "LanPaint_ImageEncode", + "pos": [ + -260, + 470 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 217 + }, + { + "name": "vae", + "type": "VAE", + "link": 218 + }, + { + "name": "mask", + "type": "MASK", + "link": 231 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 220, + 221 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "Node name for S&R": "LanPaint_ImageEncode", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 98, + "type": "LanPaint_ImageDecode", + "pos": [ + 1900, + -100 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 31, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 222 + }, + { + "name": "vae", + "type": "VAE", + "link": 223 + }, + { + "name": "image", + "type": "IMAGE", + "link": 224 + }, + { + "name": "mask", + "type": "MASK", + "link": 232 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 226 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "Node name for S&R": "LanPaint_ImageDecode", + "ue_properties": { + "widget_ue_connectable": { + "blend_overlap": true + }, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 9 + ] + }, + { + "id": 99, + "type": "MaskToImage", + "pos": [ + -960, + 250 + ], + "size": [ + 140, + 46 + ], + "flags": {}, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 228 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 229 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "MaskToImage", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 100, + "type": "ImageScaleToTotalPixels", + "pos": [ + -960, + 320 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 229 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 230 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "ImageScaleToTotalPixels", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "nearest-exact", + 1, + 1 + ] + }, + { + "id": 101, + "type": "ImageToMask", + "pos": [ + -700, + 320 + ], + "size": [ + 140, + 46 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 230 + } + ], + "outputs": [ + { + "name": "MASK", + "type": "MASK", + "slot_index": 0, + "links": [ + 231, + 232 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.71", + "Node name for S&R": "ImageToMask", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "red" + ] + } + ], + "links": [ + [ + 128, + 46, + 0, + 45, + 0, + "IMAGE" + ], + [ + 176, + 78, + 0, + 76, + 0, + "CONDITIONING" + ], + [ + 177, + 76, + 0, + 89, + 0, + "CONDITIONING" + ], + [ + 180, + 81, + 0, + 78, + 0, + "CLIP" + ], + [ + 184, + 89, + 0, + 83, + 1, + "CONDITIONING" + ], + [ + 185, + 79, + 0, + 83, + 0, + "MODEL" + ], + [ + 187, + 90, + 0, + 85, + 0, + "INT" + ], + [ + 188, + 90, + 0, + 86, + 0, + "INT" + ], + [ + 189, + 90, + 1, + 85, + 1, + "INT" + ], + [ + 190, + 90, + 1, + 86, + 1, + "INT" + ], + [ + 191, + 82, + 0, + 88, + 0, + "NOISE" + ], + [ + 192, + 83, + 0, + 88, + 1, + "GUIDER" + ], + [ + 193, + 84, + 0, + 88, + 2, + "SAMPLER" + ], + [ + 194, + 85, + 0, + 88, + 3, + "SIGMAS" + ], + [ + 217, + 45, + 0, + 97, + 0, + "IMAGE" + ], + [ + 218, + 77, + 0, + 97, + 1, + "VAE" + ], + [ + 220, + 97, + 0, + 89, + 1, + "LATENT" + ], + [ + 221, + 97, + 0, + 88, + 4, + "LATENT" + ], + [ + 222, + 88, + 0, + 98, + 0, + "LATENT" + ], + [ + 223, + 77, + 0, + 98, + 1, + "VAE" + ], + [ + 224, + 45, + 0, + 98, + 2, + "IMAGE" + ], + [ + 226, + 98, + 0, + 9, + 0, + "IMAGE" + ], + [ + 227, + 45, + 0, + 90, + 0, + "IMAGE" + ], + [ + 228, + 46, + 1, + 99, + 0, + "MASK" + ], + [ + 229, + 99, + 0, + 100, + 0, + "IMAGE" + ], + [ + 230, + 100, + 0, + 101, + 0, + "IMAGE" + ], + [ + 231, + 101, + 0, + 97, + 2, + "MASK" + ], + [ + 232, + 101, + 0, + 98, + 3, + "MASK" + ] + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + -408.2335481707614, + -234.8843633555234, + 318.18181818181813, + 416.0299011230469 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Custom sampler", + "bounding": [ + 594.667192628257, + -237.60127519776313, + 558.5359191894531, + 501.6 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Image size", + "bounding": [ + 594.667192628257, + 282.39872480223687, + 560, + 285.6 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Prompt", + "bounding": [ + 124.667192628257, + -237.60127519776313, + 450, + 420 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "frontendVersion": "1.35.9", + "workflowRendererVersion": "LG", + "groupNodes": {}, + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ue_links": [], + "links_added_by_ue": [], + "ds": { + "scale": 0.5530652774381023, + "offset": [ + 394.2039301836752, + 627.2932212537274 + ] + } + }, + "version": 0.4 +} diff --git a/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.jpg b/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..9f5f046 Binary files /dev/null and b/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.json b/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..920943d --- /dev/null +++ b/example_workflows/Flux2_Klein_EncodeDecode_Inpaint.json @@ -0,0 +1,2385 @@ +{ + "id": "92112d97-bb64-4b44-86f2-ea5691ef8f6e", + "revision": 0, + "last_node_id": 193, + "last_link_id": 358, + "nodes": [ + { + "id": 9, + "type": "SaveImage", + "pos": [ + 2549.2912681843623, + 1036.468767583056 + ], + "size": [ + 416.640625, + 469.96875 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 346 + }, + { + "localized_name": "filename_prefix", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.8.2", + "Node name for S&R": "SaveImage", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Flux2-Klein-4b-base" + ] + }, + { + "id": 97, + "type": "MarkdownNote", + "pos": [ + -1656.406269494769, + 762.4937053843846 + ], + "size": [ + 609.96875, + 802.046875 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model links (for local users)\n\n**text_encoders**\n\n- [qwen_3_4b.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors)\n\n**diffusion_models**\n\n- [lux-2-klein-base-4b-fp8.safetensors](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€ qwen_3_4b.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ lux-2-klein-base-4b-fp8.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ flux2-vae.safetensors\n```\n\n## Report issue\n\nNote: please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare the required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 76, + "type": "LoadImage", + "pos": [ + -1412.9891350502332, + 880.2411842998931 + ], + "size": [ + 319.96875, + 469.96875 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "choose file to upload", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 345 + ] + }, + { + "localized_name": "MASK", + "name": "MASK", + "type": "MASK", + "links": [ + 345 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + }, + "image": "clipspace/clipspace-painted-masked-1774261273383.png [input]" + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (17).png", + "image" + ] + }, + { + "id": 150, + "type": "PrimitiveBoolean", + "pos": [ + -1568.5474189838785, + 1759.2225506066136 + ], + "size": [ + 986.1137330592571, + 61.705337315487895 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "BOOLEAN", + "widget": { + "name": "value" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "BOOLEAN", + "name": "BOOLEAN", + "type": "BOOLEAN", + "links": [ + 344 + ] + } + ], + "title": "Do you want the Klein model still reference the original image even in masked region? If not, use t2i style of promot instead of edit prompt", + "properties": { + "Node name for S&R": "PrimitiveBoolean" + }, + "widgets_values": [ + true + ] + }, + { + "id": 191, + "type": "0f9e08bc-ff60-41da-9d9f-0faf77cd927c", + "pos": [ + 581.9856411789561, + 1053.0699675387564 + ], + "size": [ + 297.8452383647941, + 218.704294345898 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 343 + }, + { + "name": "", + "type": "*", + "widget": { + "name": "" + }, + "link": 344 + }, + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 345 + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 346 + ] + } + ], + "title": "LanPaint + Klein", + "properties": { + "proxyWidgets": [ + [ + "182", + "switch" + ], + [ + "178", + "text" + ], + [ + "190", + "text" + ] + ] + }, + "widgets_values": [] + } + ], + "links": [ + [ + 343, + 76, + 1, + 191, + 0, + "MASK" + ], + [ + 344, + 150, + 0, + 191, + 1, + "BOOLEAN" + ], + [ + 345, + 76, + 0, + 191, + 2, + "IMAGE" + ], + [ + 346, + 191, + 0, + 9, + 0, + "IMAGE" + ] + ], + "groups": [], + "definitions": { + "subgraphs": [ + { + "id": "0f9e08bc-ff60-41da-9d9f-0faf77cd927c", + "version": 1, + "state": { + "lastGroupId": 4, + "lastNodeId": 193, + "lastLinkId": 358, + "lastRerouteId": 0 + }, + "revision": 0, + "config": {}, + "name": "LanPaint + Klein", + "inputNode": { + "id": -10, + "bounding": [ + -772.1778450451952, + 1183.4392511563367, + 128, + 108 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 2584.495039374102, + 1203.4392511563367, + 128, + 68 + ] + }, + "inputs": [ + { + "id": "1ecd71e3-93b0-4f8d-9e0d-aaf3c94076a3", + "name": "mask", + "type": "MASK", + "linkIds": [ + 337 + ], + "localized_name": "mask", + "pos": [ + -668.1778450451952, + 1207.4392511563367 + ] + }, + { + "id": "26cd03c1-9e4d-4333-9a73-04f47685505e", + "name": "", + "type": "*", + "linkIds": [ + 338, + 339, + 340 + ], + "pos": [ + -668.1778450451952, + 1227.4392511563367 + ] + }, + { + "id": "68f8fbb7-352f-46b9-aa46-28df70cac84a", + "name": "image", + "type": "IMAGE", + "linkIds": [ + 341 + ], + "localized_name": "image", + "pos": [ + -668.1778450451952, + 1247.4392511563367 + ] + } + ], + "outputs": [ + { + "id": "527ef442-5449-46c8-8943-d1380878e457", + "name": "IMAGE", + "type": "IMAGE", + "linkIds": [ + 342 + ], + "localized_name": "IMAGE", + "pos": [ + 2608.495039374102, + 1227.4392511563367 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 159, + "type": "MarkdownNote", + "pos": [ + 624.1600616207305, + 703.9344334344975 + ], + "size": [ + 224.984375, + 94.8125 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note", + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Click on the top-right corner of the node to open the [subgraph](https://docs.comfy.org/interface/features/subgraph) \n๐Ÿ‘‡" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 160, + "type": "VAELoader", + "pos": [ + 55.62812947641021, + 1056.7864761842059 + ], + "size": [ + 364.40625, + 82.25 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 348, + 354 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "flux2-vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", + "directory": "vae" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "flux2-vae.safetensors" + ] + }, + { + "id": 161, + "type": "CLIPLoader", + "pos": [ + 55.62812947641021, + 886.7863888262327 + ], + "size": [ + 364.40625, + 116.90625 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "clip_name", + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": null + }, + { + "localized_name": "type", + "name": "type", + "type": "COMBO", + "widget": { + "name": "type" + }, + "link": null + }, + { + "localized_name": "device", + "name": "device", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "device" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 320, + 322 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "qwen_3_4b.safetensors", + "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors", + "directory": "text_encoders" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "qwen_3_8b_fp8mixed.safetensors", + "flux2", + "default" + ] + }, + { + "id": 163, + "type": "CFGGuider", + "pos": [ + 1139.5302658271462, + 842.5132670132548 + ], + "size": [ + 269.96875, + 127.578125 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 299 + }, + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "link": 300 + }, + { + "localized_name": "negative", + "name": "negative", + "type": "CONDITIONING", + "link": 301 + }, + { + "localized_name": "cfg", + "name": "cfg", + "type": "FLOAT", + "widget": { + "name": "cfg" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "GUIDER", + "name": "GUIDER", + "type": "GUIDER", + "links": [ + 311 + ] + } + ], + "properties": { + "Node name for S&R": "CFGGuider", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 5 + ] + }, + { + "id": 164, + "type": "KSamplerSelect", + "pos": [ + 1139.5302658271462, + 982.5132431778821 + ], + "size": [ + 269.96875, + 82.25 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "sampler_name", + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "SAMPLER", + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 312 + ] + } + ], + "properties": { + "Node name for S&R": "KSamplerSelect", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "euler" + ] + }, + { + "id": 165, + "type": "Flux2Scheduler", + "pos": [ + 1139.5302658271462, + 1082.5131030104587 + ], + "size": [ + 269.96875, + 143.59375 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "localized_name": "steps", + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": null + }, + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 302 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 303 + } + ], + "outputs": [ + { + "localized_name": "SIGMAS", + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 313 + ] + } + ], + "properties": { + "Node name for S&R": "Flux2Scheduler", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 20, + 1024, + 1024 + ] + }, + { + "id": 167, + "type": "GetImageSize", + "pos": [ + 623.9907022963915, + 1267.2633222328395 + ], + "size": [ + 224.984375, + 159.578125 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 358 + } + ], + "outputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "links": [ + 302, + 307 + ] + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "links": [ + 302, + 307 + ] + }, + { + "localized_name": "batch_size", + "name": "batch_size", + "type": "INT", + "links": [ + 302, + 307 + ] + } + ], + "properties": { + "Node name for S&R": "GetImageSize", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 168, + "type": "RandomNoise", + "pos": [ + 1139.5302658271462, + 722.5131574601864 + ], + "size": [ + 269.96875, + 82 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "noise_seed", + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "NOISE", + "name": "NOISE", + "type": "NOISE", + "links": [ + 310 + ] + } + ], + "properties": { + "Node name for S&R": "RandomNoise", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 0, + "fixed" + ] + }, + { + "id": 169, + "type": "EmptyFlux2LatentImage", + "pos": [ + 893.4228114475226, + 1252.0446481437336 + ], + "size": [ + 269.96875, + 143.59375 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 307 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 308 + }, + { + "localized_name": "batch_size", + "name": "batch_size", + "type": "INT", + "widget": { + "name": "batch_size" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "LATENT", + "name": "LATENT", + "type": "LATENT", + "links": [] + } + ], + "properties": { + "Node name for S&R": "EmptyFlux2LatentImage", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 170, + "type": "UNETLoader", + "pos": [ + 55.62812947641021, + 736.7865990773674 + ], + "size": [ + 364.40625, + 82.25 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": null + }, + { + "localized_name": "weight_dtype", + "name": "weight_dtype", + "type": "COMBO", + "widget": { + "name": "weight_dtype" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 299 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "lux-2-klein-base-4b-fp8.safetensors", + "url": "https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors", + "directory": "diffusion_models" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "flux-2-klein-base-9b-fp8.safetensors", + "default" + ] + }, + { + "id": 174, + "type": "Reroute", + "pos": [ + 694.7566961139352, + 2082.2818314829265 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "widget": { + "name": "value" + }, + "link": 338 + } + ], + "outputs": [ + { + "name": "", + "type": "BOOLEAN", + "links": [ + 328 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 176, + "type": "ReferenceLatent", + "pos": [ + 1119.1810048876923, + 1838.5403602983847 + ], + "size": [ + 204.134765625, + 46 + ], + "flags": { + "collapsed": false + }, + "order": 24, + "mode": 0, + "inputs": [ + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 318 + }, + { + "localized_name": "latent", + "name": "latent", + "shape": 7, + "type": "LATENT", + "link": 350 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 330 + ] + } + ], + "properties": { + "Node name for S&R": "ReferenceLatent", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 177, + "type": "Reroute", + "pos": [ + 883.242794138779, + 1650.5182917584234 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 321 + } + ], + "outputs": [ + { + "name": "", + "type": "CONDITIONING", + "links": [ + 318, + 329 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 178, + "type": "CLIPTextEncode", + "pos": [ + 485.6284462179291, + 736.9532514630943 + ], + "size": [ + 429.96875, + 229.96875 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 322 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 323 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "change building's window light color to blue" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 179, + "type": "Reroute", + "pos": [ + 1033.2282553816917, + 1504.614293060217 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 323 + } + ], + "outputs": [ + { + "name": "", + "type": "CONDITIONING", + "links": [ + 324, + 326 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 180, + "type": "ReferenceLatent", + "pos": [ + 1159.8019865130454, + 1602.6058122453303 + ], + "size": [ + 210, + 46 + ], + "flags": { + "collapsed": false + }, + "order": 25, + "mode": 0, + "inputs": [ + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 324 + }, + { + "localized_name": "latent", + "name": "latent", + "shape": 7, + "type": "LATENT", + "link": 351 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 327 + ] + } + ], + "properties": { + "Node name for S&R": "ReferenceLatent", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 181, + "type": "ComfySwitchNode", + "pos": [ + 1533.4447652944255, + 1605.4094651677044 + ], + "size": [ + 270, + 78 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "CONDITIONING", + "link": 326 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "CONDITIONING", + "link": 327 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 328 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "CONDITIONING", + "links": [ + 300 + ] + } + ], + "properties": { + "Node name for S&R": "ComfySwitchNode" + }, + "widgets_values": [ + false + ] + }, + { + "id": 182, + "type": "ComfySwitchNode", + "pos": [ + 1439.2947375314434, + 1860.6802750453246 + ], + "size": [ + 270, + 78 + ], + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "CONDITIONING", + "link": 329 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "CONDITIONING", + "link": 330 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 339 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "CONDITIONING", + "links": [ + 301 + ] + } + ], + "properties": { + "Node name for S&R": "ComfySwitchNode" + }, + "widgets_values": [ + false + ] + }, + { + "id": 183, + "type": "PrimitiveInt", + "pos": [ + 1037.7504677972097, + 396.596670829747 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 331 + ] + } + ], + "properties": { + "Node name for S&R": "PrimitiveInt" + }, + "widgets_values": [ + 5, + "fixed" + ] + }, + { + "id": 184, + "type": "PrimitiveInt", + "pos": [ + 1044.8491341138592, + 533.3094780807312 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 332 + ] + } + ], + "properties": { + "Node name for S&R": "PrimitiveInt" + }, + "widgets_values": [ + 2, + "fixed" + ] + }, + { + "id": 185, + "type": "ComfySwitchNode", + "pos": [ + 1369.337082676484, + 467.165160354835 + ], + "size": [ + 270, + 78 + ], + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "INT", + "link": 331 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "INT", + "link": 332 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 340 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "INT", + "links": [ + 315 + ] + } + ], + "properties": { + "Node name for S&R": "ComfySwitchNode" + }, + "widgets_values": [ + false + ] + }, + { + "id": 189, + "type": "Note", + "pos": [ + 1981.9631121916382, + 1722.502836714068 + ], + "size": [ + 352.734375, + 139.75 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Bypass reference conditioning if you don't need reference" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 190, + "type": "CLIPTextEncode", + "pos": [ + 485.6284462179291, + 1066.9532294858702 + ], + "size": [ + 429.96875, + 115.59375 + ], + "flags": { + "collapsed": true + }, + "order": 9, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 320 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 321 + ] + } + ], + "title": "CLIP Text Encode (Negative Prompt)", + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.8.2", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 173, + "type": "LanPaint_SamplerCustomAdvanced", + "pos": [ + 1605.2161534535035, + 660.0081874939478 + ], + "size": [ + 291.4830078125, + 567.96875 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "localized_name": "noise", + "name": "noise", + "type": "NOISE", + "link": 310 + }, + { + "localized_name": "guider", + "name": "guider", + "type": "GUIDER", + "link": 311 + }, + { + "localized_name": "sampler", + "name": "sampler", + "type": "SAMPLER", + "link": 312 + }, + { + "localized_name": "sigmas", + "name": "sigmas", + "type": "SIGMAS", + "link": 313 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 352 + }, + { + "localized_name": "LanPaint_NumSteps", + "name": "LanPaint_NumSteps", + "type": "INT", + "widget": { + "name": "LanPaint_NumSteps" + }, + "link": 315 + }, + { + "localized_name": "LanPaint_Lambda", + "name": "LanPaint_Lambda", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Lambda" + }, + "link": null + }, + { + "localized_name": "LanPaint_StepSize", + "name": "LanPaint_StepSize", + "type": "FLOAT", + "widget": { + "name": "LanPaint_StepSize" + }, + "link": null + }, + { + "localized_name": "LanPaint_Beta", + "name": "LanPaint_Beta", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Beta" + }, + "link": null + }, + { + "localized_name": "LanPaint_Friction", + "name": "LanPaint_Friction", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Friction" + }, + "link": null + }, + { + "localized_name": "LanPaint_PromptMode", + "name": "LanPaint_PromptMode", + "type": "COMBO", + "widget": { + "name": "LanPaint_PromptMode" + }, + "link": null + }, + { + "localized_name": "LanPaint_EarlyStop", + "name": "LanPaint_EarlyStop", + "type": "INT", + "widget": { + "name": "LanPaint_EarlyStop" + }, + "link": null + }, + { + "localized_name": "LanPaint_Info", + "name": "LanPaint_Info", + "type": "STRING", + "widget": { + "name": "LanPaint_Info" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerThreshold", + "name": "LanPaint_InnerThreshold", + "type": "FLOAT", + "widget": { + "name": "LanPaint_InnerThreshold" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerPatience", + "name": "LanPaint_InnerPatience", + "type": "INT", + "widget": { + "name": "LanPaint_InnerPatience" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "LATENT", + "links": [ + 353 + ] + }, + { + "localized_name": "denoised_output", + "name": "denoised_output", + "type": "LATENT", + "links": [ + 353 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_SamplerCustomAdvanced", + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 2, + 5.0, + 0.2, + 1, + 15, + "Image First", + 1, + "LanPaint Custom Sampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", + 0, + 1, + "lanpaint_star_button" + ] + }, + { + "id": 192, + "type": "LanPaint_ImageEncode", + "pos": [ + 128, + 1745 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 347 + }, + { + "name": "vae", + "type": "VAE", + "link": 348 + }, + { + "name": "mask", + "type": "MASK", + "link": 349 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 350, + 351, + 352 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "Node name for S&R": "LanPaint_ImageEncode", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [] + }, + { + "id": 193, + "type": "LanPaint_ImageDecode", + "pos": [ + 2255, + 868 + ], + "size": [ + 270, + 106 + ], + "flags": {}, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 353 + }, + { + "name": "vae", + "type": "VAE", + "link": 354 + }, + { + "name": "image", + "type": "IMAGE", + "link": 355 + }, + { + "name": "mask", + "type": "MASK", + "link": 356 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 357 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "7b0d144db9aca6a4601e7c179b4c8103036e6e2b", + "Node name for S&R": "LanPaint_ImageDecode", + "ue_properties": { + "widget_ue_connectable": { + "blend_overlap": true + }, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 9 + ] + } + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + 51.96151307983905, + 652.925297851952, + 380, + 550 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "Prompt", + "bounding": [ + 471.9615130798395, + 652.925297851952, + 470, + 550 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Sampler", + "bounding": [ + 1139.8631647830107, + 658.485215165444, + 532.3638671875, + 550 + ], + "color": "#3f789e", + "flags": {} + } + ], + "links": [ + { + "id": 299, + "origin_id": 170, + "origin_slot": 0, + "target_id": 163, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 300, + "origin_id": 181, + "origin_slot": 0, + "target_id": 163, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 301, + "origin_id": 182, + "origin_slot": 0, + "target_id": 163, + "target_slot": 2, + "type": "CONDITIONING" + }, + { + "id": 302, + "origin_id": 167, + "origin_slot": 0, + "target_id": 165, + "target_slot": 1, + "type": "INT" + }, + { + "id": 303, + "origin_id": 167, + "origin_slot": 1, + "target_id": 165, + "target_slot": 2, + "type": "INT" + }, + { + "id": 307, + "origin_id": 167, + "origin_slot": 0, + "target_id": 169, + "target_slot": 0, + "type": "INT" + }, + { + "id": 308, + "origin_id": 167, + "origin_slot": 1, + "target_id": 169, + "target_slot": 1, + "type": "INT" + }, + { + "id": 310, + "origin_id": 168, + "origin_slot": 0, + "target_id": 173, + "target_slot": 0, + "type": "NOISE" + }, + { + "id": 311, + "origin_id": 163, + "origin_slot": 0, + "target_id": 173, + "target_slot": 1, + "type": "GUIDER" + }, + { + "id": 312, + "origin_id": 164, + "origin_slot": 0, + "target_id": 173, + "target_slot": 2, + "type": "SAMPLER" + }, + { + "id": 313, + "origin_id": 165, + "origin_slot": 0, + "target_id": 173, + "target_slot": 3, + "type": "SIGMAS" + }, + { + "id": 315, + "origin_id": 185, + "origin_slot": 0, + "target_id": 173, + "target_slot": 5, + "type": "INT" + }, + { + "id": 318, + "origin_id": 177, + "origin_slot": 0, + "target_id": 176, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 321, + "origin_id": 190, + "origin_slot": 0, + "target_id": 177, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 322, + "origin_id": 161, + "origin_slot": 0, + "target_id": 178, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 323, + "origin_id": 178, + "origin_slot": 0, + "target_id": 179, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 324, + "origin_id": 179, + "origin_slot": 0, + "target_id": 180, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 326, + "origin_id": 179, + "origin_slot": 0, + "target_id": 181, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 327, + "origin_id": 180, + "origin_slot": 0, + "target_id": 181, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 328, + "origin_id": 174, + "origin_slot": 0, + "target_id": 181, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 329, + "origin_id": 177, + "origin_slot": 0, + "target_id": 182, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 330, + "origin_id": 176, + "origin_slot": 0, + "target_id": 182, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 331, + "origin_id": 183, + "origin_slot": 0, + "target_id": 185, + "target_slot": 0, + "type": "INT" + }, + { + "id": 332, + "origin_id": 184, + "origin_slot": 0, + "target_id": 185, + "target_slot": 1, + "type": "INT" + }, + { + "id": 320, + "origin_id": 161, + "origin_slot": 0, + "target_id": 190, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 338, + "origin_id": -10, + "origin_slot": 1, + "target_id": 174, + "target_slot": 0, + "type": "BOOLEAN" + }, + { + "id": 339, + "origin_id": -10, + "origin_slot": 1, + "target_id": 182, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 340, + "origin_id": -10, + "origin_slot": 1, + "target_id": 185, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 347, + "origin_id": -10, + "origin_slot": 2, + "target_id": 192, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 348, + "origin_id": 160, + "origin_slot": 0, + "target_id": 192, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 349, + "origin_id": -10, + "origin_slot": 0, + "target_id": 192, + "target_slot": 2, + "type": "MASK" + }, + { + "id": 350, + "origin_id": 192, + "origin_slot": 0, + "target_id": 176, + "target_slot": 1, + "type": "LATENT" + }, + { + "id": 351, + "origin_id": 192, + "origin_slot": 0, + "target_id": 180, + "target_slot": 1, + "type": "LATENT" + }, + { + "id": 352, + "origin_id": 192, + "origin_slot": 0, + "target_id": 173, + "target_slot": 4, + "type": "LATENT" + }, + { + "id": 353, + "origin_id": 173, + "origin_slot": 0, + "target_id": 193, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 354, + "origin_id": 160, + "origin_slot": 0, + "target_id": 193, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 355, + "origin_id": -10, + "origin_slot": 2, + "target_id": 193, + "target_slot": 2, + "type": "IMAGE" + }, + { + "id": 356, + "origin_id": -10, + "origin_slot": 0, + "target_id": 193, + "target_slot": 3, + "type": "MASK" + }, + { + "id": 357, + "origin_id": 193, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 358, + "origin_id": -10, + "origin_slot": 2, + "target_id": 167, + "target_slot": 0, + "type": "IMAGE" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "frontendVersion": "1.41.21", + "workflowRendererVersion": "LG", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ue_links": [], + "links_added_by_ue": [], + "ds": { + "scale": 0.7400249944258278, + "offset": [ + -41.52161391771749, + -779.6233510028867 + ] + } + }, + "version": 0.4 +} diff --git a/example_workflows/Flux2_Klein_inpainting.jpg b/example_workflows/Flux2_Klein_inpainting.jpg deleted file mode 100644 index ccf322a..0000000 Binary files a/example_workflows/Flux2_Klein_inpainting.jpg and /dev/null differ diff --git a/example_workflows/Flux2_Klein_inpainting.json b/example_workflows/Flux2_Klein_inpainting.json deleted file mode 100644 index d12a728..0000000 --- a/example_workflows/Flux2_Klein_inpainting.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"92112d97-bb64-4b44-86f2-ea5691ef8f6e","revision":0,"last_node_id":191,"last_link_id":346,"nodes":[{"id":9,"type":"SaveImage","pos":[2549.2912681843623,1036.468767583056],"size":[416.640625,469.96875],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":346},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":null}],"properties":{"cnr_id":"comfy-core","ver":"0.8.2","Node name for S&R":"SaveImage","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["Flux2-Klein-4b-base"]},{"id":97,"type":"MarkdownNote","pos":[-1656.406269494769,762.4937053843846],"size":[609.96875,802.046875],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[],"properties":{"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model links (for local users)\n\n**text_encoders**\n\n- [qwen_3_4b.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors)\n\n**diffusion_models**\n\n- [lux-2-klein-base-4b-fp8.safetensors](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€ qwen_3_4b.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ lux-2-klein-base-4b-fp8.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ flux2-vae.safetensors\n```\n\n## Report issue\n\nNote: please update ComfyUI first ([guide](https://docs.comfy.org/zh-CN/installation/update_comfyui)) and prepare the required models. Desktop/Cloud ship stable builds; nightly-supported models may not be included yet, please wait for the next stable release.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n\n"],"color":"#222","bgcolor":"#000"},{"id":76,"type":"LoadImage","pos":[-1412.9891350502332,880.2411842998931],"size":[319.96875,469.96875],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[345]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":[343]}],"properties":{"Node name for S&R":"LoadImage","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}},"image":"clipspace/clipspace-painted-masked-1774261273383.png [input]"},"widgets_values":["Masked_Load_Me_in_Loader (17).png","image"]},{"id":150,"type":"PrimitiveBoolean","pos":[-1568.5474189838785,1759.2225506066136],"size":[986.1137330592571,61.705337315487895],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"BOOLEAN","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"BOOLEAN","name":"BOOLEAN","type":"BOOLEAN","links":[344]}],"title":"Do you want the Klein model still reference the original image even in masked region? If not, use t2i style of promot instead of edit prompt","properties":{"Node name for S&R":"PrimitiveBoolean"},"widgets_values":[true]},{"id":191,"type":"0f9e08bc-ff60-41da-9d9f-0faf77cd927c","pos":[581.9856411789561,1053.0699675387564],"size":[297.8452383647941,218.704294345898],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"mask","name":"mask","type":"MASK","link":343},{"name":"","type":"*","widget":{"name":""},"link":344},{"localized_name":"image","name":"image","type":"IMAGE","link":345}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[346]}],"title":"LanPaint + Klein","properties":{"proxyWidgets":[["182","switch"],["178","text"],["190","text"]]},"widgets_values":[]}],"links":[[343,76,1,191,0,"MASK"],[344,150,0,191,1,"BOOLEAN"],[345,76,0,191,2,"IMAGE"],[346,191,0,9,0,"IMAGE"]],"groups":[],"definitions":{"subgraphs":[{"id":"f07d2d08-2bc5-4dd8-a9f0-f2347c6b5cca","version":1,"state":{"lastGroupId":4,"lastNodeId":191,"lastLinkId":346,"lastRerouteId":0},"revision":0,"config":{},"name":"LanPaint Preprocessing","inputNode":{"id":-10,"bounding":[147.7819921827197,1983.6123610996979,128,108]},"outputNode":{"id":-20,"bounding":[1453.72549451583,2003.6123610996979,128,108]},"inputs":[{"id":"386e09d2-6c09-4494-8037-c52f3fc4d4fc","name":"vae","type":"VAE","linkIds":[228,223,233],"localized_name":"vae","pos":[251.7819921827197,2007.6123610996979]},{"id":"686ea659-706d-48b5-aa90-ba8decf332ae","name":"image","type":"IMAGE","linkIds":[227,224],"localized_name":"image","pos":[251.7819921827197,2027.6123610996979]},{"id":"2f1a67f1-2cd1-46d9-8729-45755d6ca367","name":"mask","type":"MASK","linkIds":[225],"localized_name":"mask","pos":[251.7819921827197,2047.6123610996979]}],"outputs":[{"id":"c0e68b11-07aa-4ef5-bd82-9e26113be414","name":"LATENT","type":"LATENT","linkIds":[226],"localized_name":"LATENT","pos":[1477.72549451583,2027.6123610996979]},{"id":"59d15e04-ac41-4f42-b0a0-1d4151cfe98b","name":"MASK","type":"MASK","linkIds":[234],"pos":[1477.72549451583,2047.6123610996979]},{"id":"d597296a-7306-40e4-af12-04a7c2acc51f","name":"IMAGE","type":"IMAGE","linkIds":[235],"pos":[1477.72549451583,2067.612361099698]}],"widgets":[],"nodes":[{"id":125,"type":"VAEDecode","pos":[341.948202749188,1853.879018702556],"size":[210,46],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":212},{"localized_name":"vae","name":"vae","type":"VAE","link":228}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[213]}],"properties":{"Node name for S&R":"VAEDecode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":126,"type":"GetImageSize","pos":[349.8229419100825,1980.2723036675939],"size":[140,124],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":213}],"outputs":[{"localized_name":"width","name":"width","type":"INT","links":[215,218]},{"localized_name":"height","name":"height","type":"INT","links":[216,219]},{"localized_name":"batch_size","name":"batch_size","type":"INT","links":[]}],"properties":{"Node name for S&R":"GetImageSize","cnr_id":"comfy-core","ver":"0.7.0","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":127,"type":"ImageScale","pos":[705.0907645817256,2249.5210154889633],"size":[270,130],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":214},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":215},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":216},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[217]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core","ver":"0.3.52","ue_properties":{"widget_ue_connectable":{"width":true,"height":true},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["nearest-exact",512,512,"center"]},{"id":124,"type":"VAEEncode","pos":[334.5563505623274,1685.8414078894357],"size":[140,46],"flags":{"collapsed":false},"order":0,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":224},{"localized_name":"vae","name":"vae","type":"VAE","link":223}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[212]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":129,"type":"MaskToImage","pos":[327.7819921827197,1780.2436686425217],"size":[193.2779296875,26],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"mask","name":"mask","type":"MASK","link":225}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[214]}],"properties":{"Node name for S&R":"MaskToImage","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":132,"type":"SetLatentNoiseMask","pos":[1205.5881898283299,1723.8113483645336],"size":[188.1373046875,46],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":232},{"localized_name":"mask","name":"mask","type":"MASK","link":222}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[226]}],"properties":{"Node name for S&R":"SetLatentNoiseMask","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":134,"type":"VAEEncode","pos":[1002.2749668743055,1594.9125557215868],"size":[140,46],"flags":{"collapsed":false},"order":8,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":231},{"localized_name":"vae","name":"vae","type":"VAE","link":233}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[232]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":128,"type":"ImageToMask","pos":[707.6856669146396,2444.3121664778087],"size":[270,58],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":217},{"localized_name":"channel","name":"channel","type":"COMBO","widget":{"name":"channel"},"link":null}],"outputs":[{"localized_name":"MASK","name":"MASK","type":"MASK","links":[222,234]}],"properties":{"Node name for S&R":"ImageToMask","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["red"]},{"id":130,"type":"ImageScale","pos":[722.567175008152,1753.1318522245451],"size":[269.921875,152.8125],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":227},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":218},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":219},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[231,235]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core","ver":"0.3.52","ue_properties":{"widget_ue_connectable":{"width":true,"height":true},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["area",512,512,"center"]}],"groups":[],"links":[{"id":212,"origin_id":124,"origin_slot":0,"target_id":125,"target_slot":0,"type":"LATENT"},{"id":213,"origin_id":125,"origin_slot":0,"target_id":126,"target_slot":0,"type":"IMAGE"},{"id":214,"origin_id":129,"origin_slot":0,"target_id":127,"target_slot":0,"type":"IMAGE"},{"id":215,"origin_id":126,"origin_slot":0,"target_id":127,"target_slot":2,"type":"INT"},{"id":216,"origin_id":126,"origin_slot":1,"target_id":127,"target_slot":3,"type":"INT"},{"id":217,"origin_id":127,"origin_slot":0,"target_id":128,"target_slot":0,"type":"IMAGE"},{"id":218,"origin_id":126,"origin_slot":0,"target_id":130,"target_slot":2,"type":"INT"},{"id":219,"origin_id":126,"origin_slot":1,"target_id":130,"target_slot":3,"type":"INT"},{"id":232,"origin_id":134,"origin_slot":0,"target_id":132,"target_slot":0,"type":"LATENT"},{"id":222,"origin_id":128,"origin_slot":0,"target_id":132,"target_slot":1,"type":"MASK"},{"id":231,"origin_id":130,"origin_slot":0,"target_id":134,"target_slot":0,"type":"IMAGE"},{"id":228,"origin_id":-10,"origin_slot":0,"target_id":125,"target_slot":1,"type":"VAE"},{"id":223,"origin_id":-10,"origin_slot":0,"target_id":124,"target_slot":1,"type":"VAE"},{"id":233,"origin_id":-10,"origin_slot":0,"target_id":134,"target_slot":1,"type":"VAE"},{"id":227,"origin_id":-10,"origin_slot":1,"target_id":130,"target_slot":0,"type":"IMAGE"},{"id":224,"origin_id":-10,"origin_slot":1,"target_id":124,"target_slot":0,"type":"IMAGE"},{"id":225,"origin_id":-10,"origin_slot":2,"target_id":129,"target_slot":0,"type":"MASK"},{"id":226,"origin_id":132,"origin_slot":0,"target_id":-20,"target_slot":0,"type":"LATENT"},{"id":234,"origin_id":128,"origin_slot":0,"target_id":-20,"target_slot":1,"type":"MASK"},{"id":235,"origin_id":130,"origin_slot":0,"target_id":-20,"target_slot":2,"type":"IMAGE"}],"extra":{"ue_links":[],"links_added_by_ue":[],"workflowRendererVersion":"LG"}},{"id":"0f9e08bc-ff60-41da-9d9f-0faf77cd927c","version":1,"state":{"lastGroupId":4,"lastNodeId":191,"lastLinkId":346,"lastRerouteId":0},"revision":0,"config":{},"name":"LanPaint + Klein","inputNode":{"id":-10,"bounding":[-772.1778450451952,1183.4392511563367,128,108]},"outputNode":{"id":-20,"bounding":[2584.495039374102,1203.4392511563367,128,68]},"inputs":[{"id":"1ecd71e3-93b0-4f8d-9e0d-aaf3c94076a3","name":"mask","type":"MASK","linkIds":[337],"localized_name":"mask","pos":[-668.1778450451952,1207.4392511563367]},{"id":"26cd03c1-9e4d-4333-9a73-04f47685505e","name":"","type":"*","linkIds":[338,339,340],"pos":[-668.1778450451952,1227.4392511563367]},{"id":"68f8fbb7-352f-46b9-aa46-28df70cac84a","name":"image","type":"IMAGE","linkIds":[341],"localized_name":"image","pos":[-668.1778450451952,1247.4392511563367]}],"outputs":[{"id":"527ef442-5449-46c8-8943-d1380878e457","name":"IMAGE","type":"IMAGE","linkIds":[342],"localized_name":"IMAGE","pos":[2608.495039374102,1227.4392511563367]}],"widgets":[],"nodes":[{"id":159,"type":"MarkdownNote","pos":[624.1600616207305,703.9344334344975],"size":[224.984375,94.8125],"flags":{},"order":0,"mode":0,"inputs":[],"outputs":[],"title":"Note","properties":{"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["Click on the top-right corner of the node to open the [subgraph](https://docs.comfy.org/interface/features/subgraph) \n๐Ÿ‘‡"],"color":"#222","bgcolor":"#000"},{"id":160,"type":"VAELoader","pos":[55.62812947641021,1056.7864761842059],"size":[364.40625,82.25],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"vae_name","name":"vae_name","type":"COMBO","widget":{"name":"vae_name"},"link":null}],"outputs":[{"localized_name":"VAE","name":"VAE","type":"VAE","links":[305,317,334]}],"properties":{"Node name for S&R":"VAELoader","cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"flux2-vae.safetensors","url":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors","directory":"vae"}],"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["flux2-vae.safetensors"]},{"id":161,"type":"CLIPLoader","pos":[55.62812947641021,886.7863888262327],"size":[364.40625,116.90625],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"clip_name","name":"clip_name","type":"COMBO","widget":{"name":"clip_name"},"link":null},{"localized_name":"type","name":"type","type":"COMBO","widget":{"name":"type"},"link":null},{"localized_name":"device","name":"device","shape":7,"type":"COMBO","widget":{"name":"device"},"link":null}],"outputs":[{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[320,322]}],"properties":{"Node name for S&R":"CLIPLoader","cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"qwen_3_4b.safetensors","url":"https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors","directory":"text_encoders"}],"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["qwen_3_8b_fp8mixed.safetensors","flux2","default"]},{"id":162,"type":"LanPaint_MaskBlend","pos":[2254.526289374102,867.589279094541],"size":[269.96875,151.578125],"flags":{},"order":13,"mode":0,"inputs":[{"localized_name":"image1","name":"image1","type":"IMAGE","link":296},{"localized_name":"image2","name":"image2","type":"IMAGE","link":297},{"localized_name":"mask","name":"mask","type":"MASK","link":298},{"localized_name":"blend_overlap","name":"blend_overlap","type":"INT","widget":{"name":"blend_overlap"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[342]}],"properties":{"Node name for S&R":"LanPaint_MaskBlend","cnr_id":"LanPaint","ver":"7b0d144db9aca6a4601e7c179b4c8103036e6e2b","ue_properties":{"widget_ue_connectable":{"blend_overlap":true},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[9]},{"id":163,"type":"CFGGuider","pos":[1139.5302658271462,842.5132670132548],"size":[269.96875,127.578125],"flags":{},"order":14,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":299},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":300},{"localized_name":"negative","name":"negative","type":"CONDITIONING","link":301},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null}],"outputs":[{"localized_name":"GUIDER","name":"GUIDER","type":"GUIDER","links":[311]}],"properties":{"Node name for S&R":"CFGGuider","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[5]},{"id":164,"type":"KSamplerSelect","pos":[1139.5302658271462,982.5132431778821],"size":[269.96875,82.25],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"sampler_name","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null}],"outputs":[{"localized_name":"SAMPLER","name":"SAMPLER","type":"SAMPLER","links":[312]}],"properties":{"Node name for S&R":"KSamplerSelect","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["euler"]},{"id":165,"type":"Flux2Scheduler","pos":[1139.5302658271462,1082.5131030104587],"size":[269.96875,143.59375],"flags":{},"order":15,"mode":0,"inputs":[{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":302},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":303}],"outputs":[{"localized_name":"SIGMAS","name":"SIGMAS","type":"SIGMAS","links":[313]}],"properties":{"Node name for S&R":"Flux2Scheduler","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[20,1024,1024]},{"id":166,"type":"VAEDecode","pos":[2005.537281157136,772.1010058307338],"size":[224.984375,71.59375],"flags":{},"order":16,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":304},{"localized_name":"vae","name":"vae","type":"VAE","link":305}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[297]}],"properties":{"Node name for S&R":"VAEDecode","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":167,"type":"GetImageSize","pos":[623.9907022963915,1267.2633222328395],"size":[224.984375,159.578125],"flags":{},"order":17,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":306}],"outputs":[{"localized_name":"width","name":"width","type":"INT","links":[302,307]},{"localized_name":"height","name":"height","type":"INT","links":[303,308]},{"localized_name":"batch_size","name":"batch_size","type":"INT","links":[]}],"properties":{"Node name for S&R":"GetImageSize","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":168,"type":"RandomNoise","pos":[1139.5302658271462,722.5131574601864],"size":[269.96875,82],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"noise_seed","name":"noise_seed","type":"INT","widget":{"name":"noise_seed"},"link":null}],"outputs":[{"localized_name":"NOISE","name":"NOISE","type":"NOISE","links":[310]}],"properties":{"Node name for S&R":"RandomNoise","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[0,"fixed"]},{"id":169,"type":"EmptyFlux2LatentImage","pos":[893.4228114475226,1252.0446481437336],"size":[269.96875,143.59375],"flags":{},"order":18,"mode":0,"inputs":[{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":307},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":308},{"localized_name":"batch_size","name":"batch_size","type":"INT","widget":{"name":"batch_size"},"link":null}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[]}],"properties":{"Node name for S&R":"EmptyFlux2LatentImage","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[1024,1024,1]},{"id":170,"type":"UNETLoader","pos":[55.62812947641021,736.7865990773674],"size":[364.40625,82.25],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"unet_name","name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":null},{"localized_name":"weight_dtype","name":"weight_dtype","type":"COMBO","widget":{"name":"weight_dtype"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[299]}],"properties":{"Node name for S&R":"UNETLoader","cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"lux-2-klein-base-4b-fp8.safetensors","url":"https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4b-fp8/resolve/main/flux-2-klein-base-4b-fp8.safetensors","directory":"diffusion_models"}],"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["flux-2-klein-base-9b-fp8.safetensors","default"]},{"id":171,"type":"MaskToImage","pos":[-564.9465280809841,1732.7112167400294],"size":[224.984375,47.59375],"flags":{},"order":19,"mode":0,"inputs":[{"localized_name":"mask","name":"mask","type":"MASK","link":337}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[333]}],"properties":{"Node name for S&R":"MaskToImage"},"widgets_values":[]},{"id":172,"type":"ImageToMask","pos":[-115.50089957015848,1960.2993462852316],"size":[269.578125,82.25],"flags":{},"order":20,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":309},{"localized_name":"channel","name":"channel","type":"COMBO","widget":{"name":"channel"},"link":null}],"outputs":[{"localized_name":"MASK","name":"MASK","type":"MASK","links":[336]}],"properties":{"Node name for S&R":"ImageToMask"},"widgets_values":["red"]},{"id":174,"type":"Reroute","pos":[694.7566961139352,2082.2818314829265],"size":[75,26],"flags":{},"order":22,"mode":0,"inputs":[{"name":"","type":"*","widget":{"name":"value"},"link":338}],"outputs":[{"name":"","type":"BOOLEAN","links":[328]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":175,"type":"VAEEncode","pos":[782.5499760596399,1754.3738342097151],"size":[190,46],"flags":{"collapsed":false},"order":23,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":316},{"localized_name":"vae","name":"vae","type":"VAE","link":317}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[319,325]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":176,"type":"ReferenceLatent","pos":[1119.1810048876923,1838.5403602983847],"size":[204.134765625,46],"flags":{"collapsed":false},"order":24,"mode":0,"inputs":[{"localized_name":"conditioning","name":"conditioning","type":"CONDITIONING","link":318},{"localized_name":"latent","name":"latent","shape":7,"type":"LATENT","link":319}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[330]}],"properties":{"Node name for S&R":"ReferenceLatent","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":177,"type":"Reroute","pos":[883.242794138779,1650.5182917584234],"size":[75,26],"flags":{},"order":11,"mode":0,"inputs":[{"name":"","type":"*","link":321}],"outputs":[{"name":"","type":"CONDITIONING","links":[318,329]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":178,"type":"CLIPTextEncode","pos":[485.6284462179291,736.9532514630943],"size":[429.96875,229.96875],"flags":{},"order":10,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":322},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[323]}],"title":"CLIP Text Encode (Positive Prompt)","properties":{"Node name for S&R":"CLIPTextEncode","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["change building's window light color to blue"],"color":"#232","bgcolor":"#353"},{"id":179,"type":"Reroute","pos":[1033.2282553816917,1504.614293060217],"size":[75,26],"flags":{},"order":12,"mode":0,"inputs":[{"name":"","type":"*","link":323}],"outputs":[{"name":"","type":"CONDITIONING","links":[324,326]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":180,"type":"ReferenceLatent","pos":[1159.8019865130454,1602.6058122453303],"size":[210,46],"flags":{"collapsed":false},"order":25,"mode":0,"inputs":[{"localized_name":"conditioning","name":"conditioning","type":"CONDITIONING","link":324},{"localized_name":"latent","name":"latent","shape":7,"type":"LATENT","link":325}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[327]}],"properties":{"Node name for S&R":"ReferenceLatent","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":181,"type":"ComfySwitchNode","pos":[1533.4447652944255,1605.4094651677044],"size":[270,78],"flags":{},"order":26,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"CONDITIONING","link":326},{"localized_name":"on_true","name":"on_true","type":"CONDITIONING","link":327},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":328}],"outputs":[{"localized_name":"output","name":"output","type":"CONDITIONING","links":[300]}],"properties":{"Node name for S&R":"ComfySwitchNode"},"widgets_values":[false]},{"id":182,"type":"ComfySwitchNode","pos":[1439.2947375314434,1860.6802750453246],"size":[270,78],"flags":{},"order":27,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"CONDITIONING","link":329},{"localized_name":"on_true","name":"on_true","type":"CONDITIONING","link":330},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":339}],"outputs":[{"localized_name":"output","name":"output","type":"CONDITIONING","links":[301]}],"properties":{"Node name for S&R":"ComfySwitchNode"},"widgets_values":[false]},{"id":183,"type":"PrimitiveInt","pos":[1037.7504677972097,396.596670829747],"size":[270,82],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"INT","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"INT","name":"INT","type":"INT","links":[331]}],"properties":{"Node name for S&R":"PrimitiveInt"},"widgets_values":[5,"fixed"]},{"id":184,"type":"PrimitiveInt","pos":[1044.8491341138592,533.3094780807312],"size":[270,82],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"INT","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"INT","name":"INT","type":"INT","links":[332]}],"properties":{"Node name for S&R":"PrimitiveInt"},"widgets_values":[2,"fixed"]},{"id":185,"type":"ComfySwitchNode","pos":[1369.337082676484,467.165160354835],"size":[270,78],"flags":{},"order":28,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"INT","link":331},{"localized_name":"on_true","name":"on_true","type":"INT","link":332},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":340}],"outputs":[{"localized_name":"output","name":"output","type":"INT","links":[315]}],"properties":{"Node name for S&R":"ComfySwitchNode"},"widgets_values":[false]},{"id":186,"type":"ImageScaleToTotalPixels","pos":[-584.1778450451952,1922.9657041570254],"size":[269.953125,114.25],"flags":{},"order":29,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":333},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"megapixels","name":"megapixels","type":"FLOAT","widget":{"name":"megapixels"},"link":null},{"localized_name":"resolution_steps","name":"resolution_steps","type":"INT","widget":{"name":"resolution_steps"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[309]}],"properties":{"Node name for S&R":"ImageScaleToTotalPixels","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["nearest-exact",1,1]},{"id":187,"type":"f07d2d08-2bc5-4dd8-a9f0-f2347c6b5cca","pos":[128.3140463973035,1745.3631979608713],"size":[224.984375,95.59375],"flags":{},"order":30,"mode":0,"inputs":[{"localized_name":"vae","name":"vae","type":"VAE","link":334},{"localized_name":"image","name":"image","type":"IMAGE","link":335},{"localized_name":"mask","name":"mask","type":"MASK","link":336}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[314]},{"name":"MASK","type":"MASK","links":[298]},{"name":"IMAGE","type":"IMAGE","links":[296,306,316]}],"properties":{"proxyWidgets":[],"cnr_id":"comfy-core","ver":"0.9.2","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":188,"type":"ImageScaleToTotalPixels","pos":[-558.7326993175253,1506.511338350797],"size":[269.96875,114.25],"flags":{},"order":31,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":341},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"megapixels","name":"megapixels","type":"FLOAT","widget":{"name":"megapixels"},"link":null},{"localized_name":"resolution_steps","name":"resolution_steps","type":"INT","widget":{"name":"resolution_steps"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[335]}],"properties":{"Node name for S&R":"ImageScaleToTotalPixels","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["area",1,1]},{"id":189,"type":"Note","pos":[1981.9631121916382,1722.502836714068],"size":[352.734375,139.75],"flags":{},"order":8,"mode":0,"inputs":[],"outputs":[],"properties":{"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["Bypass reference conditioning if you don't need reference"],"color":"#432","bgcolor":"#653"},{"id":190,"type":"CLIPTextEncode","pos":[485.6284462179291,1066.9532294858702],"size":[429.96875,115.59375],"flags":{"collapsed":true},"order":9,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":320},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[321]}],"title":"CLIP Text Encode (Negative Prompt)","properties":{"Node name for S&R":"CLIPTextEncode","cnr_id":"comfy-core","ver":"0.8.2","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[""],"color":"#322","bgcolor":"#533"},{"id":173,"type":"LanPaint_SamplerCustomAdvanced","pos":[1605.2161534535035,660.0081874939478],"size":[291.4830078125,567.96875],"flags":{},"order":21,"mode":0,"inputs":[{"localized_name":"noise","name":"noise","type":"NOISE","link":310},{"localized_name":"guider","name":"guider","type":"GUIDER","link":311},{"localized_name":"sampler","name":"sampler","type":"SAMPLER","link":312},{"localized_name":"sigmas","name":"sigmas","type":"SIGMAS","link":313},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":314},{"localized_name":"LanPaint_NumSteps","name":"LanPaint_NumSteps","type":"INT","widget":{"name":"LanPaint_NumSteps"},"link":315},{"localized_name":"LanPaint_Lambda","name":"LanPaint_Lambda","type":"FLOAT","widget":{"name":"LanPaint_Lambda"},"link":null},{"localized_name":"LanPaint_StepSize","name":"LanPaint_StepSize","type":"FLOAT","widget":{"name":"LanPaint_StepSize"},"link":null},{"localized_name":"LanPaint_Beta","name":"LanPaint_Beta","type":"FLOAT","widget":{"name":"LanPaint_Beta"},"link":null},{"localized_name":"LanPaint_Friction","name":"LanPaint_Friction","type":"FLOAT","widget":{"name":"LanPaint_Friction"},"link":null},{"localized_name":"LanPaint_PromptMode","name":"LanPaint_PromptMode","type":"COMBO","widget":{"name":"LanPaint_PromptMode"},"link":null},{"localized_name":"LanPaint_EarlyStop","name":"LanPaint_EarlyStop","type":"INT","widget":{"name":"LanPaint_EarlyStop"},"link":null},{"localized_name":"LanPaint_Info","name":"LanPaint_Info","type":"STRING","widget":{"name":"LanPaint_Info"},"link":null},{"localized_name":"LanPaint_InnerThreshold","name":"LanPaint_InnerThreshold","type":"FLOAT","widget":{"name":"LanPaint_InnerThreshold"},"link":null},{"localized_name":"LanPaint_InnerPatience","name":"LanPaint_InnerPatience","type":"INT","widget":{"name":"LanPaint_InnerPatience"},"link":null}],"outputs":[{"localized_name":"output","name":"output","type":"LATENT","links":[304]},{"localized_name":"denoised_output","name":"denoised_output","type":"LATENT","links":[]}],"properties":{"Node name for S&R":"LanPaint_SamplerCustomAdvanced","cnr_id":"LanPaint","ver":"7b0d144db9aca6a4601e7c179b4c8103036e6e2b","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[2,8,0.2,1,15,"Image First",1,"LanPaint Custom Sampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!",0,1,"lanpaint_star_button"]}],"groups":[{"id":1,"title":"Models","bounding":[51.96151307983905,652.925297851952,380,550],"color":"#3f789e","flags":{}},{"id":2,"title":"Prompt","bounding":[471.9615130798395,652.925297851952,470,550],"color":"#3f789e","flags":{}},{"id":3,"title":"Sampler","bounding":[1139.8631647830107,658.485215165444,532.3638671875,550],"color":"#3f789e","flags":{}}],"links":[{"id":296,"origin_id":187,"origin_slot":2,"target_id":162,"target_slot":0,"type":"IMAGE"},{"id":297,"origin_id":166,"origin_slot":0,"target_id":162,"target_slot":1,"type":"IMAGE"},{"id":298,"origin_id":187,"origin_slot":1,"target_id":162,"target_slot":2,"type":"MASK"},{"id":299,"origin_id":170,"origin_slot":0,"target_id":163,"target_slot":0,"type":"MODEL"},{"id":300,"origin_id":181,"origin_slot":0,"target_id":163,"target_slot":1,"type":"CONDITIONING"},{"id":301,"origin_id":182,"origin_slot":0,"target_id":163,"target_slot":2,"type":"CONDITIONING"},{"id":302,"origin_id":167,"origin_slot":0,"target_id":165,"target_slot":1,"type":"INT"},{"id":303,"origin_id":167,"origin_slot":1,"target_id":165,"target_slot":2,"type":"INT"},{"id":304,"origin_id":173,"origin_slot":0,"target_id":166,"target_slot":0,"type":"LATENT"},{"id":305,"origin_id":160,"origin_slot":0,"target_id":166,"target_slot":1,"type":"VAE"},{"id":306,"origin_id":187,"origin_slot":2,"target_id":167,"target_slot":0,"type":"IMAGE"},{"id":307,"origin_id":167,"origin_slot":0,"target_id":169,"target_slot":0,"type":"INT"},{"id":308,"origin_id":167,"origin_slot":1,"target_id":169,"target_slot":1,"type":"INT"},{"id":309,"origin_id":186,"origin_slot":0,"target_id":172,"target_slot":0,"type":"IMAGE"},{"id":310,"origin_id":168,"origin_slot":0,"target_id":173,"target_slot":0,"type":"NOISE"},{"id":311,"origin_id":163,"origin_slot":0,"target_id":173,"target_slot":1,"type":"GUIDER"},{"id":312,"origin_id":164,"origin_slot":0,"target_id":173,"target_slot":2,"type":"SAMPLER"},{"id":313,"origin_id":165,"origin_slot":0,"target_id":173,"target_slot":3,"type":"SIGMAS"},{"id":314,"origin_id":187,"origin_slot":0,"target_id":173,"target_slot":4,"type":"LATENT"},{"id":315,"origin_id":185,"origin_slot":0,"target_id":173,"target_slot":5,"type":"INT"},{"id":316,"origin_id":187,"origin_slot":2,"target_id":175,"target_slot":0,"type":"IMAGE"},{"id":317,"origin_id":160,"origin_slot":0,"target_id":175,"target_slot":1,"type":"VAE"},{"id":318,"origin_id":177,"origin_slot":0,"target_id":176,"target_slot":0,"type":"CONDITIONING"},{"id":319,"origin_id":175,"origin_slot":0,"target_id":176,"target_slot":1,"type":"LATENT"},{"id":321,"origin_id":190,"origin_slot":0,"target_id":177,"target_slot":0,"type":"CONDITIONING"},{"id":322,"origin_id":161,"origin_slot":0,"target_id":178,"target_slot":0,"type":"CLIP"},{"id":323,"origin_id":178,"origin_slot":0,"target_id":179,"target_slot":0,"type":"CONDITIONING"},{"id":324,"origin_id":179,"origin_slot":0,"target_id":180,"target_slot":0,"type":"CONDITIONING"},{"id":325,"origin_id":175,"origin_slot":0,"target_id":180,"target_slot":1,"type":"LATENT"},{"id":326,"origin_id":179,"origin_slot":0,"target_id":181,"target_slot":0,"type":"CONDITIONING"},{"id":327,"origin_id":180,"origin_slot":0,"target_id":181,"target_slot":1,"type":"CONDITIONING"},{"id":328,"origin_id":174,"origin_slot":0,"target_id":181,"target_slot":2,"type":"BOOLEAN"},{"id":329,"origin_id":177,"origin_slot":0,"target_id":182,"target_slot":0,"type":"CONDITIONING"},{"id":330,"origin_id":176,"origin_slot":0,"target_id":182,"target_slot":1,"type":"CONDITIONING"},{"id":331,"origin_id":183,"origin_slot":0,"target_id":185,"target_slot":0,"type":"INT"},{"id":332,"origin_id":184,"origin_slot":0,"target_id":185,"target_slot":1,"type":"INT"},{"id":333,"origin_id":171,"origin_slot":0,"target_id":186,"target_slot":0,"type":"IMAGE"},{"id":334,"origin_id":160,"origin_slot":0,"target_id":187,"target_slot":0,"type":"VAE"},{"id":335,"origin_id":188,"origin_slot":0,"target_id":187,"target_slot":1,"type":"IMAGE"},{"id":336,"origin_id":172,"origin_slot":0,"target_id":187,"target_slot":2,"type":"MASK"},{"id":320,"origin_id":161,"origin_slot":0,"target_id":190,"target_slot":0,"type":"CLIP"},{"id":337,"origin_id":-10,"origin_slot":0,"target_id":171,"target_slot":0,"type":"MASK"},{"id":338,"origin_id":-10,"origin_slot":1,"target_id":174,"target_slot":0,"type":"BOOLEAN"},{"id":339,"origin_id":-10,"origin_slot":1,"target_id":182,"target_slot":2,"type":"BOOLEAN"},{"id":340,"origin_id":-10,"origin_slot":1,"target_id":185,"target_slot":2,"type":"BOOLEAN"},{"id":341,"origin_id":-10,"origin_slot":2,"target_id":188,"target_slot":0,"type":"IMAGE"},{"id":342,"origin_id":162,"origin_slot":0,"target_id":-20,"target_slot":0,"type":"IMAGE"}],"extra":{}}]},"config":{},"extra":{"frontendVersion":"1.41.21","workflowRendererVersion":"LG","VHS_latentpreview":false,"VHS_latentpreviewrate":0,"VHS_MetadataImage":true,"VHS_KeepIntermediate":true,"ue_links":[],"links_added_by_ue":[],"ds":{"scale":0.7400249944258278,"offset":[-41.52161391771749,-779.6233510028867]}},"version":0.4} \ No newline at end of file diff --git a/example_workflows/Flux_EncodeDecode_Inpaint.jpg b/example_workflows/Flux_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..0bf7f63 Binary files /dev/null and b/example_workflows/Flux_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/Flux_EncodeDecode_Inpaint.json b/example_workflows/Flux_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..ae5a66a --- /dev/null +++ b/example_workflows/Flux_EncodeDecode_Inpaint.json @@ -0,0 +1,671 @@ +{ + "id": "978d3a45-3d13-43c6-8ef9-89dc3e74d6ba", + "revision": 0, + "last_node_id": 84, + "last_link_id": 229, + "nodes": [ + { + "id": 78, + "type": "CLIPTextEncode", + "pos": [ + 314.8565368652344, + 255.63235473632812 + ], + "size": [ + 422.84503173828125, + 164.31304931640625 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "label": "clip", + "name": "clip", + "type": "CLIP", + "link": 194 + } + ], + "outputs": [ + { + "label": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 195 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.26", + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 80, + "type": "CLIPTextEncode", + "pos": [ + 362.7684020996094, + 481.0662536621094 + ], + "size": [ + 422.84503173828125, + 164.31304931640625 + ], + "flags": { + "collapsed": true + }, + "order": 3, + "mode": 0, + "inputs": [ + { + "label": "clip", + "name": "clip", + "type": "CLIP", + "link": 196 + } + ], + "outputs": [ + { + "label": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 210 + ] + } + ], + "title": "CLIP Text Encode (Negative Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.26", + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 79, + "type": "FluxGuidance", + "pos": [ + 529.1380615234375, + 156.20236206054688 + ], + "size": [ + 211.60000610351562, + 58 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "label": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 195 + } + ], + "outputs": [ + { + "label": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 207 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.26", + "Node name for S&R": "FluxGuidance" + }, + "widgets_values": [ + 3.5 + ] + }, + { + "id": 77, + "type": "CheckpointLoaderSimple", + "pos": [ + -66.25785064697266, + 484.081787109375 + ], + "size": [ + 315, + 98 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "label": "MODEL", + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 197 + ] + }, + { + "label": "CLIP", + "name": "CLIP", + "type": "CLIP", + "slot_index": 1, + "links": [ + 194, + 196 + ] + }, + { + "label": "VAE", + "name": "VAE", + "type": "VAE", + "slot_index": 2, + "links": [ + 222, + 226 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.26", + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "flux1-dev-fp8.safetensors" + ] + }, + { + "id": 73, + "type": "LanPaint_KSampler", + "pos": [ + 1005.0399780273438, + 296.9553527832031 + ], + "size": [ + 413.6495666503906, + 596 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 197 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 207 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 210 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 224 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 225 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "56bd6c04e89124cd06682b304245d6ddf8b20522", + "Node name for S&R": "LanPaint_KSampler" + }, + "widgets_values": [ + 0, + "fixed", + 30, + 1, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler. Recommend steps 50, LanPaint NumSteps 1-20 depending on the difficulty of task. LanPaint_EndSigma = 3.0 for anime style, 0.6 for realistic style. For more information, visit https://github.com/scraed/LanPaint", + "๐Ÿ–ผ๏ธ Image Inpainting" + ] + }, + { + "id": 48, + "type": "SaveImage", + "pos": [ + 1075.49169921875, + 1167.2703857421875 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 229 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 75, + "type": "LoadImage", + "pos": [ + 45.954593658447266, + 1150.45556640625 + ], + "size": [ + 266.13720703125, + 487.1314697265625 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 221, + 227 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 221, + 227 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.27", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "Example_7_Masked.png", + "image" + ] + }, + { + "id": 83, + "type": "LanPaint_ImageEncode", + "pos": [ + 627, + 780 + ], + "size": [ + 195.3150390625, + 66 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 221 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 222 + }, + { + "localized_name": "mask", + "name": "mask", + "shape": 7, + "type": "MASK", + "link": 223 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 224 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode" + } + }, + { + "id": 84, + "type": "LanPaint_ImageDecode", + "pos": [ + 1755, + 780 + ], + "size": [ + 270, + 118 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 225 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 226 + }, + { + "localized_name": "image", + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": 227 + }, + { + "localized_name": "mask", + "name": "mask", + "shape": 7, + "type": "MASK", + "link": 228 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "shape": 7, + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 229 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode" + }, + "widgets_values": [ + 9 + ] + } + ], + "links": [ + [ + 194, + 77, + 1, + 78, + 0, + "CLIP" + ], + [ + 195, + 78, + 0, + 79, + 0, + "CONDITIONING" + ], + [ + 196, + 77, + 1, + 80, + 0, + "CLIP" + ], + [ + 197, + 77, + 0, + 73, + 0, + "MODEL" + ], + [ + 207, + 79, + 0, + 73, + 1, + "CONDITIONING" + ], + [ + 210, + 80, + 0, + 73, + 2, + "CONDITIONING" + ], + [ + 221, + 75, + 0, + 83, + 0, + "IMAGE" + ], + [ + 222, + 77, + 2, + 83, + 1, + "VAE" + ], + [ + 223, + 75, + 1, + 83, + 2, + "MASK" + ], + [ + 224, + 83, + 0, + 73, + 3, + "LATENT" + ], + [ + 225, + 73, + 0, + 84, + 0, + "LATENT" + ], + [ + 226, + 77, + 2, + 84, + 1, + "VAE" + ], + [ + 227, + 75, + 0, + 84, + 2, + "IMAGE" + ], + [ + 228, + 75, + 1, + 84, + 3, + "MASK" + ], + [ + 229, + 84, + 0, + 48, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Mask image for inpainting.", + "bounding": [ + 36.04227828979492, + 989.7313232421875, + 278.89093017578125, + 669.3414916992188 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Convert Latents for LanPaint", + "bounding": [ + 286.0640563964844, + 714.343505859375, + 489.16796875, + 197.81044006347656 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Load Model and Set Prompts", + "bounding": [ + -78.9311294555664, + 176.08712768554688, + 1006.1721801757812, + 514.258544921875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Inpaint with the LanPaint KSampler", + "bounding": [ + 960.8922729492188, + 179.17588806152344, + 474.8909606933594, + 630.4742431640625 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "LanPaint OutPut", + "bounding": [ + 1085.6029052734375, + 994.0775756835938, + 345.4561767578125, + 669.4969482421875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 11, + "title": "LanPaint", + "bounding": [ + -262.59381103515625, + 140.46656799316406, + 1737.328857421875, + 797.4443359375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.35049389948139237, + "offset": [ + 348.866804381099, + 308.65057628971834 + ] + }, + "frontendVersion": "1.27.10", + "node_versions": { + "comfy-core": "0.3.18", + "LanPaint": "0f509469ed2cd60c6032f739e282aad5dfc06166" + } + }, + "version": 0.4 +} diff --git a/example_workflows/Flux_Inpaint.jpg b/example_workflows/Flux_Inpaint.jpg deleted file mode 100644 index 1af39ac..0000000 Binary files a/example_workflows/Flux_Inpaint.jpg and /dev/null differ diff --git a/example_workflows/Flux_Inpaint.json b/example_workflows/Flux_Inpaint.json deleted file mode 100644 index 9169e23..0000000 --- a/example_workflows/Flux_Inpaint.json +++ /dev/null @@ -1,786 +0,0 @@ -{ - "id": "978d3a45-3d13-43c6-8ef9-89dc3e74d6ba", - "revision": 0, - "last_node_id": 82, - "last_link_id": 220, - "nodes": [ - { - "id": 66, - "type": "SetLatentNoiseMask", - "pos": [ - 514.1915893554688, - 781.9396362304688 - ], - "size": [ - 264.5999755859375, - 46 - ], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 216 - }, - { - "name": "mask", - "type": "MASK", - "link": 189 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "slot_index": 0, - "links": [ - 186 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "SetLatentNoiseMask" - }, - "widgets_values": [] - }, - { - "id": 78, - "type": "CLIPTextEncode", - "pos": [ - 314.8565368652344, - 255.63235473632812 - ], - "size": [ - 422.84503173828125, - 164.31304931640625 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [ - { - "label": "clip", - "name": "clip", - "type": "CLIP", - "link": 194 - } - ], - "outputs": [ - { - "label": "CONDITIONING", - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 195 - ] - } - ], - "title": "CLIP Text Encode (Positive Prompt)", - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.26", - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 80, - "type": "CLIPTextEncode", - "pos": [ - 362.7684020996094, - 481.0662536621094 - ], - "size": [ - 422.84503173828125, - 164.31304931640625 - ], - "flags": { - "collapsed": true - }, - "order": 3, - "mode": 0, - "inputs": [ - { - "label": "clip", - "name": "clip", - "type": "CLIP", - "link": 196 - } - ], - "outputs": [ - { - "label": "CONDITIONING", - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 210 - ] - } - ], - "title": "CLIP Text Encode (Negative Prompt)", - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.26", - "Node name for S&R": "CLIPTextEncode" - }, - "widgets_values": [ - "" - ], - "color": "#322", - "bgcolor": "#533" - }, - { - "id": 79, - "type": "FluxGuidance", - "pos": [ - 529.1380615234375, - 156.20236206054688 - ], - "size": [ - 211.60000610351562, - 58 - ], - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [ - { - "label": "conditioning", - "name": "conditioning", - "type": "CONDITIONING", - "link": 195 - } - ], - "outputs": [ - { - "label": "CONDITIONING", - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 207 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.26", - "Node name for S&R": "FluxGuidance" - }, - "widgets_values": [ - 3.5 - ] - }, - { - "id": 77, - "type": "CheckpointLoaderSimple", - "pos": [ - -66.25785064697266, - 484.081787109375 - ], - "size": [ - 315, - 98 - ], - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [ - { - "label": "MODEL", - "name": "MODEL", - "type": "MODEL", - "slot_index": 0, - "links": [ - 197 - ] - }, - { - "label": "CLIP", - "name": "CLIP", - "type": "CLIP", - "slot_index": 1, - "links": [ - 194, - 196 - ] - }, - { - "label": "VAE", - "name": "VAE", - "type": "VAE", - "slot_index": 2, - "links": [ - 200, - 203 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.26", - "Node name for S&R": "CheckpointLoaderSimple" - }, - "widgets_values": [ - "flux1-dev-fp8.safetensors" - ] - }, - { - "id": 73, - "type": "LanPaint_KSampler", - "pos": [ - 1005.0399780273438, - 296.9553527832031 - ], - "size": [ - 413.6495666503906, - 596 - ], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 197 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 207 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 210 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 186 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "slot_index": 0, - "links": [ - 187 - ] - } - ], - "properties": { - "cnr_id": "LanPaint", - "ver": "56bd6c04e89124cd06682b304245d6ddf8b20522", - "Node name for S&R": "LanPaint_KSampler" - }, - "widgets_values": [ - 0, - "fixed", - 30, - 1, - "euler", - "simple", - 1, - 5, - "Image First", - "LanPaint KSampler. Recommend steps 50, LanPaint NumSteps 1-20 depending on the difficulty of task. LanPaint_EndSigma = 3.0 for anime style, 0.6 for realistic style. For more information, visit https://github.com/scraed/LanPaint", - "๐Ÿ–ผ๏ธ Image Inpainting" - ] - }, - { - "id": 65, - "type": "VAEEncode", - "pos": [ - 200.1034698486328, - 776.3561401367188 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 188 - }, - { - "name": "vae", - "type": "VAE", - "link": 203 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "slot_index": 0, - "links": [ - 216 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "VAEEncode" - }, - "widgets_values": [] - }, - { - "id": 48, - "type": "SaveImage", - "pos": [ - 1075.49169921875, - 1167.2703857421875 - ], - "size": [ - 311.2532653808594, - 484.7096252441406 - ], - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 103 - } - ], - "outputs": [], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23" - }, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 81, - "type": "LanPaint_MaskBlend", - "pos": [ - 1773.0189208984375, - 1222.9478759765625 - ], - "size": [ - 210, - 98 - ], - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "image1", - "type": "IMAGE", - "link": 219 - }, - { - "name": "image2", - "type": "IMAGE", - "link": 218 - }, - { - "name": "mask", - "type": "MASK", - "link": 220 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 217 - ] - } - ], - "properties": { - "cnr_id": "LanPaint", - "ver": "4d3d5d17f0105b673df92da5b084cce567c9c712", - "Node name for S&R": "LanPaint_MaskBlend" - }, - "widgets_values": [ - 9 - ] - }, - { - "id": 82, - "type": "SaveImage", - "pos": [ - 2106.45166015625, - 1090.682861328125 - ], - "size": [ - 311.2532653808594, - 484.7096252441406 - ], - "flags": {}, - "order": 11, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 217 - } - ], - "outputs": [], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23" - }, - "widgets_values": [ - "ComfyUI" - ] - }, - { - "id": 8, - "type": "VAEDecode", - "pos": [ - 1211.46484375, - 1065.318359375 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 187 - }, - { - "name": "vae", - "type": "VAE", - "link": 200 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "slot_index": 0, - "links": [ - 103, - 218 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "VAEDecode" - }, - "widgets_values": [] - }, - { - "id": 75, - "type": "LoadImage", - "pos": [ - 45.954593658447266, - 1150.45556640625 - ], - "size": [ - 266.13720703125, - 487.1314697265625 - ], - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 188, - 219 - ] - }, - { - "name": "MASK", - "type": "MASK", - "links": [ - 189, - 220 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.27", - "Node name for S&R": "LoadImage" - }, - "widgets_values": [ - "clipspace/clipspace-mask-8865503.5.png [input]", - "image" - ] - } - ], - "links": [ - [ - 103, - 8, - 0, - 48, - 0, - "IMAGE" - ], - [ - 186, - 66, - 0, - 73, - 3, - "LATENT" - ], - [ - 187, - 73, - 0, - 8, - 0, - "LATENT" - ], - [ - 188, - 75, - 0, - 65, - 0, - "IMAGE" - ], - [ - 189, - 75, - 1, - 66, - 1, - "MASK" - ], - [ - 194, - 77, - 1, - 78, - 0, - "CLIP" - ], - [ - 195, - 78, - 0, - 79, - 0, - "CONDITIONING" - ], - [ - 196, - 77, - 1, - 80, - 0, - "CLIP" - ], - [ - 197, - 77, - 0, - 73, - 0, - "MODEL" - ], - [ - 200, - 77, - 2, - 8, - 1, - "VAE" - ], - [ - 203, - 77, - 2, - 65, - 1, - "VAE" - ], - [ - 207, - 79, - 0, - 73, - 1, - "CONDITIONING" - ], - [ - 210, - 80, - 0, - 73, - 2, - "CONDITIONING" - ], - [ - 216, - 65, - 0, - 66, - 0, - "LATENT" - ], - [ - 217, - 81, - 0, - 82, - 0, - "IMAGE" - ], - [ - 218, - 8, - 0, - 81, - 1, - "IMAGE" - ], - [ - 219, - 75, - 0, - 81, - 0, - "IMAGE" - ], - [ - 220, - 75, - 1, - 81, - 2, - "MASK" - ] - ], - "groups": [ - { - "id": 1, - "title": "Mask image for inpainting.", - "bounding": [ - 36.04227828979492, - 989.7313232421875, - 278.89093017578125, - 669.3414916992188 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 2, - "title": "Convert Latents for LanPaint", - "bounding": [ - 286.0640563964844, - 714.343505859375, - 489.16796875, - 197.81044006347656 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 3, - "title": "Load Model and Set Prompts", - "bounding": [ - -78.9311294555664, - 176.08712768554688, - 1006.1721801757812, - 514.258544921875 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 4, - "title": "Inpaint with the LanPaint KSampler", - "bounding": [ - 960.8922729492188, - 179.17588806152344, - 474.8909606933594, - 630.4742431640625 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 5, - "title": "LanPaint OutPut", - "bounding": [ - 1085.6029052734375, - 994.0775756835938, - 345.4561767578125, - 669.4969482421875 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 11, - "title": "LanPaint", - "bounding": [ - -262.59381103515625, - 140.46656799316406, - 1737.328857421875, - 797.4443359375 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - } - ], - "config": {}, - "extra": { - "ds": { - "scale": 0.35049389948139237, - "offset": [ - 348.866804381099, - 308.65057628971834 - ] - }, - "frontendVersion": "1.27.10", - "node_versions": { - "comfy-core": "0.3.18", - "LanPaint": "0f509469ed2cd60c6032f739e282aad5dfc06166" - } - }, - "version": 0.4 -} \ No newline at end of file diff --git a/example_workflows/Hunyuan_EncodeDecode_Inpaint.jpg b/example_workflows/Hunyuan_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..70948e5 Binary files /dev/null and b/example_workflows/Hunyuan_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/Hunyuan_EncodeDecode_Inpaint.json b/example_workflows/Hunyuan_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..e4b6f27 --- /dev/null +++ b/example_workflows/Hunyuan_EncodeDecode_Inpaint.json @@ -0,0 +1,998 @@ +{ + "id": "054799b4-76bf-4b4e-b7b7-615d2914285b", + "revision": 0, + "last_node_id": 119, + "last_link_id": 274, + "nodes": [ + { + "id": 88, + "type": "Note", + "pos": [ + 180, + 440 + ], + "size": [ + 350, + 110 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Select a fp8 weight_dtype if you are running out of memory." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 103, + "type": "UNETLoader", + "pos": [ + 180, + 310 + ], + "size": [ + 350, + 82 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 250 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "UNETLoader", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "hunyuan_video_t2v_720p_bf16.safetensors", + "default" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 94, + "type": "DualCLIPLoader", + "pos": [ + -160, + -60 + ], + "size": [ + 350, + 130 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 0, + "links": [ + 252, + 255 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "DualCLIPLoader", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "clip_l.safetensors", + "llava_llama3_fp8_scaled.safetensors", + "hunyuan_video", + "default" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 114, + "type": "FluxGuidance", + "pos": [ + 653.5101318359375, + -73.20354461669922 + ], + "size": [ + 270, + 58 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 258 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 259 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.65", + "Node name for S&R": "FluxGuidance" + }, + "widgets_values": [ + 6 + ] + }, + { + "id": 105, + "type": "LoadImage", + "pos": [ + 171.56072998046875, + 795.9495239257812 + ], + "size": [ + 274.080078125, + 314 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 266, + 272 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 266, + 272 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.59", + "Node name for S&R": "LoadImage", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (8).png", + "image" + ] + }, + { + "id": 104, + "type": "CLIPTextEncode", + "pos": [ + 226.1235809326172, + -161.8229522705078 + ], + "size": [ + 310, + 240 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 252 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 258 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "CLIPTextEncode", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Close up Portrait of a futuristic cowgirl wearing jeans rides a mechanical horse across a vast cyberpunk desert. The dunes shimmer with holographic projections, glowing in blues and purples. cacti and two massive moons hang low on the horizon, illuminating the dusty air. Cyberpunk western fusion, cinematic, 8K, highly detailed, atmospheric perspective, Blade Runner style." + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 113, + "type": "CLIPTextEncode", + "pos": [ + 233.61778259277344, + 122.75636291503906 + ], + "size": [ + 319.00726318359375, + 88 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 255 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 254 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "CLIPTextEncode", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 92, + "type": "Note", + "pos": [ + 1340, + 250 + ], + "size": [ + 210, + 170 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Use the tiled decode node by default because most people will need it.\n\nLower the tile_size and overlap if you run out of memory." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 116, + "type": "Note", + "pos": [ + 1324.0262451171875, + 583.7811889648438 + ], + "size": [ + 210, + 170 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": { + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "Decrease LanPaint_NumSteps to accelerate" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 85, + "type": "VAEDecodeTiled", + "pos": [ + 1341.9100341796875, + 49.04500961303711 + ], + "size": [ + 210, + 150 + ], + "flags": {}, + "order": 14, + "mode": 4, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 248 + }, + { + "name": "vae", + "type": "VAE", + "link": 237 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 251 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.18", + "Node name for S&R": "VAEDecodeTiled", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 256, + 64, + 64, + 8 + ] + }, + { + "id": 86, + "type": "SaveAnimatedWEBP", + "pos": [ + 1661.5201416015625, + 68.0674819946289 + ], + "size": [ + 380, + 366 + ], + "flags": {}, + "order": 16, + "mode": 4, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 251 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.18", + "Node name for S&R": "SaveAnimatedWEBP", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "ComfyUI", + 24, + false, + 80, + "default" + ] + }, + { + "id": 110, + "type": "LanPaint_KSampler", + "pos": [ + 829.425537109375, + 218.98995971679688 + ], + "size": [ + 400, + 596 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 239 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 259 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 254 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 269 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 248, + 270 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "6109df6591a4cf2bc9d3b113d03f7297fa9248e9", + "Node name for S&R": "LanPaint_KSampler" + }, + "widgets_values": [ + 534861079790570, + "randomize", + 20, + 1, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", + "๐Ÿ–ผ๏ธ Image Inpainting" + ] + }, + { + "id": 78, + "type": "VAELoader", + "pos": [ + 910, + -230 + ], + "size": [ + 350.65509033203125, + 58 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "slot_index": 0, + "links": [ + 237, + 267, + 271 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.18", + "Node name for S&R": "VAELoader", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + "hunyuan_video_vae_bf16.safetensors" + ] + }, + { + "id": 81, + "type": "ModelSamplingSD3", + "pos": [ + 613.9942626953125, + 59.9338493347168 + ], + "size": [ + 210, + 58 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 250 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 239 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.18", + "Node name for S&R": "ModelSamplingSD3", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + } + }, + "widgets_values": [ + 7 + ] + }, + { + "id": 117, + "type": "SaveImage", + "pos": [ + 1670.939697265625, + -104.6227798461914 + ], + "size": [ + 531.0060424804688, + 550.45361328125 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 274 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.65" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 118, + "type": "LanPaint_ImageEncode", + "pos": [ + 558, + 922 + ], + "size": [ + 300, + 150 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 266 + }, + { + "name": "vae", + "type": "VAE", + "link": 267 + }, + { + "name": "mask", + "type": "MASK", + "link": 268 + } + ], + "outputs": [ + { + "name": "latent", + "type": "LATENT", + "links": [ + 269 + ] + } + ], + "widgets_values": [], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + } + }, + { + "id": 119, + "type": "LanPaint_ImageDecode", + "pos": [ + 1670, + -110 + ], + "size": [ + 300, + 200 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 270 + }, + { + "name": "vae", + "type": "VAE", + "link": 271 + }, + { + "name": "image", + "type": "IMAGE", + "link": 272 + }, + { + "name": "mask", + "type": "MASK", + "link": 273 + }, + { + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + } + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 274 + ] + } + ], + "widgets_values": [ + 9 + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + } + } + ], + "links": [ + [ + 237, + 78, + 0, + 85, + 1, + "VAE" + ], + [ + 239, + 81, + 0, + 110, + 0, + "MODEL" + ], + [ + 248, + 110, + 0, + 85, + 0, + "LATENT" + ], + [ + 250, + 103, + 0, + 81, + 0, + "MODEL" + ], + [ + 251, + 85, + 0, + 86, + 0, + "IMAGE" + ], + [ + 252, + 94, + 0, + 104, + 0, + "CLIP" + ], + [ + 254, + 113, + 0, + 110, + 2, + "CONDITIONING" + ], + [ + 255, + 94, + 0, + 113, + 0, + "CLIP" + ], + [ + 258, + 104, + 0, + 114, + 0, + "CONDITIONING" + ], + [ + 259, + 114, + 0, + 110, + 1, + "CONDITIONING" + ], + [ + 266, + 105, + 0, + 118, + 0, + "IMAGE" + ], + [ + 267, + 78, + 0, + 118, + 1, + "VAE" + ], + [ + 268, + 105, + 1, + 118, + 2, + "MASK" + ], + [ + 269, + 118, + 0, + 110, + 3, + "LATENT" + ], + [ + 270, + 110, + 0, + 119, + 0, + "LATENT" + ], + [ + 271, + 78, + 0, + 119, + 1, + "VAE" + ], + [ + 272, + 105, + 0, + 119, + 2, + "IMAGE" + ], + [ + 273, + 105, + 1, + 119, + 3, + "MASK" + ], + [ + 274, + 119, + 0, + 117, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Text Encoding", + "bounding": [ + -190, + -140, + 730, + 340 + ], + "color": "#8A8", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "VAE Decoding & Output", + "bounding": [ + 1320, + -140, + 1110, + 600 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Sampling Process", + "bounding": [ + 570, + -140, + 730, + 980 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "HunyuanVideo Model", + "bounding": [ + 170, + 230, + 370.5005798339844, + 330.7360534667969 + ], + "color": "#88A", + "font_size": 24, + "flags": {} + }, + { + "id": 6, + "title": "Guidance", + "bounding": [ + 590, + -90, + 680, + 260 + ], + "color": "#8AA", + "font_size": 24, + "flags": {} + }, + { + "id": 7, + "title": "sampling", + "bounding": [ + 590, + 200, + 680, + 440 + ], + "color": "#b06634", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.4870776476432723, + "offset": [ + 85.03251058761712, + 779.6524460150363 + ] + }, + "frontendVersion": "1.27.10", + "groupNodes": {}, + "ue_links": [], + "links_added_by_ue": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} diff --git a/example_workflows/Hunyuan_Inpaint.jpg b/example_workflows/Hunyuan_Inpaint.jpg deleted file mode 100644 index 8034d4a..0000000 Binary files a/example_workflows/Hunyuan_Inpaint.jpg and /dev/null differ diff --git a/example_workflows/Hunyuan_Inpaint.json b/example_workflows/Hunyuan_Inpaint.json deleted file mode 100644 index a659601..0000000 --- a/example_workflows/Hunyuan_Inpaint.json +++ /dev/null @@ -1,1033 +0,0 @@ -{ - "id": "054799b4-76bf-4b4e-b7b7-615d2914285b", - "revision": 0, - "last_node_id": 117, - "last_link_id": 265, - "nodes": [ - { - "id": 88, - "type": "Note", - "pos": [ - 180, - 440 - ], - "size": [ - 350, - 110 - ], - "flags": {}, - "order": 0, - "mode": 0, - "inputs": [], - "outputs": [], - "properties": { - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Select a fp8 weight_dtype if you are running out of memory." - ], - "color": "#432", - "bgcolor": "#653" - }, - { - "id": 103, - "type": "UNETLoader", - "pos": [ - 180, - 310 - ], - "size": [ - 350, - 82 - ], - "flags": {}, - "order": 1, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "slot_index": 0, - "links": [ - 241, - 242, - 250 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "UNETLoader", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "hunyuan_video_t2v_720p_bf16.safetensors", - "default" - ], - "color": "#223", - "bgcolor": "#335" - }, - { - "id": 94, - "type": "DualCLIPLoader", - "pos": [ - -160, - -60 - ], - "size": [ - 350, - 130 - ], - "flags": {}, - "order": 2, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "CLIP", - "type": "CLIP", - "slot_index": 0, - "links": [ - 244, - 252, - 255 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "DualCLIPLoader", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "clip_l.safetensors", - "llava_llama3_fp8_scaled.safetensors", - "hunyuan_video", - "default" - ], - "color": "#223", - "bgcolor": "#335" - }, - { - "id": 114, - "type": "FluxGuidance", - "pos": [ - 653.5101318359375, - -73.20354461669922 - ], - "size": [ - 270, - 58 - ], - "flags": {}, - "order": 11, - "mode": 0, - "inputs": [ - { - "name": "conditioning", - "type": "CONDITIONING", - "link": 258 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "links": [ - 259 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.65", - "Node name for S&R": "FluxGuidance" - }, - "widgets_values": [ - 6 - ] - }, - { - "id": 106, - "type": "VAEEncode", - "pos": [ - 558.60888671875, - 922.0687255859375 - ], - "size": [ - 140, - 46 - ], - "flags": {}, - "order": 10, - "mode": 0, - "inputs": [ - { - "name": "pixels", - "type": "IMAGE", - "link": 216 - }, - { - "name": "vae", - "type": "VAE", - "link": 220 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 217 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.59", - "Node name for S&R": "VAEEncode", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 107, - "type": "SetLatentNoiseMask", - "pos": [ - 732.1127319335938, - 906.8209228515625 - ], - "size": [ - 180.74765014648438, - 46 - ], - "flags": {}, - "order": 12, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 217 - }, - { - "name": "mask", - "type": "MASK", - "link": 218 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 261 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.59", - "Node name for S&R": "SetLatentNoiseMask", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 105, - "type": "LoadImage", - "pos": [ - 171.56072998046875, - 795.9495239257812 - ], - "size": [ - 274.080078125, - 314 - ], - "flags": {}, - "order": 3, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "links": [ - 216 - ] - }, - { - "name": "MASK", - "type": "MASK", - "links": [ - 218 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.59", - "Node name for S&R": "LoadImage", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Masked_Load_Me_in_Loader (8).png", - "image" - ] - }, - { - "id": 104, - "type": "CLIPTextEncode", - "pos": [ - 226.1235809326172, - -161.8229522705078 - ], - "size": [ - 310, - 240 - ], - "flags": {}, - "order": 8, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 252 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 245, - 258 - ] - } - ], - "title": "CLIP Text Encode (Positive Prompt)", - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "CLIPTextEncode", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Close up Portrait of a futuristic cowgirl wearing jeans rides a mechanical horse across a vast cyberpunk desert. The dunes shimmer with holographic projections, glowing in blues and purples. cacti and two massive moons hang low on the horizon, illuminating the dusty air. Cyberpunk western fusion, cinematic, 8K, highly detailed, atmospheric perspective, Blade Runner style." - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 113, - "type": "CLIPTextEncode", - "pos": [ - 233.61778259277344, - 122.75636291503906 - ], - "size": [ - 319.00726318359375, - 88 - ], - "flags": {}, - "order": 9, - "mode": 0, - "inputs": [ - { - "name": "clip", - "type": "CLIP", - "link": 255 - } - ], - "outputs": [ - { - "name": "CONDITIONING", - "type": "CONDITIONING", - "slot_index": 0, - "links": [ - 254 - ] - } - ], - "title": "CLIP Text Encode (Positive Prompt)", - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.23", - "Node name for S&R": "CLIPTextEncode", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "" - ], - "color": "#232", - "bgcolor": "#353" - }, - { - "id": 92, - "type": "Note", - "pos": [ - 1340, - 250 - ], - "size": [ - 210, - 170 - ], - "flags": {}, - "order": 4, - "mode": 0, - "inputs": [], - "outputs": [], - "properties": { - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Use the tiled decode node by default because most people will need it.\n\nLower the tile_size and overlap if you run out of memory." - ], - "color": "#432", - "bgcolor": "#653" - }, - { - "id": 116, - "type": "Note", - "pos": [ - 1324.0262451171875, - 583.7811889648438 - ], - "size": [ - 210, - 170 - ], - "flags": {}, - "order": 5, - "mode": 0, - "inputs": [], - "outputs": [], - "properties": { - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "Decrease LanPaint_NumSteps to accelerate" - ], - "color": "#432", - "bgcolor": "#653" - }, - { - "id": 85, - "type": "VAEDecodeTiled", - "pos": [ - 1341.9100341796875, - 49.04500961303711 - ], - "size": [ - 210, - 150 - ], - "flags": {}, - "order": 14, - "mode": 4, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 248 - }, - { - "name": "vae", - "type": "VAE", - "link": 237 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "slot_index": 0, - "links": [ - 246, - 247, - 251 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.18", - "Node name for S&R": "VAEDecodeTiled", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 256, - 64, - 64, - 8 - ] - }, - { - "id": 86, - "type": "SaveAnimatedWEBP", - "pos": [ - 1661.5201416015625, - 68.0674819946289 - ], - "size": [ - 380, - 366 - ], - "flags": {}, - "order": 16, - "mode": 4, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 251 - } - ], - "outputs": [], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.18", - "Node name for S&R": "SaveAnimatedWEBP", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "ComfyUI", - 24, - false, - 80, - "default" - ] - }, - { - "id": 110, - "type": "LanPaint_KSampler", - "pos": [ - 829.425537109375, - 218.98995971679688 - ], - "size": [ - 400, - 596 - ], - "flags": {}, - "order": 13, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 239 - }, - { - "name": "positive", - "type": "CONDITIONING", - "link": 259 - }, - { - "name": "negative", - "type": "CONDITIONING", - "link": 254 - }, - { - "name": "latent_image", - "type": "LATENT", - "link": 261 - } - ], - "outputs": [ - { - "name": "LATENT", - "type": "LATENT", - "links": [ - 248, - 262 - ] - } - ], - "properties": { - "cnr_id": "LanPaint", - "ver": "6109df6591a4cf2bc9d3b113d03f7297fa9248e9", - "Node name for S&R": "LanPaint_KSampler" - }, - "widgets_values": [ - 534861079790570, - "randomize", - 20, - 1, - "euler", - "simple", - 1, - 5, - "Image First", - "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", - "๐Ÿ–ผ๏ธ Image Inpainting" - ] - }, - { - "id": 89, - "type": "VAEDecode", - "pos": [ - 1340, - -60 - ], - "size": [ - 210, - 46 - ], - "flags": {}, - "order": 15, - "mode": 0, - "inputs": [ - { - "name": "samples", - "type": "LATENT", - "link": 262 - }, - { - "name": "vae", - "type": "VAE", - "link": 265 - } - ], - "outputs": [ - { - "name": "IMAGE", - "type": "IMAGE", - "slot_index": 0, - "links": [ - 264 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.18", - "Node name for S&R": "VAEDecode", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [] - }, - { - "id": 78, - "type": "VAELoader", - "pos": [ - 910, - -230 - ], - "size": [ - 350.65509033203125, - 58 - ], - "flags": {}, - "order": 6, - "mode": 0, - "inputs": [], - "outputs": [ - { - "name": "VAE", - "type": "VAE", - "slot_index": 0, - "links": [ - 229, - 232, - 220, - 237, - 265 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.18", - "Node name for S&R": "VAELoader", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - "hunyuan_video_vae_bf16.safetensors" - ] - }, - { - "id": 81, - "type": "ModelSamplingSD3", - "pos": [ - 613.9942626953125, - 59.9338493347168 - ], - "size": [ - 210, - 58 - ], - "flags": {}, - "order": 7, - "mode": 0, - "inputs": [ - { - "name": "model", - "type": "MODEL", - "link": 250 - } - ], - "outputs": [ - { - "name": "MODEL", - "type": "MODEL", - "slot_index": 0, - "links": [ - 226, - 239 - ] - } - ], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.18", - "Node name for S&R": "ModelSamplingSD3", - "ue_properties": { - "widget_ue_connectable": {}, - "version": "7.1", - "input_ue_unconnectable": {} - } - }, - "widgets_values": [ - 7 - ] - }, - { - "id": 117, - "type": "SaveImage", - "pos": [ - 1670.939697265625, - -104.6227798461914 - ], - "size": [ - 531.0060424804688, - 550.45361328125 - ], - "flags": {}, - "order": 17, - "mode": 0, - "inputs": [ - { - "name": "images", - "type": "IMAGE", - "link": 264 - } - ], - "outputs": [], - "properties": { - "cnr_id": "comfy-core", - "ver": "0.3.65" - }, - "widgets_values": [ - "ComfyUI" - ] - } - ], - "links": [ - [ - 216, - 105, - 0, - 106, - 0, - "IMAGE" - ], - [ - 217, - 106, - 0, - 107, - 0, - "LATENT" - ], - [ - 218, - 105, - 1, - 107, - 1, - "MASK" - ], - [ - 220, - 78, - 0, - 106, - 1, - "VAE" - ], - [ - 237, - 78, - 0, - 85, - 1, - "VAE" - ], - [ - 239, - 81, - 0, - 110, - 0, - "MODEL" - ], - [ - 248, - 110, - 0, - 85, - 0, - "LATENT" - ], - [ - 250, - 103, - 0, - 81, - 0, - "MODEL" - ], - [ - 251, - 85, - 0, - 86, - 0, - "IMAGE" - ], - [ - 252, - 94, - 0, - 104, - 0, - "CLIP" - ], - [ - 254, - 113, - 0, - 110, - 2, - "CONDITIONING" - ], - [ - 255, - 94, - 0, - 113, - 0, - "CLIP" - ], - [ - 258, - 104, - 0, - 114, - 0, - "CONDITIONING" - ], - [ - 259, - 114, - 0, - 110, - 1, - "CONDITIONING" - ], - [ - 261, - 107, - 0, - 110, - 3, - "LATENT" - ], - [ - 262, - 110, - 0, - 89, - 0, - "LATENT" - ], - [ - 264, - 89, - 0, - 117, - 0, - "IMAGE" - ], - [ - 265, - 78, - 0, - 89, - 1, - "VAE" - ] - ], - "groups": [ - { - "id": 1, - "title": "Text Encoding", - "bounding": [ - -190, - -140, - 730, - 340 - ], - "color": "#8A8", - "font_size": 24, - "flags": {} - }, - { - "id": 2, - "title": "VAE Decoding & Output", - "bounding": [ - 1320, - -140, - 1110, - 600 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 4, - "title": "Sampling Process", - "bounding": [ - 570, - -140, - 730, - 980 - ], - "color": "#3f789e", - "font_size": 24, - "flags": {} - }, - { - "id": 5, - "title": "HunyuanVideo Model", - "bounding": [ - 170, - 230, - 370.5005798339844, - 330.7360534667969 - ], - "color": "#88A", - "font_size": 24, - "flags": {} - }, - { - "id": 6, - "title": "Guidance", - "bounding": [ - 590, - -90, - 680, - 260 - ], - "color": "#8AA", - "font_size": 24, - "flags": {} - }, - { - "id": 7, - "title": "sampling", - "bounding": [ - 590, - 200, - 680, - 440 - ], - "color": "#b06634", - "font_size": 24, - "flags": {} - } - ], - "config": {}, - "extra": { - "ds": { - "scale": 0.4870776476432723, - "offset": [ - 85.03251058761712, - 779.6524460150363 - ] - }, - "frontendVersion": "1.27.10", - "groupNodes": {}, - "ue_links": [], - "links_added_by_ue": [], - "VHS_latentpreview": false, - "VHS_latentpreviewrate": 0, - "VHS_MetadataImage": true, - "VHS_KeepIntermediate": true - }, - "version": 0.4 -} \ No newline at end of file diff --git a/example_workflows/Ideogram4_EncodeDecode_Inpaint.jpg b/example_workflows/Ideogram4_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..029bc77 Binary files /dev/null and b/example_workflows/Ideogram4_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/Ideogram4_EncodeDecode_Inpaint.json b/example_workflows/Ideogram4_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..3b5e38f --- /dev/null +++ b/example_workflows/Ideogram4_EncodeDecode_Inpaint.json @@ -0,0 +1,2962 @@ +{ + "id": "7787daea-1356-4c66-b62a-128f59f23a30", + "revision": 0, + "last_node_id": 343, + "last_link_id": 565, + "nodes": [ + { + "id": 37, + "type": "ResolutionSelector", + "pos": [ + 5900, + 900 + ], + "size": [ + 380, + 170 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "aspect_ratio", + "name": "aspect_ratio", + "type": "COMBO", + "widget": { + "name": "aspect_ratio" + }, + "link": null + }, + { + "localized_name": "megapixels", + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "links": [ + 161 + ] + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "links": [ + 161 + ] + } + ], + "properties": { + "Node name for S&R": "ResolutionSelector", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "9:16 (Portrait Widescreen)", + 1 + ] + }, + { + "id": 100, + "type": "MarkdownNote", + "pos": [ + 5150, + 530 + ], + "size": [ + 640, + 990 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Ideogram 4.0", + "properties": {}, + "widgets_values": [ + "### About the model\n\nThe model is trained on **structured JSON captions** (scene summary, style block, background, and optional per-object descriptions with bounding boxes and hex color palettes). Official inference validates prompts against that schema. Guidance uses **flow-matching** with **asymmetric classifier-free guidance** (the unconditional pass drops text tokens)โ€”not a separate negative prompt string.\n\n**NOTE: If you see \"Image blocked by safety filter\" it is because of safety training in the model itself, ComfyUI does not have any safety filter.**\n---\n\n### How to build prompts here\n\n**(a) Raw input**: Paste or type directly into the subgraph. You may use plain natural language, but **structured JSON** (as in the subgraph default) gives the most predictable layout and style control.\n\n**(b) Model-assisted (LLM):** Use the **Ideogram4 Caption Prompt Template** output with any LLM tools to obtain the JSON format prompt" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 99, + "type": "MarkdownNote", + "pos": [ + 4570, + 530 + ], + "size": [ + 530, + 990 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Model link", + "properties": {}, + "widgets_values": [ + "Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links (for Local Users)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n**diffusion_models**\n\n- [ideogram4_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_fp8_scaled.safetensors)\n- [ideogram4_unconditional_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_unconditional_fp8_scaled.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_8b_fp8_scaled.safetensors)\n- [gemma4_e4b_it_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/gemma-4/resolve/main/text_encoders/gemma4_e4b_it_fp8_scaled.safetensors)\n\n\n## Model Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ”‚ โ””โ”€โ”€ flux2-vae.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ”œโ”€โ”€ ideogram4_fp8_scaled.safetensors\nโ”‚ โ”‚ โ””โ”€โ”€ ideogram4_unconditional_fp8_scaled.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”œโ”€โ”€ qwen3vl_8b_fp8_scaled.safetensors\nโ”‚ โ””โ”€โ”€ gemma4_e4b_it_fp8_scaled.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 98, + "type": "83e6e004-48ea-408e-9024-eb49c3d7dc14", + "pos": [ + 6476.743849908599, + 508.6449647160024 + ], + "size": [ + 440, + 690 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "label": "prompt", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + }, + { + "label": "width", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": 161 + }, + { + "label": "height", + "name": "value_1", + "type": "INT", + "widget": { + "name": "value_1" + }, + "link": 162 + }, + { + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": 523 + }, + { + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": null + }, + { + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": null + }, + { + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": null + }, + { + "label": "unconditional_unet", + "name": "unet_name_1", + "type": "COMBO", + "widget": { + "name": "unet_name_1" + }, + "link": null + }, + { + "label": "mode", + "name": "choice", + "type": "COMBO", + "widget": { + "name": "choice" + }, + "link": null + }, + { + "label": "inpaint_image", + "name": "inpaint_image", + "type": "IMAGE", + "link": 253 + }, + { + "label": "inpaint_mask", + "name": "inpaint_mask", + "type": "MASK", + "link": 254 + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 556 + ] + } + ], + "properties": { + "proxyWidgets": [ + [ + "24", + "text" + ], + [ + "27", + "value" + ], + [ + "28", + "value" + ], + [ + "18", + "noise_seed" + ], + [ + "23", + "unet_name" + ], + [ + "14", + "clip_name" + ], + [ + "9", + "vae_name" + ], + [ + "154", + "unet_name" + ], + [ + "156", + "choice" + ] + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [] + }, + { + "id": 179, + "type": "SaveImage", + "pos": [ + 7025.816514763039, + 484.88857756254396 + ], + "size": [ + 277.2951034932039, + 525.7680007700244 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 556 + }, + { + "localized_name": "filename_prefix", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + }, + "link": null + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "SaveImage", + "cnr_id": "comfy-core" + }, + "widgets_values": [ + "Ideogram4_Inpaint" + ] + }, + { + "id": 327, + "type": "PrimitiveInt", + "pos": [ + 5919.063881344126, + 1143.3286774978537 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 523 + ] + } + ], + "properties": { + "Node name for S&R": "PrimitiveInt" + }, + "widgets_values": [ + 0, + "fixed" + ] + }, + { + "id": 177, + "type": "LoadImage", + "pos": [ + 5923.459283666403, + 175.6559758818683 + ], + "size": [ + 330.6379176318087, + 626.8917604451399 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "choose file to upload", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 253 + ] + }, + { + "localized_name": "MASK", + "name": "MASK", + "type": "MASK", + "links": [ + 253 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "image": "clipspace/clipspace-painted-masked-1782274301625.png [input]" + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (18).png", + "image" + ] + } + ], + "links": [ + [ + 161, + 37, + 0, + 98, + 1, + "INT" + ], + [ + 162, + 37, + 1, + 98, + 2, + "INT" + ], + [ + 253, + 177, + 0, + 98, + 9, + "IMAGE" + ], + [ + 254, + 177, + 1, + 98, + 10, + "MASK" + ], + [ + 523, + 327, + 0, + 98, + 3, + "INT" + ], + [ + 556, + 98, + 0, + 179, + 0, + "IMAGE" + ] + ], + "groups": [], + "definitions": { + "subgraphs": [ + { + "id": "83e6e004-48ea-408e-9024-eb49c3d7dc14", + "version": 1, + "state": { + "lastGroupId": 12, + "lastNodeId": 343, + "lastLinkId": 565, + "lastRerouteId": 0 + }, + "revision": 1, + "config": {}, + "name": "Text to Image (Ideogram v4)", + "inputNode": { + "id": -10, + "bounding": [ + 3490, + 920, + 154.921875, + 268 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 6850, + 936, + 128, + 68 + ] + }, + "inputs": [ + { + "id": "4bc742d1-7b4b-452c-90d9-0d76ebcdae76", + "name": "text", + "type": "STRING", + "linkIds": [ + 152 + ], + "label": "prompt", + "pos": [ + 3620.921875, + 944 + ] + }, + { + "id": "8d4038eb-73c7-45e9-bba1-f068f55e8d32", + "name": "value", + "type": "INT", + "linkIds": [ + 153 + ], + "label": "width", + "pos": [ + 3620.921875, + 964 + ] + }, + { + "id": "281550e6-6acf-4cbe-aec1-9eb803b4dec1", + "name": "value_1", + "type": "INT", + "linkIds": [ + 154 + ], + "label": "height", + "pos": [ + 3620.921875, + 984 + ] + }, + { + "id": "fae56884-2f1a-470b-a25f-40e7a87ef69d", + "name": "noise_seed", + "type": "INT", + "linkIds": [ + 155 + ], + "pos": [ + 3620.921875, + 1004 + ] + }, + { + "id": "3497309c-a7d7-4e28-9330-142c15881632", + "name": "unet_name", + "type": "COMBO", + "linkIds": [ + 156 + ], + "pos": [ + 3620.921875, + 1024 + ] + }, + { + "id": "e87126db-7147-465e-b129-370ed2c6cc22", + "name": "clip_name", + "type": "COMBO", + "linkIds": [ + 157 + ], + "pos": [ + 3620.921875, + 1044 + ] + }, + { + "id": "a1e6c080-b11b-4d5c-a3a8-fcf4df654cf7", + "name": "vae_name", + "type": "COMBO", + "linkIds": [ + 158 + ], + "pos": [ + 3620.921875, + 1064 + ] + }, + { + "id": "b0d16516-95de-44d9-bea8-3cd2e7c78e9a", + "name": "unet_name_1", + "type": "COMBO", + "linkIds": [ + 216 + ], + "label": "unconditional_unet", + "pos": [ + 3620.921875, + 1084 + ] + }, + { + "id": "249fd825-e6b3-489d-a341-6d8050500f5e", + "name": "choice", + "type": "COMBO", + "linkIds": [ + 219 + ], + "label": "mode", + "pos": [ + 3620.921875, + 1104 + ] + }, + { + "id": "2f66593a-80c3-4fc0-a512-247cee7120f9", + "name": "inpaint_image", + "type": "IMAGE", + "linkIds": [ + 557, + 563 + ], + "label": "inpaint_image", + "pos": [ + 3620.921875, + 1124 + ] + }, + { + "id": "3ee26dba-045a-40e3-9e31-352701449a82", + "name": "inpaint_mask", + "type": "MASK", + "linkIds": [ + 558, + 564 + ], + "label": "inpaint_mask", + "pos": [ + 3620.921875, + 1144 + ] + } + ], + "outputs": [ + { + "id": "b81e4f60-e543-4f02-875b-b0f1bdc274f2", + "name": "IMAGE", + "type": "IMAGE", + "linkIds": [ + 565 + ], + "localized_name": "IMAGE", + "pos": [ + 6874, + 960 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 10, + "type": "ConditioningZeroOut", + "pos": [ + 5450, + 960 + ], + "size": [ + 250, + 80 + ], + "flags": { + "collapsed": false + }, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 8 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 214 + ] + } + ], + "properties": { + "Node name for S&R": "ConditioningZeroOut", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.9.1" + }, + "widgets_values": [] + }, + { + "id": 16, + "type": "KSamplerSelect", + "pos": [ + 5790, + 1100 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "sampler_name", + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "SAMPLER", + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 13 + ] + } + ], + "properties": { + "Node name for S&R": "KSamplerSelect", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2" + }, + "widgets_values": [ + "euler" + ] + }, + { + "id": 14, + "type": "CLIPLoader", + "pos": [ + 4730, + 990 + ], + "size": [ + 470, + 170 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "clip_name", + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": 157 + }, + { + "localized_name": "type", + "name": "type", + "type": "COMBO", + "widget": { + "name": "type" + }, + "link": null + }, + { + "localized_name": "device", + "name": "device", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "device" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 24 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "qwen3vl_8b_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_8b_fp8_scaled.safetensors", + "directory": "text_encoders" + } + ] + }, + "widgets_values": [ + "qwen3vl_8b_fp8_scaled.safetensors", + "ideogram4", + "default" + ] + }, + { + "id": 28, + "type": "PrimitiveInt", + "pos": [ + 4250, + 1800 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": 154 + } + ], + "outputs": [ + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 35 + ] + } + ], + "title": "Int (Height)", + "properties": { + "Node name for S&R": "PrimitiveInt", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + 1024, + "fixed" + ] + }, + { + "id": 31, + "type": "ComfyMathExpression", + "pos": [ + 5340, + 1400 + ], + "size": [ + 230, + 80 + ], + "flags": { + "collapsed": true + }, + "order": 13, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 32 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + }, + { + "localized_name": "expression", + "name": "expression", + "type": "STRING", + "widget": { + "name": "expression" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [] + }, + { + "localized_name": "BOOL", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "Node name for S&R": "ComfyMathExpression", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "max(((a + 15) // 16) * 16, 256)" + ] + }, + { + "id": 32, + "type": "ComfyMathExpression", + "pos": [ + 5350, + 1470 + ], + "size": [ + 230, + 80 + ], + "flags": { + "collapsed": true + }, + "order": 14, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 35 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + }, + { + "localized_name": "expression", + "name": "expression", + "type": "STRING", + "widget": { + "name": "expression" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [] + }, + { + "localized_name": "BOOL", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "Node name for S&R": "ComfyMathExpression", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "max(((a + 15) // 16) * 16, 256)" + ] + }, + { + "id": 144, + "type": "ComfyNumberConvert", + "pos": [ + 5920, + 1870 + ], + "size": [ + 230, + 100 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "label": "value", + "localized_name": "value", + "name": "value", + "type": "INT,FLOAT,STRING,BOOLEAN", + "link": 195 + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": [ + 208 + ] + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 208 + ] + } + ], + "properties": { + "Node name for S&R": "ComfyNumberConvert", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [] + }, + { + "id": 145, + "type": "JsonExtractString", + "pos": [ + 5450, + 1870 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "localized_name": "json_string", + "name": "json_string", + "type": "STRING", + "widget": { + "name": "json_string" + }, + "link": 196 + }, + { + "localized_name": "key", + "name": "key", + "type": "STRING", + "widget": { + "name": "key" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 195 + ] + } + ], + "properties": { + "Node name for S&R": "JsonExtractString", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "", + "mu" + ] + }, + { + "id": 146, + "type": "ComfyNumberConvert", + "pos": [ + 5930, + 2110 + ], + "size": [ + 230, + 100 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "label": "value", + "localized_name": "value", + "name": "value", + "type": "INT,FLOAT,STRING,BOOLEAN", + "link": 197 + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": [ + 209 + ] + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 209 + ] + } + ], + "properties": { + "Node name for S&R": "ComfyNumberConvert", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [] + }, + { + "id": 148, + "type": "StringReplace", + "pos": [ + 5050, + 2150 + ], + "size": [ + 230, + 40 + ], + "flags": { + "collapsed": true + }, + "order": 19, + "mode": 0, + "inputs": [ + { + "localized_name": "string", + "name": "string", + "type": "STRING", + "widget": { + "name": "string" + }, + "link": 199 + }, + { + "localized_name": "find", + "name": "find", + "type": "STRING", + "widget": { + "name": "find" + }, + "link": null + }, + { + "localized_name": "replace", + "name": "replace", + "type": "STRING", + "widget": { + "name": "replace" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 196, + 200, + 201 + ] + } + ], + "properties": { + "Node name for S&R": "StringReplace", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "", + "'", + "\"" + ] + }, + { + "id": 150, + "type": "JsonExtractString", + "pos": [ + 5450, + 2110 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "localized_name": "json_string", + "name": "json_string", + "type": "STRING", + "widget": { + "name": "json_string" + }, + "link": 201 + }, + { + "localized_name": "key", + "name": "key", + "type": "STRING", + "widget": { + "name": "key" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 197 + ] + } + ], + "properties": { + "Node name for S&R": "JsonExtractString", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "", + "std" + ] + }, + { + "id": 154, + "type": "UNETLoader", + "pos": [ + 4730, + 740 + ], + "size": [ + 470, + 170 + ], + "flags": {}, + "order": 23, + "mode": 0, + "showAdvanced": true, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": 216 + }, + { + "localized_name": "weight_dtype", + "name": "weight_dtype", + "type": "COMBO", + "widget": { + "name": "weight_dtype" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "ideogram4_unconditional_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_unconditional_fp8_scaled.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "ideogram4_unconditional_fp8_scaled.safetensors", + "default" + ] + }, + { + "id": 24, + "type": "CLIPTextEncode", + "pos": [ + 5270, + 500 + ], + "size": [ + 430, + 420 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 24 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": 152 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 8, + 213 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "Node name for S&R": "CLIPTextEncode", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2" + }, + "widgets_values": [ + "{\n \"high_level_description\": \"A surreal streetwear mixed-media collage poster featuring a relaxed female skateboarder mid-air against a vibrant blue sky, backed by giant puffy 3D letters spelling 'COMFY'. The composition blends retro magazine cutout aesthetics with grunge elements like torn paper banners and distressed red stamps, conveying an effortless, cozy vibe with a feminine touch.\",\n \"style_description\": {\n \"aesthetics\": \"Retro magazine cutout style, mixed-media digital collage, high-contrast streetwear graphic, featuring rough ripped paper edges and distressed grunge textures.\",\n \"lighting\": \"High-contrast flash mixed with harsh midday sunlight on the skater cutout, contrasting with flat, bright graphic lighting on the 3D typography.\",\n \"photo\": \"Vintage grainy 35mm film with distressed halftone scan textures and subtle light leaks.\",\n \"medium\": \"Mixed-media digital collage\",\n \"color_palette\": [\"#1E73BE\", \"#FDFDFD\", \"#C82A2A\", \"#657C9C\", \"#EFEFEF\"]\n },\n \"compositional_deconstruction\": {\n \"background\": \"A vibrant, clear blue sky layered with a vintage grainy film texture and subtle halftone dot patterns, transitioning down to an implied pale gray concrete ramp at the very bottom edge.\",\n \"elements\": [\n {\n \"type\": \"obj\",\n \"bbox\": [128, 149, 354, 810],\n \"desc\": \"Massive 3D puffy, inflatable white typography spelling 'COMFY'. The letters stretch across the upper half of the canvas, acting as a surreal, soft cloud-like backdrop.\",\n \"color_palette\": [\"#FDFDFD\", \"#E0E0E0\", \"#D3DBE2\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [459, 37, 727, 264],\n \"desc\": \"A cluster of oversized, distressed red stamped circles and dots, applied loosely to the midground like a grunge ink stamp, partially obscuring the bottom left of the text.\",\n \"color_palette\": [\"#C82A2A\", \"#A11D1D\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [23, 366, 153, 666],\n \"desc\": \"A vertically oriented, torn paper side banner pinned to the left edge. The rough-edged paper displays the bold, stamped text 'STAY COZY' in high-contrast black ink.\",\n \"color_palette\": [\"#EFEFEF\", \"#1A1A1A\", \"#C82A2A\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [287, 210, 756, 819],\n \"desc\": \"A sharp photographic cutout of a female skateboarder mid-air in a relaxed, confident pose. She wears slightly cropped, loose-fitting washed denim jeans and a plain white oversized tee, appearing to effortlessly float above the concrete ramp. Her posture and style add a distinct feminine energy to the scene. A distinct white cutout border surrounds her silhouette.\",\n \"color_palette\": [\"#FDFDFD\", \"#657C9C\", \"#2B2B2B\", \"#DCA57D\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [773, 39, 973, 187],\n \"desc\": \"A surreal, miniature floating skateboard cutout, positioned playfully in the upper right sky as if defying gravity.\",\n \"color_palette\": [\"#D2A679\", \"#2B2B2B\", \"#C82A2A\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [105, 830, 905, 980],\n \"desc\": \"A wide, horizontal strip of heavily textured torn paper spanning the lower third of the composition. It features the bold typographic phrase 'BEYOND THE COMFORT ZONE' intermixed with 'EFFORTLESS RIDE' alongside ripped edges that reveal the background.\",\n \"color_palette\": [\"#EFEFEF\", \"#1A1A1A\", \"#999999\"]\n }\n ]\n }\n}" + ] + }, + { + "id": 151, + "type": "ComfyNumberConvert", + "pos": [ + 5907.68546273005, + 1613.2829881809694 + ], + "size": [ + 230, + 100 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "label": "value", + "localized_name": "value", + "name": "value", + "type": "INT,FLOAT,STRING,BOOLEAN", + "link": 202 + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": [] + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [] + } + ], + "properties": { + "Node name for S&R": "ComfyNumberConvert", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [] + }, + { + "id": 17, + "type": "Ideogram4Scheduler", + "pos": [ + 5790, + 1262.238996138813 + ], + "size": [ + 270, + 240 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "steps", + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": 207 + }, + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 34 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 37 + }, + { + "localized_name": "mu", + "name": "mu", + "type": "FLOAT", + "widget": { + "name": "mu" + }, + "link": 208 + }, + { + "localized_name": "std", + "name": "std", + "type": "FLOAT", + "widget": { + "name": "std" + }, + "link": 209 + } + ], + "outputs": [ + { + "localized_name": "SIGMAS", + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 14 + ] + } + ], + "properties": { + "Node name for S&R": "Ideogram4Scheduler", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + 20, + 1024, + 1024, + 0.5, + 1.75 + ] + }, + { + "id": 149, + "type": "JsonExtractString", + "pos": [ + 5459.44033170424, + 1619.5157558224166 + ], + "size": [ + 400, + 200 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "localized_name": "json_string", + "name": "json_string", + "type": "STRING", + "widget": { + "name": "json_string" + }, + "link": 200 + }, + { + "localized_name": "key", + "name": "key", + "type": "STRING", + "widget": { + "name": "key" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 202 + ] + } + ], + "properties": { + "Node name for S&R": "JsonExtractString", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "", + "num_steps" + ] + }, + { + "id": 27, + "type": "PrimitiveInt", + "pos": [ + 4195.590159230157, + 1611.8504293730616 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "INT", + "widget": { + "name": "value" + }, + "link": 153 + } + ], + "outputs": [ + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 32 + ] + } + ], + "title": "Int (Width)", + "properties": { + "Node name for S&R": "PrimitiveInt", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + 1024, + "fixed" + ] + }, + { + "id": 18, + "type": "RandomNoise", + "pos": [ + 5780, + 490 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "localized_name": "noise_seed", + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": 155 + } + ], + "outputs": [ + { + "localized_name": "NOISE", + "name": "NOISE", + "type": "NOISE", + "links": [ + 11 + ] + } + ], + "properties": { + "Node name for S&R": "RandomNoise", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2" + }, + "widgets_values": [ + 190590399309683, + "randomize" + ] + }, + { + "id": 12, + "type": "LanPaint_SamplerCustomAdvanced", + "pos": [ + 6146.729556051947, + 501.8957758197 + ], + "size": [ + 291.4830078125, + 378 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "noise", + "name": "noise", + "type": "NOISE", + "link": 11 + }, + { + "localized_name": "guider", + "name": "guider", + "type": "GUIDER", + "link": 215 + }, + { + "localized_name": "sampler", + "name": "sampler", + "type": "SAMPLER", + "link": 13 + }, + { + "localized_name": "sigmas", + "name": "sigmas", + "type": "SIGMAS", + "link": 14 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 560 + }, + { + "localized_name": "LanPaint_NumSteps", + "name": "LanPaint_NumSteps", + "type": "INT", + "widget": { + "name": "LanPaint_NumSteps" + }, + "link": null + }, + { + "localized_name": "LanPaint_Lambda", + "name": "LanPaint_Lambda", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Lambda" + }, + "link": null + }, + { + "localized_name": "LanPaint_StepSize", + "name": "LanPaint_StepSize", + "type": "FLOAT", + "widget": { + "name": "LanPaint_StepSize" + }, + "link": null + }, + { + "localized_name": "LanPaint_Beta", + "name": "LanPaint_Beta", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Beta" + }, + "link": null + }, + { + "localized_name": "LanPaint_Friction", + "name": "LanPaint_Friction", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Friction" + }, + "link": null + }, + { + "localized_name": "LanPaint_PromptMode", + "name": "LanPaint_PromptMode", + "type": "COMBO", + "widget": { + "name": "LanPaint_PromptMode" + }, + "link": null + }, + { + "localized_name": "LanPaint_EarlyStop", + "name": "LanPaint_EarlyStop", + "type": "INT", + "widget": { + "name": "LanPaint_EarlyStop" + }, + "link": null + }, + { + "localized_name": "LanPaint_Info", + "name": "LanPaint_Info", + "type": "STRING", + "widget": { + "name": "LanPaint_Info" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerThreshold", + "name": "LanPaint_InnerThreshold", + "type": "FLOAT", + "widget": { + "name": "LanPaint_InnerThreshold" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerPatience", + "name": "LanPaint_InnerPatience", + "type": "INT", + "widget": { + "name": "LanPaint_InnerPatience" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "LATENT", + "links": [ + 561 + ] + }, + { + "localized_name": "denoised_output", + "name": "denoised_output", + "type": "LATENT", + "links": [ + 561 + ] + } + ], + "properties": { + "Node name for S&R": "SamplerCustomAdvanced", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "LanPaint", + "ver": "0.8.2" + }, + "widgets_values": [ + 5, + 5.0, + 0.2, + 1, + 15, + "Image First", + 1, + "LanPaint Custom Sampler Adv.", + 0, + 1, + "lanpaint_star_button" + ] + }, + { + "id": 155, + "type": "DualModelGuider", + "pos": [ + 5793.090040212954, + 855.0042466861462 + ], + "size": [ + 270, + 180 + ], + "flags": {}, + "order": 24, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 524 + }, + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "link": 213 + }, + { + "localized_name": "model_negative", + "name": "model_negative", + "shape": 7, + "type": "MODEL", + "link": 522 + }, + { + "localized_name": "negative", + "name": "negative", + "shape": 7, + "type": "CONDITIONING", + "link": 214 + }, + { + "localized_name": "cfg", + "name": "cfg", + "type": "FLOAT", + "widget": { + "name": "cfg" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "GUIDER", + "name": "GUIDER", + "type": "GUIDER", + "links": [ + 215 + ] + } + ], + "properties": { + "Node name for S&R": "DualModelGuider", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + 4 + ] + }, + { + "id": 156, + "type": "CustomCombo", + "pos": [ + 4720, + 1630 + ], + "size": [ + 270, + 280 + ], + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "localized_name": "choice", + "name": "choice", + "type": "COMBO", + "widget": { + "name": "choice" + }, + "link": 219 + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 218 + ] + }, + { + "localized_name": "INDEX", + "name": "INDEX", + "type": "INT", + "links": [ + 218 + ] + } + ], + "properties": { + "Node name for S&R": "CustomCombo", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "Turbo", + 2, + "Quality", + "Default", + "Turbo", + "" + ] + }, + { + "id": 23, + "type": "UNETLoader", + "pos": [ + 4720, + 520 + ], + "size": [ + 470, + 170 + ], + "flags": {}, + "order": 9, + "mode": 0, + "showAdvanced": true, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": 156 + }, + { + "localized_name": "weight_dtype", + "name": "weight_dtype", + "type": "COMBO", + "widget": { + "name": "weight_dtype" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 222, + 522 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "ideogram4_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_fp8_scaled.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "ideogram4_fp8_scaled.safetensors", + "default" + ] + }, + { + "id": 157, + "type": "CFGOverride", + "pos": [ + 5779.178385908843, + 614.2969660399881 + ], + "size": [ + 260, + 170 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 222 + }, + { + "localized_name": "cfg", + "name": "cfg", + "type": "FLOAT", + "widget": { + "name": "cfg" + }, + "link": null + }, + { + "localized_name": "start_percent", + "name": "start_percent", + "type": "FLOAT", + "widget": { + "name": "start_percent" + }, + "link": null + }, + { + "localized_name": "end_percent", + "name": "end_percent", + "type": "FLOAT", + "widget": { + "name": "end_percent" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 524 + ] + } + ], + "properties": { + "Node name for S&R": "CFGOverride", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + 3, + 0.7, + 1 + ] + }, + { + "id": 147, + "type": "JsonExtractString", + "pos": [ + 5023.849189156092, + 1593.9778676825492 + ], + "size": [ + 410, + 470 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "localized_name": "json_string", + "name": "json_string", + "type": "STRING", + "widget": { + "name": "json_string" + }, + "link": null + }, + { + "localized_name": "key", + "name": "key", + "type": "STRING", + "widget": { + "name": "key" + }, + "link": 218 + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 199 + ] + } + ], + "properties": { + "Node name for S&R": "JsonExtractString", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.23.0" + }, + "widgets_values": [ + "{\n \"Quality\": {\n \"num_steps\": 48,\n \"mu\": 0.0,\n \"std\": 1.5,\n \"preset_id\": \"V4_QUALITY_48\"\n },\n \"Default\": {\n \"num_steps\": 20,\n \"mu\": 0.0,\n \"std\": 1.75,\n \"preset_id\": \"V4_DEFAULT_20\"\n },\n \"Turbo\": {\n \"num_steps\": 12,\n \"mu\": 0.5,\n \"std\": 1.75,\n \"preset_id\": \"V4_TURBO_12\"\n }\n}", + "Turbo" + ] + }, + { + "id": 9, + "type": "VAELoader", + "pos": [ + 4730, + 1220 + ], + "size": [ + 470, + 110 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 158 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 559, + 562 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "cnr_id": "comfy-core", + "ver": "0.8.2", + "models": [ + { + "name": "flux2-vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "flux2-vae.safetensors" + ] + }, + { + "id": 342, + "type": "LanPaint_ImageEncode", + "pos": [ + 6420, + 2000 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 50, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 557 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 559 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 558 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 560 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + }, + "widgets_values": [] + }, + { + "id": 343, + "type": "LanPaint_ImageDecode", + "pos": [ + 6730, + 2000 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 51, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 561 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 562 + }, + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 563 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 564 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 565 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + }, + "widgets_values": [ + 9 + ] + } + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + 4700, + 420, + 530, + 1100 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "Latent Size", + "bounding": [ + 5260, + 1080, + 450, + 440 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Sampling", + "bounding": [ + 5740, + 420, + 780, + 1100 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "Prompt", + "bounding": [ + 5260, + 420, + 450, + 640 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 5, + "title": "Image Size", + "bounding": [ + 4130, + 1540, + 530, + 420 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 9, + "title": "Preset", + "bounding": [ + 4700, + 1540, + 1820, + 780 + ], + "color": "#3f789e", + "flags": {} + } + ], + "links": [ + { + "id": 8, + "origin_id": 24, + "origin_slot": 0, + "target_id": 10, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 11, + "origin_id": 18, + "origin_slot": 0, + "target_id": 12, + "target_slot": 0, + "type": "NOISE" + }, + { + "id": 13, + "origin_id": 16, + "origin_slot": 0, + "target_id": 12, + "target_slot": 2, + "type": "SAMPLER" + }, + { + "id": 14, + "origin_id": 17, + "origin_slot": 0, + "target_id": 12, + "target_slot": 3, + "type": "SIGMAS" + }, + { + "id": 34, + "origin_id": 31, + "origin_slot": 1, + "target_id": 17, + "target_slot": 1, + "type": "INT" + }, + { + "id": 37, + "origin_id": 32, + "origin_slot": 1, + "target_id": 17, + "target_slot": 2, + "type": "INT" + }, + { + "id": 24, + "origin_id": 14, + "origin_slot": 0, + "target_id": 24, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 32, + "origin_id": 27, + "origin_slot": 0, + "target_id": 31, + "target_slot": 0, + "type": "INT" + }, + { + "id": 35, + "origin_id": 28, + "origin_slot": 0, + "target_id": 32, + "target_slot": 0, + "type": "INT" + }, + { + "id": 152, + "origin_id": -10, + "origin_slot": 0, + "target_id": 24, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 153, + "origin_id": -10, + "origin_slot": 1, + "target_id": 27, + "target_slot": 0, + "type": "INT" + }, + { + "id": 154, + "origin_id": -10, + "origin_slot": 2, + "target_id": 28, + "target_slot": 0, + "type": "INT" + }, + { + "id": 155, + "origin_id": -10, + "origin_slot": 3, + "target_id": 18, + "target_slot": 0, + "type": "INT" + }, + { + "id": 156, + "origin_id": -10, + "origin_slot": 4, + "target_id": 23, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 157, + "origin_id": -10, + "origin_slot": 5, + "target_id": 14, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 158, + "origin_id": -10, + "origin_slot": 6, + "target_id": 9, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 195, + "origin_id": 145, + "origin_slot": 0, + "target_id": 144, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 196, + "origin_id": 148, + "origin_slot": 0, + "target_id": 145, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 197, + "origin_id": 150, + "origin_slot": 0, + "target_id": 146, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 199, + "origin_id": 147, + "origin_slot": 0, + "target_id": 148, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 200, + "origin_id": 148, + "origin_slot": 0, + "target_id": 149, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 201, + "origin_id": 148, + "origin_slot": 0, + "target_id": 150, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 202, + "origin_id": 149, + "origin_slot": 0, + "target_id": 151, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 207, + "origin_id": 151, + "origin_slot": 1, + "target_id": 17, + "target_slot": 0, + "type": "INT" + }, + { + "id": 208, + "origin_id": 144, + "origin_slot": 0, + "target_id": 17, + "target_slot": 3, + "type": "FLOAT" + }, + { + "id": 209, + "origin_id": 146, + "origin_slot": 0, + "target_id": 17, + "target_slot": 4, + "type": "FLOAT" + }, + { + "id": 213, + "origin_id": 24, + "origin_slot": 0, + "target_id": 155, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 214, + "origin_id": 10, + "origin_slot": 0, + "target_id": 155, + "target_slot": 3, + "type": "CONDITIONING" + }, + { + "id": 215, + "origin_id": 155, + "origin_slot": 0, + "target_id": 12, + "target_slot": 1, + "type": "GUIDER" + }, + { + "id": 216, + "origin_id": -10, + "origin_slot": 7, + "target_id": 154, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 218, + "origin_id": 156, + "origin_slot": 0, + "target_id": 147, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 219, + "origin_id": -10, + "origin_slot": 8, + "target_id": 156, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 222, + "origin_id": 23, + "origin_slot": 0, + "target_id": 157, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 522, + "origin_id": 23, + "origin_slot": 0, + "target_id": 155, + "target_slot": 2, + "type": "MODEL" + }, + { + "id": 524, + "origin_id": 157, + "origin_slot": 0, + "target_id": 155, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 557, + "origin_id": -10, + "origin_slot": 9, + "target_id": 342, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 558, + "origin_id": -10, + "origin_slot": 10, + "target_id": 342, + "target_slot": 2, + "type": "MASK" + }, + { + "id": 559, + "origin_id": 9, + "origin_slot": 0, + "target_id": 342, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 560, + "origin_id": 342, + "origin_slot": 0, + "target_id": 12, + "target_slot": 4, + "type": "LATENT" + }, + { + "id": 561, + "origin_id": 12, + "origin_slot": 0, + "target_id": 343, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 562, + "origin_id": 9, + "origin_slot": 0, + "target_id": 343, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 563, + "origin_id": -10, + "origin_slot": 9, + "target_id": 343, + "target_slot": 2, + "type": "IMAGE" + }, + { + "id": 564, + "origin_id": -10, + "origin_slot": 10, + "target_id": 343, + "target_slot": 3, + "type": "MASK" + }, + { + "id": 565, + "origin_id": 343, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "IMAGE" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "frontendVersion": "1.44.19", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ds": { + "scale": 1.2438230891303907, + "offset": [ + -7392.794884601207, + -307.9644808523266 + ] + } + }, + "version": 0.4 +} diff --git a/example_workflows/Ideogram4_LanPaint_Inpaint.jpg b/example_workflows/Ideogram4_LanPaint_Inpaint.jpg deleted file mode 100644 index 2642205..0000000 Binary files a/example_workflows/Ideogram4_LanPaint_Inpaint.jpg and /dev/null differ diff --git a/example_workflows/Ideogram4_LanPaint_Inpaint.json b/example_workflows/Ideogram4_LanPaint_Inpaint.json deleted file mode 100644 index 0af47f1..0000000 --- a/example_workflows/Ideogram4_LanPaint_Inpaint.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"7787daea-1356-4c66-b62a-128f59f23a30","revision":0,"last_node_id":341,"last_link_id":556,"nodes":[{"id":37,"type":"ResolutionSelector","pos":[5900,900],"size":[380,170],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"aspect_ratio","name":"aspect_ratio","type":"COMBO","widget":{"name":"aspect_ratio"},"link":null},{"localized_name":"megapixels","name":"megapixels","type":"FLOAT","widget":{"name":"megapixels"},"link":null}],"outputs":[{"localized_name":"width","name":"width","type":"INT","links":[161]},{"localized_name":"height","name":"height","type":"INT","links":[162]}],"properties":{"Node name for S&R":"ResolutionSelector","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["9:16 (Portrait Widescreen)",1]},{"id":100,"type":"MarkdownNote","pos":[5150,530],"size":[640,990],"flags":{},"order":1,"mode":0,"inputs":[],"outputs":[],"title":"Note: Ideogram 4.0","properties":{},"widgets_values":["### About the model\n\nThe model is trained on **structured JSON captions** (scene summary, style block, background, and optional per-object descriptions with bounding boxes and hex color palettes). Official inference validates prompts against that schema. Guidance uses **flow-matching** with **asymmetric classifier-free guidance** (the unconditional pass drops text tokens)โ€”not a separate negative prompt string.\n\n**NOTE: If you see \"Image blocked by safety filter\" it is because of safety training in the model itself, ComfyUI does not have any safety filter.**\n---\n\n### How to build prompts here\n\n**(a) Raw input**: Paste or type directly into the subgraph. You may use plain natural language, but **structured JSON** (as in the subgraph default) gives the most predictable layout and style control.\n\n**(b) Model-assisted (LLM):** Use the **Ideogram4 Caption Prompt Template** output with any LLM tools to obtain the JSON format prompt"],"color":"#222","bgcolor":"#000"},{"id":99,"type":"MarkdownNote","pos":[4570,530],"size":[530,990],"flags":{},"order":2,"mode":0,"inputs":[],"outputs":[],"title":"Note: Model link","properties":{},"widgets_values":["Guide: [Subgraph](https://docs.comfy.org/interface/features/subgraph)\n\n## Model Links (for Local Users)\n\n**vae**\n\n- [flux2-vae.safetensors](https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors)\n\n**diffusion_models**\n\n- [ideogram4_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_fp8_scaled.safetensors)\n- [ideogram4_unconditional_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_unconditional_fp8_scaled.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_8b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_8b_fp8_scaled.safetensors)\n- [gemma4_e4b_it_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/gemma-4/resolve/main/text_encoders/gemma4_e4b_it_fp8_scaled.safetensors)\n\n\n## Model Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ”‚ โ””โ”€โ”€ flux2-vae.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ”œโ”€โ”€ ideogram4_fp8_scaled.safetensors\nโ”‚ โ”‚ โ””โ”€โ”€ ideogram4_unconditional_fp8_scaled.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”œโ”€โ”€ qwen3vl_8b_fp8_scaled.safetensors\nโ”‚ โ””โ”€โ”€ gemma4_e4b_it_fp8_scaled.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n"],"color":"#222","bgcolor":"#000"},{"id":98,"type":"83e6e004-48ea-408e-9024-eb49c3d7dc14","pos":[6476.743849908599,508.6449647160024],"size":[440,690],"flags":{},"order":5,"mode":0,"inputs":[{"label":"prompt","name":"text","type":"STRING","widget":{"name":"text"},"link":null},{"label":"width","name":"value","type":"INT","widget":{"name":"value"},"link":161},{"label":"height","name":"value_1","type":"INT","widget":{"name":"value_1"},"link":162},{"name":"noise_seed","type":"INT","widget":{"name":"noise_seed"},"link":523},{"name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":null},{"name":"clip_name","type":"COMBO","widget":{"name":"clip_name"},"link":null},{"name":"vae_name","type":"COMBO","widget":{"name":"vae_name"},"link":null},{"label":"unconditional_unet","name":"unet_name_1","type":"COMBO","widget":{"name":"unet_name_1"},"link":null},{"label":"mode","name":"choice","type":"COMBO","widget":{"name":"choice"},"link":null},{"label":"inpaint_image","name":"inpaint_image","type":"IMAGE","link":253},{"label":"inpaint_mask","name":"inpaint_mask","type":"MASK","link":254}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[556]}],"properties":{"proxyWidgets":[["24","text"],["27","value"],["28","value"],["18","noise_seed"],["23","unet_name"],["14","clip_name"],["9","vae_name"],["154","unet_name"],["156","choice"]],"enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[]},{"id":179,"type":"SaveImage","pos":[7025.816514763039,484.88857756254396],"size":[277.2951034932039,525.7680007700244],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":556},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null}],"outputs":[],"properties":{"Node name for S&R":"SaveImage","cnr_id":"comfy-core"},"widgets_values":["Ideogram4_Inpaint"]},{"id":327,"type":"PrimitiveInt","pos":[5919.063881344126,1143.3286774978537],"size":[270,82],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"INT","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"INT","name":"INT","type":"INT","links":[523]}],"properties":{"Node name for S&R":"PrimitiveInt"},"widgets_values":[0,"fixed"]},{"id":177,"type":"LoadImage","pos":[5923.459283666403,175.6559758818683],"size":[330.6379176318087,626.8917604451399],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[253]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":[254]}],"properties":{"Node name for S&R":"LoadImage","cnr_id":"comfy-core","image":"clipspace/clipspace-painted-masked-1782274301625.png [input]"},"widgets_values":["Masked_Load_Me_in_Loader (18).png","image"]}],"links":[[161,37,0,98,1,"INT"],[162,37,1,98,2,"INT"],[253,177,0,98,9,"IMAGE"],[254,177,1,98,10,"MASK"],[523,327,0,98,3,"INT"],[556,98,0,179,0,"IMAGE"]],"groups":[],"definitions":{"subgraphs":[{"id":"83e6e004-48ea-408e-9024-eb49c3d7dc14","version":1,"state":{"lastGroupId":12,"lastNodeId":341,"lastLinkId":556,"lastRerouteId":0},"revision":0,"config":{},"name":"Text to Image (Ideogram v4)","inputNode":{"id":-10,"bounding":[3490,920,154.921875,268]},"outputNode":{"id":-20,"bounding":[6850,936,128,68]},"inputs":[{"id":"4bc742d1-7b4b-452c-90d9-0d76ebcdae76","name":"text","type":"STRING","linkIds":[152],"label":"prompt","pos":[3620.921875,944]},{"id":"8d4038eb-73c7-45e9-bba1-f068f55e8d32","name":"value","type":"INT","linkIds":[153],"label":"width","pos":[3620.921875,964]},{"id":"281550e6-6acf-4cbe-aec1-9eb803b4dec1","name":"value_1","type":"INT","linkIds":[154],"label":"height","pos":[3620.921875,984]},{"id":"fae56884-2f1a-470b-a25f-40e7a87ef69d","name":"noise_seed","type":"INT","linkIds":[155],"pos":[3620.921875,1004]},{"id":"3497309c-a7d7-4e28-9330-142c15881632","name":"unet_name","type":"COMBO","linkIds":[156],"pos":[3620.921875,1024]},{"id":"e87126db-7147-465e-b129-370ed2c6cc22","name":"clip_name","type":"COMBO","linkIds":[157],"pos":[3620.921875,1044]},{"id":"a1e6c080-b11b-4d5c-a3a8-fcf4df654cf7","name":"vae_name","type":"COMBO","linkIds":[158],"pos":[3620.921875,1064]},{"id":"b0d16516-95de-44d9-bea8-3cd2e7c78e9a","name":"unet_name_1","type":"COMBO","linkIds":[216],"label":"unconditional_unet","pos":[3620.921875,1084]},{"id":"249fd825-e6b3-489d-a341-6d8050500f5e","name":"choice","type":"COMBO","linkIds":[219],"label":"mode","pos":[3620.921875,1104]},{"id":"2f66593a-80c3-4fc0-a512-247cee7120f9","name":"inpaint_image","type":"IMAGE","linkIds":[500,541,542],"label":"inpaint_image","pos":[3620.921875,1124]},{"id":"3ee26dba-045a-40e3-9e31-352701449a82","name":"inpaint_mask","type":"MASK","linkIds":[543],"label":"inpaint_mask","pos":[3620.921875,1144]}],"outputs":[{"id":"b81e4f60-e543-4f02-875b-b0f1bdc274f2","name":"IMAGE","type":"IMAGE","linkIds":[552],"localized_name":"IMAGE","pos":[6874,960]}],"widgets":[],"nodes":[{"id":10,"type":"ConditioningZeroOut","pos":[5450,960],"size":[250,80],"flags":{"collapsed":false},"order":3,"mode":0,"inputs":[{"localized_name":"conditioning","name":"conditioning","type":"CONDITIONING","link":8}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[214]}],"properties":{"Node name for S&R":"ConditioningZeroOut","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.9.1"},"widgets_values":[]},{"id":16,"type":"KSamplerSelect","pos":[5790,1100],"size":[270,110],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"sampler_name","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null}],"outputs":[{"localized_name":"SAMPLER","name":"SAMPLER","type":"SAMPLER","links":[13]}],"properties":{"Node name for S&R":"KSamplerSelect","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2"},"widgets_values":["euler"]},{"id":14,"type":"CLIPLoader","pos":[4730,990],"size":[470,170],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"clip_name","name":"clip_name","type":"COMBO","widget":{"name":"clip_name"},"link":157},{"localized_name":"type","name":"type","type":"COMBO","widget":{"name":"type"},"link":null},{"localized_name":"device","name":"device","shape":7,"type":"COMBO","widget":{"name":"device"},"link":null}],"outputs":[{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[24]}],"properties":{"Node name for S&R":"CLIPLoader","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"qwen3vl_8b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Qwen3-VL/resolve/main/text_encoders/qwen3vl_8b_fp8_scaled.safetensors","directory":"text_encoders"}]},"widgets_values":["qwen3vl_8b_fp8_scaled.safetensors","ideogram4","default"]},{"id":28,"type":"PrimitiveInt","pos":[4250,1800],"size":[270,110],"flags":{},"order":12,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"INT","widget":{"name":"value"},"link":154}],"outputs":[{"localized_name":"INT","name":"INT","type":"INT","links":[35]}],"title":"Int (Height)","properties":{"Node name for S&R":"PrimitiveInt","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[1024,"fixed"]},{"id":31,"type":"ComfyMathExpression","pos":[5340,1400],"size":[230,80],"flags":{"collapsed":true},"order":13,"mode":0,"inputs":[{"label":"a","localized_name":"values.a","name":"values.a","type":"FLOAT,INT,BOOLEAN","link":32},{"label":"b","localized_name":"values.b","name":"values.b","shape":7,"type":"FLOAT,INT,BOOLEAN","link":null},{"localized_name":"expression","name":"expression","type":"STRING","widget":{"name":"expression"},"link":null}],"outputs":[{"localized_name":"FLOAT","name":"FLOAT","type":"FLOAT","links":null},{"localized_name":"INT","name":"INT","type":"INT","links":[33,34]},{"localized_name":"BOOL","name":"BOOL","type":"BOOLEAN","links":null}],"properties":{"Node name for S&R":"ComfyMathExpression","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["max(((a + 15) // 16) * 16, 256)"]},{"id":32,"type":"ComfyMathExpression","pos":[5350,1470],"size":[230,80],"flags":{"collapsed":true},"order":14,"mode":0,"inputs":[{"label":"a","localized_name":"values.a","name":"values.a","type":"FLOAT,INT,BOOLEAN","link":35},{"label":"b","localized_name":"values.b","name":"values.b","shape":7,"type":"FLOAT,INT,BOOLEAN","link":null},{"localized_name":"expression","name":"expression","type":"STRING","widget":{"name":"expression"},"link":null}],"outputs":[{"localized_name":"FLOAT","name":"FLOAT","type":"FLOAT","links":null},{"localized_name":"INT","name":"INT","type":"INT","links":[36,37]},{"localized_name":"BOOL","name":"BOOL","type":"BOOLEAN","links":null}],"properties":{"Node name for S&R":"ComfyMathExpression","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["max(((a + 15) // 16) * 16, 256)"]},{"id":144,"type":"ComfyNumberConvert","pos":[5920,1870],"size":[230,100],"flags":{},"order":15,"mode":0,"inputs":[{"label":"value","localized_name":"value","name":"value","type":"INT,FLOAT,STRING,BOOLEAN","link":195}],"outputs":[{"localized_name":"FLOAT","name":"FLOAT","type":"FLOAT","links":[208]},{"localized_name":"INT","name":"INT","type":"INT","links":null}],"properties":{"Node name for S&R":"ComfyNumberConvert","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[]},{"id":145,"type":"JsonExtractString","pos":[5450,1870],"size":[400,200],"flags":{},"order":16,"mode":0,"inputs":[{"localized_name":"json_string","name":"json_string","type":"STRING","widget":{"name":"json_string"},"link":196},{"localized_name":"key","name":"key","type":"STRING","widget":{"name":"key"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[195]}],"properties":{"Node name for S&R":"JsonExtractString","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["","mu"]},{"id":146,"type":"ComfyNumberConvert","pos":[5930,2110],"size":[230,100],"flags":{},"order":17,"mode":0,"inputs":[{"label":"value","localized_name":"value","name":"value","type":"INT,FLOAT,STRING,BOOLEAN","link":197}],"outputs":[{"localized_name":"FLOAT","name":"FLOAT","type":"FLOAT","links":[209]},{"localized_name":"INT","name":"INT","type":"INT","links":null}],"properties":{"Node name for S&R":"ComfyNumberConvert","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[]},{"id":148,"type":"StringReplace","pos":[5050,2150],"size":[230,40],"flags":{"collapsed":true},"order":19,"mode":0,"inputs":[{"localized_name":"string","name":"string","type":"STRING","widget":{"name":"string"},"link":199},{"localized_name":"find","name":"find","type":"STRING","widget":{"name":"find"},"link":null},{"localized_name":"replace","name":"replace","type":"STRING","widget":{"name":"replace"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[196,200,201]}],"properties":{"Node name for S&R":"StringReplace","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["","'","\""]},{"id":150,"type":"JsonExtractString","pos":[5450,2110],"size":[400,200],"flags":{},"order":21,"mode":0,"inputs":[{"localized_name":"json_string","name":"json_string","type":"STRING","widget":{"name":"json_string"},"link":201},{"localized_name":"key","name":"key","type":"STRING","widget":{"name":"key"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[197]}],"properties":{"Node name for S&R":"JsonExtractString","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["","std"]},{"id":154,"type":"UNETLoader","pos":[4730,740],"size":[470,170],"flags":{},"order":23,"mode":0,"showAdvanced":true,"inputs":[{"localized_name":"unet_name","name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":216},{"localized_name":"weight_dtype","name":"weight_dtype","type":"COMBO","widget":{"name":"weight_dtype"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[]}],"properties":{"Node name for S&R":"UNETLoader","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"ideogram4_unconditional_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_unconditional_fp8_scaled.safetensors","directory":"diffusion_models"}]},"widgets_values":["ideogram4_unconditional_fp8_scaled.safetensors","default"]},{"id":24,"type":"CLIPTextEncode","pos":[5270,500],"size":[430,420],"flags":{},"order":10,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":24},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":152}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[8,213]}],"title":"CLIP Text Encode (Positive Prompt)","properties":{"Node name for S&R":"CLIPTextEncode","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2"},"widgets_values":["{\n \"high_level_description\": \"A surreal streetwear mixed-media collage poster featuring a relaxed female skateboarder mid-air against a vibrant blue sky, backed by giant puffy 3D letters spelling 'COMFY'. The composition blends retro magazine cutout aesthetics with grunge elements like torn paper banners and distressed red stamps, conveying an effortless, cozy vibe with a feminine touch.\",\n \"style_description\": {\n \"aesthetics\": \"Retro magazine cutout style, mixed-media digital collage, high-contrast streetwear graphic, featuring rough ripped paper edges and distressed grunge textures.\",\n \"lighting\": \"High-contrast flash mixed with harsh midday sunlight on the skater cutout, contrasting with flat, bright graphic lighting on the 3D typography.\",\n \"photo\": \"Vintage grainy 35mm film with distressed halftone scan textures and subtle light leaks.\",\n \"medium\": \"Mixed-media digital collage\",\n \"color_palette\": [\"#1E73BE\", \"#FDFDFD\", \"#C82A2A\", \"#657C9C\", \"#EFEFEF\"]\n },\n \"compositional_deconstruction\": {\n \"background\": \"A vibrant, clear blue sky layered with a vintage grainy film texture and subtle halftone dot patterns, transitioning down to an implied pale gray concrete ramp at the very bottom edge.\",\n \"elements\": [\n {\n \"type\": \"obj\",\n \"bbox\": [128, 149, 354, 810],\n \"desc\": \"Massive 3D puffy, inflatable white typography spelling 'COMFY'. The letters stretch across the upper half of the canvas, acting as a surreal, soft cloud-like backdrop.\",\n \"color_palette\": [\"#FDFDFD\", \"#E0E0E0\", \"#D3DBE2\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [459, 37, 727, 264],\n \"desc\": \"A cluster of oversized, distressed red stamped circles and dots, applied loosely to the midground like a grunge ink stamp, partially obscuring the bottom left of the text.\",\n \"color_palette\": [\"#C82A2A\", \"#A11D1D\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [23, 366, 153, 666],\n \"desc\": \"A vertically oriented, torn paper side banner pinned to the left edge. The rough-edged paper displays the bold, stamped text 'STAY COZY' in high-contrast black ink.\",\n \"color_palette\": [\"#EFEFEF\", \"#1A1A1A\", \"#C82A2A\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [287, 210, 756, 819],\n \"desc\": \"A sharp photographic cutout of a female skateboarder mid-air in a relaxed, confident pose. She wears slightly cropped, loose-fitting washed denim jeans and a plain white oversized tee, appearing to effortlessly float above the concrete ramp. Her posture and style add a distinct feminine energy to the scene. A distinct white cutout border surrounds her silhouette.\",\n \"color_palette\": [\"#FDFDFD\", \"#657C9C\", \"#2B2B2B\", \"#DCA57D\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [773, 39, 973, 187],\n \"desc\": \"A surreal, miniature floating skateboard cutout, positioned playfully in the upper right sky as if defying gravity.\",\n \"color_palette\": [\"#D2A679\", \"#2B2B2B\", \"#C82A2A\"]\n },\n {\n \"type\": \"obj\",\n \"bbox\": [105, 830, 905, 980],\n \"desc\": \"A wide, horizontal strip of heavily textured torn paper spanning the lower third of the composition. It features the bold typographic phrase 'BEYOND THE COMFORT ZONE' intermixed with 'EFFORTLESS RIDE' alongside ripped edges that reveal the background.\",\n \"color_palette\": [\"#EFEFEF\", \"#1A1A1A\", \"#999999\"]\n }\n ]\n }\n}"]},{"id":151,"type":"ComfyNumberConvert","pos":[5907.68546273005,1613.2829881809694],"size":[230,100],"flags":{},"order":22,"mode":0,"inputs":[{"label":"value","localized_name":"value","name":"value","type":"INT,FLOAT,STRING,BOOLEAN","link":202}],"outputs":[{"localized_name":"FLOAT","name":"FLOAT","type":"FLOAT","links":[]},{"localized_name":"INT","name":"INT","type":"INT","links":[207]}],"properties":{"Node name for S&R":"ComfyNumberConvert","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[]},{"id":17,"type":"Ideogram4Scheduler","pos":[5790,1262.238996138813],"size":[270,240],"flags":{},"order":7,"mode":0,"inputs":[{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":207},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":34},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":37},{"localized_name":"mu","name":"mu","type":"FLOAT","widget":{"name":"mu"},"link":208},{"localized_name":"std","name":"std","type":"FLOAT","widget":{"name":"std"},"link":209}],"outputs":[{"localized_name":"SIGMAS","name":"SIGMAS","type":"SIGMAS","links":[14]}],"properties":{"Node name for S&R":"Ideogram4Scheduler","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[20,1024,1024,0.5,1.75]},{"id":149,"type":"JsonExtractString","pos":[5459.44033170424,1619.5157558224166],"size":[400,200],"flags":{},"order":20,"mode":0,"inputs":[{"localized_name":"json_string","name":"json_string","type":"STRING","widget":{"name":"json_string"},"link":200},{"localized_name":"key","name":"key","type":"STRING","widget":{"name":"key"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[202]}],"properties":{"Node name for S&R":"JsonExtractString","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["","num_steps"]},{"id":27,"type":"PrimitiveInt","pos":[4195.590159230157,1611.8504293730616],"size":[270,110],"flags":{},"order":11,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"INT","widget":{"name":"value"},"link":153}],"outputs":[{"localized_name":"INT","name":"INT","type":"INT","links":[32]}],"title":"Int (Width)","properties":{"Node name for S&R":"PrimitiveInt","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[1024,"fixed"]},{"id":18,"type":"RandomNoise","pos":[5780,490],"size":[270,110],"flags":{},"order":8,"mode":0,"inputs":[{"localized_name":"noise_seed","name":"noise_seed","type":"INT","widget":{"name":"noise_seed"},"link":155}],"outputs":[{"localized_name":"NOISE","name":"NOISE","type":"NOISE","links":[11]}],"properties":{"Node name for S&R":"RandomNoise","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2"},"widgets_values":[190590399309683,"randomize"]},{"id":12,"type":"LanPaint_SamplerCustomAdvanced","pos":[6146.729556051947,501.8957758197],"size":[291.4830078125,378],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"noise","name":"noise","type":"NOISE","link":11},{"localized_name":"guider","name":"guider","type":"GUIDER","link":215},{"localized_name":"sampler","name":"sampler","type":"SAMPLER","link":13},{"localized_name":"sigmas","name":"sigmas","type":"SIGMAS","link":14},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":547},{"localized_name":"LanPaint_NumSteps","name":"LanPaint_NumSteps","type":"INT","widget":{"name":"LanPaint_NumSteps"},"link":null},{"localized_name":"LanPaint_Lambda","name":"LanPaint_Lambda","type":"FLOAT","widget":{"name":"LanPaint_Lambda"},"link":null},{"localized_name":"LanPaint_StepSize","name":"LanPaint_StepSize","type":"FLOAT","widget":{"name":"LanPaint_StepSize"},"link":null},{"localized_name":"LanPaint_Beta","name":"LanPaint_Beta","type":"FLOAT","widget":{"name":"LanPaint_Beta"},"link":null},{"localized_name":"LanPaint_Friction","name":"LanPaint_Friction","type":"FLOAT","widget":{"name":"LanPaint_Friction"},"link":null},{"localized_name":"LanPaint_PromptMode","name":"LanPaint_PromptMode","type":"COMBO","widget":{"name":"LanPaint_PromptMode"},"link":null},{"localized_name":"LanPaint_EarlyStop","name":"LanPaint_EarlyStop","type":"INT","widget":{"name":"LanPaint_EarlyStop"},"link":null},{"localized_name":"LanPaint_Info","name":"LanPaint_Info","type":"STRING","widget":{"name":"LanPaint_Info"},"link":null},{"localized_name":"LanPaint_InnerThreshold","name":"LanPaint_InnerThreshold","type":"FLOAT","widget":{"name":"LanPaint_InnerThreshold"},"link":null},{"localized_name":"LanPaint_InnerPatience","name":"LanPaint_InnerPatience","type":"INT","widget":{"name":"LanPaint_InnerPatience"},"link":null}],"outputs":[{"localized_name":"output","name":"output","type":"LATENT","links":[16]},{"localized_name":"denoised_output","name":"denoised_output","type":"LATENT","links":[]}],"properties":{"Node name for S&R":"SamplerCustomAdvanced","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"LanPaint","ver":"0.8.2"},"widgets_values":[5,16,0.2,1,15,"Image First",1,"LanPaint Custom Sampler Adv.",0,1,"lanpaint_star_button"]},{"id":155,"type":"DualModelGuider","pos":[5793.090040212954,855.0042466861462],"size":[270,180],"flags":{},"order":24,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":524},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":213},{"localized_name":"model_negative","name":"model_negative","shape":7,"type":"MODEL","link":522},{"localized_name":"negative","name":"negative","shape":7,"type":"CONDITIONING","link":214},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null}],"outputs":[{"localized_name":"GUIDER","name":"GUIDER","type":"GUIDER","links":[215]}],"properties":{"Node name for S&R":"DualModelGuider","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[4]},{"id":156,"type":"CustomCombo","pos":[4720,1630],"size":[270,280],"flags":{},"order":25,"mode":0,"inputs":[{"localized_name":"choice","name":"choice","type":"COMBO","widget":{"name":"choice"},"link":219}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[218]},{"localized_name":"INDEX","name":"INDEX","type":"INT","links":null}],"properties":{"Node name for S&R":"CustomCombo","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["Turbo",2,"Quality","Default","Turbo",""]},{"id":23,"type":"UNETLoader","pos":[4720,520],"size":[470,170],"flags":{},"order":9,"mode":0,"showAdvanced":true,"inputs":[{"localized_name":"unet_name","name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":156},{"localized_name":"weight_dtype","name":"weight_dtype","type":"COMBO","widget":{"name":"weight_dtype"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[222,522]}],"properties":{"Node name for S&R":"UNETLoader","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"ideogram4_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Ideogram-4/resolve/main/diffusion_models/ideogram4_fp8_scaled.safetensors","directory":"diffusion_models"}]},"widgets_values":["ideogram4_fp8_scaled.safetensors","default"]},{"id":157,"type":"CFGOverride","pos":[5779.178385908843,614.2969660399881],"size":[260,170],"flags":{},"order":26,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":222},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null},{"localized_name":"start_percent","name":"start_percent","type":"FLOAT","widget":{"name":"start_percent"},"link":null},{"localized_name":"end_percent","name":"end_percent","type":"FLOAT","widget":{"name":"end_percent"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[524]}],"properties":{"Node name for S&R":"CFGOverride","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":[3,0.7,1]},{"id":147,"type":"JsonExtractString","pos":[5023.849189156092,1593.9778676825492],"size":[410,470],"flags":{},"order":18,"mode":0,"inputs":[{"localized_name":"json_string","name":"json_string","type":"STRING","widget":{"name":"json_string"},"link":null},{"localized_name":"key","name":"key","type":"STRING","widget":{"name":"key"},"link":218}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[199]}],"properties":{"Node name for S&R":"JsonExtractString","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.23.0"},"widgets_values":["{\n \"Quality\": {\n \"num_steps\": 48,\n \"mu\": 0.0,\n \"std\": 1.5,\n \"preset_id\": \"V4_QUALITY_48\"\n },\n \"Default\": {\n \"num_steps\": 20,\n \"mu\": 0.0,\n \"std\": 1.75,\n \"preset_id\": \"V4_DEFAULT_20\"\n },\n \"Turbo\": {\n \"num_steps\": 12,\n \"mu\": 0.5,\n \"std\": 1.75,\n \"preset_id\": \"V4_TURBO_12\"\n }\n}","Turbo"]},{"id":329,"type":"VAEEncode","pos":[3588.7077704106764,2288.236421017825],"size":[140,46],"flags":{"collapsed":true},"order":28,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":541},{"localized_name":"vae","name":"vae","type":"VAE","link":550}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[528]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":330,"type":"VAEDecode","pos":[3571.0478434361166,2352.355540494683],"size":[210,46],"flags":{},"order":29,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":528},{"localized_name":"vae","name":"vae","type":"VAE","link":549}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[529]}],"properties":{"Node name for S&R":"VAEDecode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":331,"type":"GetImageSize","pos":[3578.922582597011,2478.74882545972],"size":[140,124],"flags":{},"order":30,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":529}],"outputs":[{"localized_name":"width","name":"width","type":"INT","links":[532,535]},{"localized_name":"height","name":"height","type":"INT","links":[533,536]},{"localized_name":"batch_size","name":"batch_size","type":"INT","links":[]}],"properties":{"Node name for S&R":"GetImageSize","cnr_id":"comfy-core","ver":"0.7.0","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":332,"type":"VAEEncode","pos":[4236.7368499844415,2213.716677314217],"size":[140,46],"flags":{"collapsed":true},"order":31,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":530},{"localized_name":"vae","name":"vae","type":"VAE","link":551}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[538]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core","ver":"0.3.71","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":334,"type":"MaskToImage","pos":[3978.782319988073,2652.413163649674],"size":[193.2779296875,26],"flags":{},"order":33,"mode":0,"inputs":[{"localized_name":"mask","name":"mask","type":"MASK","link":544}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[534]}],"properties":{"Node name for S&R":"MaskToImage","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":335,"type":"ImageScale","pos":[3934.190405268655,2747.9975372810895],"size":[270,130],"flags":{},"order":34,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":534},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":535},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":536},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[537]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core","ver":"0.3.52","ue_properties":{"widget_ue_connectable":{"width":true,"height":true},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["nearest-exact",512,512,"center"]},{"id":338,"type":"Reroute","pos":[3660.6572162039297,1890.259199318281],"size":[75,26],"flags":{},"order":37,"mode":0,"inputs":[{"name":"","type":"*","link":543}],"outputs":[{"name":"","type":"*","links":[544]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":337,"type":"SetLatentNoiseMask","pos":[4446.193952167144,2294.6120633970795],"size":[188.1373046875,46],"flags":{},"order":36,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":538},{"localized_name":"mask","name":"mask","type":"MASK","link":539}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[545]}],"properties":{"Node name for S&R":"SetLatentNoiseMask","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":[]},{"id":339,"type":"Reroute","pos":[5450.4554318213195,1337.959260651075],"size":[75,26],"flags":{},"order":38,"mode":0,"inputs":[{"name":"","type":"*","link":545}],"outputs":[{"name":"","type":"LATENT","links":[547]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":300,"type":"VAEEncode","pos":[4465.897980184977,1376.657201883157],"size":[270,110],"flags":{},"order":27,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":500},{"localized_name":"vae","name":"vae","type":"VAE","link":404}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core"},"widgets_values":[]},{"id":9,"type":"VAELoader","pos":[4730,1220],"size":[470,110],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"vae_name","name":"vae_name","type":"COMBO","widget":{"name":"vae_name"},"link":158}],"outputs":[{"localized_name":"VAE","name":"VAE","type":"VAE","links":[17,548]}],"properties":{"Node name for S&R":"VAELoader","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2","models":[{"name":"flux2-vae.safetensors","url":"https://huggingface.co/Comfy-Org/flux2-dev/resolve/main/split_files/vae/flux2-vae.safetensors","directory":"vae"}]},"widgets_values":["flux2-vae.safetensors"]},{"id":340,"type":"Reroute","pos":[3599.921000755868,2103.55819154856],"size":[75,26],"flags":{},"order":39,"mode":0,"inputs":[{"name":"","type":"*","link":548}],"outputs":[{"name":"","type":"VAE","links":[549,550,551]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":341,"type":"LanPaint_MaskBlend","pos":[6468.359103873248,720.9822614528671],"size":[270,110],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"image1","name":"image1","type":"IMAGE","link":555},{"localized_name":"image2","name":"image2","type":"IMAGE","link":553},{"localized_name":"mask","name":"mask","type":"MASK","link":554},{"localized_name":"blend_overlap","name":"blend_overlap","type":"INT","widget":{"name":"blend_overlap"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[552]}],"properties":{"Node name for S&R":"LanPaint_MaskBlend","cnr_id":"comfy-core"},"widgets_values":[9]},{"id":13,"type":"VAEDecode","pos":[6560,500],"size":[230,100],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":16},{"localized_name":"vae","name":"vae","type":"VAE","link":17}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[553]}],"properties":{"Node name for S&R":"VAEDecode","enableTabs":false,"tabWidth":65,"tabXOffset":10,"hasSecondTab":false,"secondTabText":"Send Back","secondTabOffset":80,"secondTabWidth":65,"cnr_id":"comfy-core","ver":"0.8.2"},"widgets_values":[]},{"id":336,"type":"ImageToMask","pos":[3936.785307601569,2942.788688269935],"size":[270,58],"flags":{},"order":35,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":537},{"localized_name":"channel","name":"channel","type":"COMBO","widget":{"name":"channel"},"link":null}],"outputs":[{"localized_name":"MASK","name":"MASK","type":"MASK","links":[539,554]}],"properties":{"Node name for S&R":"ImageToMask","cnr_id":"comfy-core","ver":"0.3.51","ue_properties":{"widget_ue_connectable":{},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["red"]},{"id":333,"type":"ImageScale","pos":[3951.666815695082,2251.6083740166714],"size":[269.921875,152.8125],"flags":{},"order":32,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":542},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":532},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":533},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[530,555]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core","ver":"0.3.52","ue_properties":{"widget_ue_connectable":{"width":true,"height":true},"version":"7.1","input_ue_unconnectable":{}}},"widgets_values":["area",512,512,"center"]}],"groups":[{"id":1,"title":"Models","bounding":[4700,420,530,1100],"color":"#3f789e","flags":{}},{"id":2,"title":"Latent Size","bounding":[5260,1080,450,440],"color":"#3f789e","flags":{}},{"id":3,"title":"Sampling","bounding":[5740,420,780,1100],"color":"#3f789e","flags":{}},{"id":4,"title":"Prompt","bounding":[5260,420,450,640],"color":"#3f789e","flags":{}},{"id":5,"title":"Image Size","bounding":[4130,1540,530,420],"color":"#3f789e","flags":{}},{"id":9,"title":"Preset","bounding":[4700,1540,1820,780],"color":"#3f789e","flags":{}}],"links":[{"id":8,"origin_id":24,"origin_slot":0,"target_id":10,"target_slot":0,"type":"CONDITIONING"},{"id":11,"origin_id":18,"origin_slot":0,"target_id":12,"target_slot":0,"type":"NOISE"},{"id":13,"origin_id":16,"origin_slot":0,"target_id":12,"target_slot":2,"type":"SAMPLER"},{"id":14,"origin_id":17,"origin_slot":0,"target_id":12,"target_slot":3,"type":"SIGMAS"},{"id":16,"origin_id":12,"origin_slot":0,"target_id":13,"target_slot":0,"type":"LATENT"},{"id":17,"origin_id":9,"origin_slot":0,"target_id":13,"target_slot":1,"type":"VAE"},{"id":34,"origin_id":31,"origin_slot":1,"target_id":17,"target_slot":1,"type":"INT"},{"id":37,"origin_id":32,"origin_slot":1,"target_id":17,"target_slot":2,"type":"INT"},{"id":24,"origin_id":14,"origin_slot":0,"target_id":24,"target_slot":0,"type":"CLIP"},{"id":32,"origin_id":27,"origin_slot":0,"target_id":31,"target_slot":0,"type":"INT"},{"id":35,"origin_id":28,"origin_slot":0,"target_id":32,"target_slot":0,"type":"INT"},{"id":152,"origin_id":-10,"origin_slot":0,"target_id":24,"target_slot":1,"type":"STRING"},{"id":153,"origin_id":-10,"origin_slot":1,"target_id":27,"target_slot":0,"type":"INT"},{"id":154,"origin_id":-10,"origin_slot":2,"target_id":28,"target_slot":0,"type":"INT"},{"id":155,"origin_id":-10,"origin_slot":3,"target_id":18,"target_slot":0,"type":"INT"},{"id":156,"origin_id":-10,"origin_slot":4,"target_id":23,"target_slot":0,"type":"COMBO"},{"id":157,"origin_id":-10,"origin_slot":5,"target_id":14,"target_slot":0,"type":"COMBO"},{"id":158,"origin_id":-10,"origin_slot":6,"target_id":9,"target_slot":0,"type":"COMBO"},{"id":195,"origin_id":145,"origin_slot":0,"target_id":144,"target_slot":0,"type":"STRING"},{"id":196,"origin_id":148,"origin_slot":0,"target_id":145,"target_slot":0,"type":"STRING"},{"id":197,"origin_id":150,"origin_slot":0,"target_id":146,"target_slot":0,"type":"STRING"},{"id":199,"origin_id":147,"origin_slot":0,"target_id":148,"target_slot":0,"type":"STRING"},{"id":200,"origin_id":148,"origin_slot":0,"target_id":149,"target_slot":0,"type":"STRING"},{"id":201,"origin_id":148,"origin_slot":0,"target_id":150,"target_slot":0,"type":"STRING"},{"id":202,"origin_id":149,"origin_slot":0,"target_id":151,"target_slot":0,"type":"STRING"},{"id":207,"origin_id":151,"origin_slot":1,"target_id":17,"target_slot":0,"type":"INT"},{"id":208,"origin_id":144,"origin_slot":0,"target_id":17,"target_slot":3,"type":"FLOAT"},{"id":209,"origin_id":146,"origin_slot":0,"target_id":17,"target_slot":4,"type":"FLOAT"},{"id":213,"origin_id":24,"origin_slot":0,"target_id":155,"target_slot":1,"type":"CONDITIONING"},{"id":214,"origin_id":10,"origin_slot":0,"target_id":155,"target_slot":3,"type":"CONDITIONING"},{"id":215,"origin_id":155,"origin_slot":0,"target_id":12,"target_slot":1,"type":"GUIDER"},{"id":216,"origin_id":-10,"origin_slot":7,"target_id":154,"target_slot":0,"type":"COMBO"},{"id":218,"origin_id":156,"origin_slot":0,"target_id":147,"target_slot":1,"type":"STRING"},{"id":219,"origin_id":-10,"origin_slot":8,"target_id":156,"target_slot":0,"type":"COMBO"},{"id":222,"origin_id":23,"origin_slot":0,"target_id":157,"target_slot":0,"type":"MODEL"},{"id":500,"origin_id":-10,"origin_slot":9,"target_id":300,"target_slot":0,"type":"IMAGE"},{"id":404,"origin_id":9,"origin_slot":0,"target_id":300,"target_slot":1,"type":"VAE"},{"id":522,"origin_id":23,"origin_slot":0,"target_id":155,"target_slot":2,"type":"MODEL"},{"id":524,"origin_id":157,"origin_slot":0,"target_id":155,"target_slot":0,"type":"MODEL"},{"id":528,"origin_id":329,"origin_slot":0,"target_id":330,"target_slot":0,"type":"LATENT"},{"id":529,"origin_id":330,"origin_slot":0,"target_id":331,"target_slot":0,"type":"IMAGE"},{"id":530,"origin_id":333,"origin_slot":0,"target_id":332,"target_slot":0,"type":"IMAGE"},{"id":532,"origin_id":331,"origin_slot":0,"target_id":333,"target_slot":2,"type":"INT"},{"id":533,"origin_id":331,"origin_slot":1,"target_id":333,"target_slot":3,"type":"INT"},{"id":534,"origin_id":334,"origin_slot":0,"target_id":335,"target_slot":0,"type":"IMAGE"},{"id":535,"origin_id":331,"origin_slot":0,"target_id":335,"target_slot":2,"type":"INT"},{"id":536,"origin_id":331,"origin_slot":1,"target_id":335,"target_slot":3,"type":"INT"},{"id":537,"origin_id":335,"origin_slot":0,"target_id":336,"target_slot":0,"type":"IMAGE"},{"id":538,"origin_id":332,"origin_slot":0,"target_id":337,"target_slot":0,"type":"LATENT"},{"id":539,"origin_id":336,"origin_slot":0,"target_id":337,"target_slot":1,"type":"MASK"},{"id":541,"origin_id":-10,"origin_slot":9,"target_id":329,"target_slot":0,"type":"IMAGE"},{"id":542,"origin_id":-10,"origin_slot":9,"target_id":333,"target_slot":0,"type":"IMAGE"},{"id":543,"origin_id":-10,"origin_slot":10,"target_id":338,"target_slot":0,"type":"*"},{"id":544,"origin_id":338,"origin_slot":0,"target_id":334,"target_slot":0,"type":"MASK"},{"id":545,"origin_id":337,"origin_slot":0,"target_id":339,"target_slot":0,"type":"LATENT"},{"id":547,"origin_id":339,"origin_slot":0,"target_id":12,"target_slot":4,"type":"LATENT"},{"id":548,"origin_id":9,"origin_slot":0,"target_id":340,"target_slot":0,"type":"VAE"},{"id":549,"origin_id":340,"origin_slot":0,"target_id":330,"target_slot":1,"type":"VAE"},{"id":550,"origin_id":340,"origin_slot":0,"target_id":329,"target_slot":1,"type":"VAE"},{"id":551,"origin_id":340,"origin_slot":0,"target_id":332,"target_slot":1,"type":"VAE"},{"id":552,"origin_id":341,"origin_slot":0,"target_id":-20,"target_slot":0,"type":"IMAGE"},{"id":553,"origin_id":13,"origin_slot":0,"target_id":341,"target_slot":1,"type":"IMAGE"},{"id":554,"origin_id":336,"origin_slot":0,"target_id":341,"target_slot":2,"type":"MASK"},{"id":555,"origin_id":333,"origin_slot":0,"target_id":341,"target_slot":0,"type":"IMAGE"}],"extra":{}}]},"config":{},"extra":{"frontendVersion":"1.44.19","VHS_latentpreview":false,"VHS_latentpreviewrate":0,"VHS_MetadataImage":true,"VHS_KeepIntermediate":true,"ds":{"scale":1.2438230891303907,"offset":[-7392.794884601207,-307.9644808523266]}},"version":0.4} \ No newline at end of file diff --git a/example_workflows/Krea2_EncodeDecode_Inpaint.jpg b/example_workflows/Krea2_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..2e02201 Binary files /dev/null and b/example_workflows/Krea2_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/Krea2_EncodeDecode_Inpaint.json b/example_workflows/Krea2_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..dd60efb --- /dev/null +++ b/example_workflows/Krea2_EncodeDecode_Inpaint.json @@ -0,0 +1,2339 @@ +{ + "id": "08988737-a544-4ab1-99fb-22d67b7c36e3", + "revision": 0, + "last_node_id": 412, + "last_link_id": 637, + "nodes": [ + { + "id": 200, + "type": "LoadImage", + "pos": [ + -519.8821611382093, + 0 + ], + "size": [ + 270, + 314 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "choose file to upload", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 300 + ] + }, + { + "localized_name": "MASK", + "name": "MASK", + "type": "MASK", + "links": [ + 300 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "image": "clipspace/clipspace-painted-masked-1782550310396.png [input]" + }, + "widgets_values": [ + "Example_28_Masked.png", + "image" + ] + }, + { + "id": 29, + "type": "SaveImage", + "pos": [ + 839.1346474889581, + -7.177197073684759 + ], + "size": [ + 880, + 1020 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 44 + }, + { + "localized_name": "filename_prefix", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.25.0", + "Node name for S&R": "SaveImage" + }, + "widgets_values": [ + "Krea2_LanPaint_Inpaint" + ] + }, + { + "id": 30, + "type": "b0e5ca93-2731-42b9-8e0a-d28ea851ff81", + "pos": [ + 109.94310356783686, + -25.917759755456316 + ], + "size": [ + 560, + 1010 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "name": "value", + "type": "STRING", + "widget": { + "name": "value" + }, + "link": null + }, + { + "label": "prompt_enhance", + "name": "value_1", + "type": "BOOLEAN", + "widget": { + "name": "value_1" + }, + "link": null + }, + { + "label": "LLM_max_token", + "name": "max_length", + "type": "INT", + "widget": { + "name": "max_length" + }, + "link": null + }, + { + "name": "seed", + "type": "INT", + "widget": { + "name": "seed" + }, + "link": null + }, + { + "label": "enable_lora?", + "name": "value_2", + "type": "BOOLEAN", + "widget": { + "name": "value_2" + }, + "link": null + }, + { + "name": "lora_name", + "type": "COMBO", + "widget": { + "name": "lora_name" + }, + "link": null + }, + { + "label": "lora_strength", + "name": "strength_model", + "type": "FLOAT", + "widget": { + "name": "strength_model" + }, + "link": null + }, + { + "label": "lora_trigger_word", + "name": "string_b", + "type": "STRING", + "widget": { + "name": "string_b" + }, + "link": null + }, + { + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": null + }, + { + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": null + }, + { + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": null + }, + { + "label": "inpaint_image", + "name": "inpaint_image", + "type": "IMAGE", + "link": 300 + }, + { + "label": "inpaint_mask", + "name": "inpaint_mask", + "type": "MASK", + "link": 301 + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 44 + ] + } + ], + "properties": { + "proxyWidgets": [ + [ + "19", + "value" + ], + [ + "24", + "value" + ], + [ + "16", + "max_length" + ], + [ + "3", + "seed" + ], + [ + "23", + "value" + ], + [ + "15", + "lora_name" + ], + [ + "15", + "strength_model" + ], + [ + "27", + "string_b" + ], + [ + "10", + "unet_name" + ], + [ + "11", + "clip_name" + ], + [ + "12", + "vae_name" + ] + ], + "cnr_id": "comfy-core", + "ver": "0.25.0", + "previewExposures": [ + { + "name": "$$canvas-image-preview", + "sourceNodeId": "3", + "sourcePreviewName": "$$canvas-image-preview" + } + ] + }, + "widgets_values": [] + } + ], + "links": [ + [ + 44, + 30, + 0, + 29, + 0, + "IMAGE" + ], + [ + 300, + 200, + 0, + 30, + 11, + "IMAGE" + ], + [ + 301, + 200, + 1, + 30, + 12, + "MASK" + ] + ], + "groups": [], + "definitions": { + "subgraphs": [ + { + "id": "b0e5ca93-2731-42b9-8e0a-d28ea851ff81", + "version": 1, + "state": { + "lastGroupId": 10, + "lastNodeId": 412, + "lastLinkId": 637, + "lastRerouteId": 0 + }, + "revision": 1, + "config": {}, + "name": "Text to Image (Krea-2 Turbo)", + "inputNode": { + "id": -10, + "bounding": [ + -1720, + 410, + 146.466796875, + 308 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 1560, + 496, + 128, + 68 + ] + }, + "inputs": [ + { + "id": "b0f5c754-5322-440c-8c1c-ba732e910d33", + "name": "value", + "type": "STRING", + "linkIds": [ + 45 + ], + "pos": [ + -1597.533203125, + 434 + ] + }, + { + "id": "47b0e74d-ef80-4423-a7a6-9bd1673092bb", + "name": "value_1", + "type": "BOOLEAN", + "linkIds": [ + 46 + ], + "label": "prompt_enhance", + "pos": [ + -1597.533203125, + 454 + ] + }, + { + "id": "5fc735ae-a50b-4363-bff9-850030ad5dd5", + "name": "max_length", + "type": "INT", + "linkIds": [ + 49 + ], + "label": "LLM_max_token", + "pos": [ + -1597.533203125, + 474 + ] + }, + { + "id": "75652c4f-cde2-4ad7-b322-73d47b533ef8", + "name": "seed", + "type": "INT", + "linkIds": [ + 56 + ], + "pos": [ + -1597.533203125, + 494 + ] + }, + { + "id": "b0ca5f55-a223-40de-9e37-aaf2cf0904dd", + "name": "value_2", + "type": "BOOLEAN", + "linkIds": [ + 57 + ], + "label": "enable_lora?", + "pos": [ + -1597.533203125, + 514 + ] + }, + { + "id": "eb2e846b-2e6c-49a2-bc56-9c772c8a1862", + "name": "lora_name", + "type": "COMBO", + "linkIds": [ + 58 + ], + "pos": [ + -1597.533203125, + 534 + ] + }, + { + "id": "d2693bbb-bb95-4fb1-9a3d-27a1bb0b664b", + "name": "strength_model", + "type": "FLOAT", + "linkIds": [ + 59 + ], + "label": "lora_strength", + "pos": [ + -1597.533203125, + 554 + ] + }, + { + "id": "e2031135-b490-4909-b1ec-6b00aecf819e", + "name": "string_b", + "type": "STRING", + "linkIds": [ + 60 + ], + "label": "lora_trigger_word", + "pos": [ + -1597.533203125, + 574 + ] + }, + { + "id": "14e2eb6a-5fa1-40c9-81d1-a928360fcd80", + "name": "unet_name", + "type": "COMBO", + "linkIds": [ + 61 + ], + "pos": [ + -1597.533203125, + 594 + ] + }, + { + "id": "e27ba0c5-697f-44f4-b475-c2dcfa594724", + "name": "clip_name", + "type": "COMBO", + "linkIds": [ + 62 + ], + "pos": [ + -1597.533203125, + 614 + ] + }, + { + "id": "75c25d8e-b881-46e4-aca7-d2ada9e147d0", + "name": "vae_name", + "type": "COMBO", + "linkIds": [ + 63 + ], + "pos": [ + -1597.533203125, + 634 + ] + }, + { + "id": "82c3b713-d4fb-4723-8171-44e3cf9f661f", + "name": "inpaint_image", + "type": "IMAGE", + "linkIds": [ + 629, + 635 + ], + "label": "inpaint_image", + "pos": [ + -1597.533203125, + 654 + ] + }, + { + "id": "bdf878cf-e03c-4407-98ad-e956e0e855ac", + "name": "inpaint_mask", + "type": "MASK", + "linkIds": [ + 630, + 636 + ], + "label": "inpaint_mask", + "pos": [ + -1597.533203125, + 674 + ] + } + ], + "outputs": [ + { + "id": "e4073813-752d-4584-96b5-6e42eac355dd", + "name": "IMAGE", + "type": "IMAGE", + "linkIds": [ + 637 + ], + "localized_name": "IMAGE", + "pos": [ + 1584, + 520 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 100, + -250 + ], + "size": [ + 480, + 420 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 10 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": 40 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 4, + 13 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "A high-contrast, hyper-stylized fashion editorial portrait shot against a saturated mustard-yellow seamless backdrop, with the central figure rendered in crisp desaturated black-and-white, creating a striking duotone aesthetic reminiscent of David LaChapelle meets Helmut Newton with a punk-gothic edge.\n\nThe subject is a fierce young woman with a platinum-bleached, spiked liberty mohawk crown of hair, her expression cold and commanding as she stares directly into the lens. She wears a cropped black leather biker jacket exploding with oversized metallic conical studs and spikes across the shoulders, paired with a minimal black bikini bottom, sheer black thigh-high stockings, and chunky knee-high lace-up combat platform boots. Her toned, athletic physique is fully exposed at the midriff.\n\nShe sits regally upon an ornate throne carved in the shape of a snarling, fanged beast's head \u2014 part dragon, part demonic feline \u2014 its silver-grey surface intricately detailed with bones, scales, and gothic ornamentation. Her booted foot rests on a battered metal road case wrapped in heavy chains and covered in stickers and band decals.\n\nIn her right hand she grips a massive medieval war scythe, its long wooden shaft wrapped in leather, the enormous curved blade arcing dramatically over her head. Perched on her left fist, talons gripping her knuckles, is a majestic American bald eagle with pristine white head feathers and a sharp yellow beak, staring off to the side with predatory alertness.\n\nStudio lighting is hard and theatrical, casting crisp shadows. The composition is symmetrical, iconic, and poster-like \u2014 punk rock goddess of war meets American mythology. Hyperrealistic, high-fashion photography, 8k, sharp detail, magazine cover quality." + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 10, + "type": "UNETLoader", + "pos": [ + -410, + -240 + ], + "size": [ + 450, + 140 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": 61 + }, + { + "localized_name": "weight_dtype", + "name": "weight_dtype", + "type": "COMBO", + "widget": { + "name": "weight_dtype" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 16, + 28 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "cnr_id": "comfy-core", + "ver": "0.25.0", + "models": [ + { + "name": "krea2_turbo_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "krea2_turbo_fp8_scaled.safetensors", + "default" + ] + }, + { + "id": 11, + "type": "CLIPLoader", + "pos": [ + -410, + 150 + ], + "size": [ + 450, + 170 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "localized_name": "clip_name", + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": 62 + }, + { + "localized_name": "type", + "name": "type", + "type": "COMBO", + "widget": { + "name": "type" + }, + "link": null + }, + { + "localized_name": "device", + "name": "device", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "device" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 10, + 18 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "cnr_id": "comfy-core", + "ver": "0.25.0", + "models": [ + { + "name": "qwen3vl_4b_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors", + "directory": "text_encoders" + } + ] + }, + "widgets_values": [ + "qwen3vl_4b_fp8_scaled.safetensors", + "krea2", + "default" + ] + }, + { + "id": 13, + "type": "ConditioningZeroOut", + "pos": [ + 350, + 220 + ], + "size": [ + 230, + 30 + ], + "flags": { + "collapsed": true + }, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 13 + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 14 + ] + } + ], + "properties": { + "Node name for S&R": "ConditioningZeroOut", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [] + }, + { + "id": 15, + "type": "LoraLoaderModelOnly", + "pos": [ + -410, + -50 + ], + "size": [ + 450, + 170 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 16 + }, + { + "localized_name": "lora_name", + "name": "lora_name", + "type": "COMBO", + "widget": { + "name": "lora_name" + }, + "link": 58 + }, + { + "localized_name": "strength_model", + "name": "strength_model", + "type": "FLOAT", + "widget": { + "name": "strength_model" + }, + "link": 59 + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 29 + ] + } + ], + "properties": { + "Node name for S&R": "LoraLoaderModelOnly", + "cnr_id": "comfy-core", + "ver": "0.25.0", + "models": [ + { + "name": "krea2_darkbrush.safetensors", + "url": "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/loras/krea2_darkbrush.safetensors", + "directory": "loras" + } + ] + }, + "widgets_values": [ + "krea2_darkbrush.safetensors", + 0.8 + ] + }, + { + "id": 16, + "type": "TextGenerate", + "pos": [ + 60, + 650 + ], + "size": [ + 400, + 412 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 18 + }, + { + "localized_name": "image", + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "localized_name": "video", + "name": "video", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "localized_name": "audio", + "name": "audio", + "shape": 7, + "type": "AUDIO", + "link": null + }, + { + "localized_name": "prompt", + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 19 + }, + { + "localized_name": "max_length", + "name": "max_length", + "type": "INT", + "widget": { + "name": "max_length" + }, + "link": 49 + }, + { + "localized_name": "sampling_mode", + "name": "sampling_mode", + "type": "COMFY_DYNAMICCOMBO_V3", + "widget": { + "name": "sampling_mode" + }, + "link": null + }, + { + "localized_name": "temperature", + "name": "sampling_mode.temperature", + "type": "FLOAT", + "widget": { + "name": "sampling_mode.temperature" + }, + "link": null + }, + { + "localized_name": "top_k", + "name": "sampling_mode.top_k", + "type": "INT", + "widget": { + "name": "sampling_mode.top_k" + }, + "link": null + }, + { + "localized_name": "top_p", + "name": "sampling_mode.top_p", + "type": "FLOAT", + "widget": { + "name": "sampling_mode.top_p" + }, + "link": null + }, + { + "localized_name": "min_p", + "name": "sampling_mode.min_p", + "type": "FLOAT", + "widget": { + "name": "sampling_mode.min_p" + }, + "link": null + }, + { + "localized_name": "repetition_penalty", + "name": "sampling_mode.repetition_penalty", + "type": "FLOAT", + "widget": { + "name": "sampling_mode.repetition_penalty" + }, + "link": null + }, + { + "localized_name": "seed", + "name": "sampling_mode.seed", + "type": "INT", + "widget": { + "name": "sampling_mode.seed" + }, + "link": null + }, + { + "localized_name": "presence_penalty", + "name": "sampling_mode.presence_penalty", + "shape": 7, + "type": "FLOAT", + "widget": { + "name": "sampling_mode.presence_penalty" + }, + "link": null + }, + { + "localized_name": "thinking", + "name": "thinking", + "shape": 7, + "type": "BOOLEAN", + "widget": { + "name": "thinking" + }, + "link": null + }, + { + "localized_name": "use_default_template", + "name": "use_default_template", + "shape": 7, + "type": "BOOLEAN", + "widget": { + "name": "use_default_template" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "generated_text", + "name": "generated_text", + "type": "STRING", + "links": [ + 33 + ] + } + ], + "properties": { + "Node name for S&R": "TextGenerate", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "", + 512, + "on", + 0.7, + 64, + 0.95, + 0.05, + 1.05, + 0, + 0, + false, + true + ] + }, + { + "id": 17, + "type": "StringConcatenate", + "pos": [ + -210, + 1310 + ], + "size": [ + 230, + 40 + ], + "flags": { + "collapsed": true + }, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "string_a", + "name": "string_a", + "type": "STRING", + "widget": { + "name": "string_a" + }, + "link": 21 + }, + { + "localized_name": "string_b", + "name": "string_b", + "type": "STRING", + "widget": { + "name": "string_b" + }, + "link": 22 + }, + { + "localized_name": "delimiter", + "name": "delimiter", + "type": "STRING", + "widget": { + "name": "delimiter" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 19 + ] + } + ], + "properties": { + "Node name for S&R": "StringConcatenate", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "", + "", + "" + ] + }, + { + "id": 18, + "type": "PrimitiveStringMultiline", + "pos": [ + -430, + 650 + ], + "size": [ + 460, + 610 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "STRING", + "widget": { + "name": "value" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 21 + ] + } + ], + "title": "Text String (System Prompt)", + "properties": { + "Node name for S&R": "PrimitiveStringMultiline", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "You are an expert prompt engineer for text-to-image models. Your task is to expand the user's prompt into a highly effective image-generation prompt.\n\nThink step by step about the request before writing the answer:\n- What is the subject and mood?\n- What visual styles, mediums, and lighting options would fit? Consider two or three alternatives and pick the one that best serves the caption.\n- What composition, framing, and grounded details will help the text-to-image model?\n\nThen output a single expanded prompt paragraph.\n\nFollow these rules strictly:\n1. **Faithfulness First:** Preserve all original subjects, actions, colors, and spatial relationships. Do not add new objects, props, characters, or animals unless the user clearly implies them.\n2. **Practical T2I Structure:** Write a prompt that a text-to-image model can parse cleanly. Group subjects with their own attributes and actions. Use grounded phrasing for poses, interactions, and spatial layout.\n3. **Style Planning Stays Internal:** Use your internal reasoning to choose style, medium, framing, and lighting. Do not emit planning tags or wrappers in the visible answer body.\n4. **Text Rendering:** If the user requests visible text, quotes, labels, or typography, specify the exact text clearly and wrap requested words in quotes.\n5. **Avoid Over-Specification:** Do not invent highly specific clothing, colors, materials, or scene details unless the input supports them.\n6. **Structure:** Write one cohesive paragraph after the thinking block. No bullets, JSON, or markdown.\n7. **Respect Existing Detail:** If the user's prompt is already detailed, lightly polish and finalize rather than heavily expanding \u2014 preserve their phrasing and direction.\n8. **Respect the Human Form:** Treat depictions of people with dignity. Assume clothing covers genitals and intimate anatomy.\n9. **Preserve User Medium:** When the user explicitly requests a medium (e.g. \"photo of\", \"photograph of\", \"illustration of\", \"painting of\", \"sketch of\", \"3D render of\"), honor it. Do not pivot to a different medium to avoid difficulty \u2014 match the user's stated intent.\n\nUser's Input:\n\n" + ] + }, + { + "id": 19, + "type": "PrimitiveStringMultiline", + "pos": [ + -1070, + -290 + ], + "size": [ + 570, + 800 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "STRING", + "widget": { + "name": "value" + }, + "link": 45 + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 22, + 34 + ] + } + ], + "title": "Text String (User Prompt)", + "properties": { + "Node name for S&R": "PrimitiveStringMultiline", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "A high-resolution, surreal digital illustration showing a women's hand in red glove holding a martini glass. The image is overlaid with whimsical, expressive ink-style doodles, including a cartoon figure inside the glass, a drawn citrus wedge on the rim, and various abstract sketches and faces surrounding the glass against a clean, white background. The style seamlessly blends a realistic, lit photograph with loose, hand-drawn marker artistry, creating a playful and artistic juxtaposition." + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 20, + "type": "PreviewAny", + "pos": [ + 500, + 660 + ], + "size": [ + 470, + 550 + ], + "flags": { + "collapsed": false + }, + "order": 12, + "mode": 0, + "inputs": [ + { + "localized_name": "source", + "name": "source", + "type": "*", + "link": 27 + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 41, + 37 + ] + } + ], + "properties": { + "Node name for S&R": "PreviewAny", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + null, + null, + null + ] + }, + { + "id": 21, + "type": "ComfySwitchNode", + "pos": [ + 170, + 1270 + ], + "size": [ + 270, + 130 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "STRING", + "link": 34 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "STRING", + "link": 33 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 32 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "STRING", + "links": [ + 27 + ] + } + ], + "properties": { + "Node name for S&R": "ComfySwitchNode", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + false + ] + }, + { + "id": 22, + "type": "ComfySwitchNode", + "pos": [ + 640, + -270 + ], + "size": [ + 320, + 130 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "MODEL", + "link": 28 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "MODEL", + "link": 29 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 31 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "MODEL", + "links": [ + 30 + ] + } + ], + "title": "Switch (Model)", + "properties": { + "Node name for S&R": "ComfySwitchNode", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + false + ] + }, + { + "id": 24, + "type": "PrimitiveBoolean", + "pos": [ + -910, + 840 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "BOOLEAN", + "widget": { + "name": "value" + }, + "link": 46 + } + ], + "outputs": [ + { + "localized_name": "BOOLEAN", + "name": "BOOLEAN", + "type": "BOOLEAN", + "links": [ + 32 + ] + } + ], + "title": "Boolean (Refine Prompt?)", + "properties": { + "Node name for S&R": "PrimitiveBoolean", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + true + ] + }, + { + "id": 27, + "type": "StringConcatenate", + "pos": [ + 1030, + 960 + ], + "size": [ + 350, + 250 + ], + "flags": { + "collapsed": false + }, + "order": 17, + "mode": 0, + "inputs": [ + { + "localized_name": "string_a", + "name": "string_a", + "type": "STRING", + "widget": { + "name": "string_a" + }, + "link": 41 + }, + { + "localized_name": "string_b", + "name": "string_b", + "type": "STRING", + "widget": { + "name": "string_b" + }, + "link": 60 + }, + { + "localized_name": "delimiter", + "name": "delimiter", + "type": "STRING", + "widget": { + "name": "delimiter" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "STRING", + "name": "STRING", + "type": "STRING", + "links": [ + 38 + ] + } + ], + "title": "Concatenate Text (LoRA Trigger Word)", + "properties": { + "Node name for S&R": "StringConcatenate", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + "", + "muted minimalist sketch style", + ", " + ] + }, + { + "id": 28, + "type": "ComfySwitchNode", + "pos": [ + 1050, + 670 + ], + "size": [ + 340, + 130 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "localized_name": "on_false", + "name": "on_false", + "type": "STRING", + "link": 37 + }, + { + "localized_name": "on_true", + "name": "on_true", + "type": "STRING", + "link": 38 + }, + { + "localized_name": "switch", + "name": "switch", + "type": "BOOLEAN", + "widget": { + "name": "switch" + }, + "link": 42 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "STRING", + "links": [ + 40 + ] + } + ], + "properties": { + "Node name for S&R": "ComfySwitchNode", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + false + ] + }, + { + "id": 23, + "type": "PrimitiveBoolean", + "pos": [ + -910, + 670 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "BOOLEAN", + "widget": { + "name": "value" + }, + "link": 57 + } + ], + "outputs": [ + { + "localized_name": "BOOLEAN", + "name": "BOOLEAN", + "type": "BOOLEAN", + "links": [ + 31, + 42 + ] + } + ], + "title": "Boolean (Enable LoRA?)", + "properties": { + "Node name for S&R": "PrimitiveBoolean", + "cnr_id": "comfy-core", + "ver": "0.25.0" + }, + "widgets_values": [ + false + ] + }, + { + "id": 12, + "type": "VAELoader", + "pos": [ + -410, + 390 + ], + "size": [ + 450, + 120 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 63 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 631, + 634 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "cnr_id": "comfy-core", + "ver": "0.25.0", + "models": [ + { + "name": "qwen_image_vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/Krea-2/resolve/main/vae/qwen_image_vae.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "qwen_image_vae.safetensors" + ] + }, + { + "id": 3, + "type": "LanPaint_KSampler", + "pos": [ + 640, + -100 + ], + "size": [ + 320, + 590 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 30 + }, + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "link": 4 + }, + { + "localized_name": "negative", + "name": "negative", + "type": "CONDITIONING", + "link": 14 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 632 + }, + { + "localized_name": "seed", + "name": "seed", + "type": "INT", + "widget": { + "name": "seed" + }, + "link": 56 + }, + { + "localized_name": "steps", + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": null + }, + { + "localized_name": "cfg", + "name": "cfg", + "type": "FLOAT", + "widget": { + "name": "cfg" + }, + "link": null + }, + { + "localized_name": "sampler_name", + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": null + }, + { + "localized_name": "scheduler", + "name": "scheduler", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "link": null + }, + { + "localized_name": "denoise", + "name": "denoise", + "type": "FLOAT", + "widget": { + "name": "denoise" + }, + "link": null + }, + { + "localized_name": "LanPaint_NumSteps", + "name": "LanPaint_NumSteps", + "type": "INT", + "widget": { + "name": "LanPaint_NumSteps" + }, + "link": null + }, + { + "localized_name": "LanPaint_PromptMode", + "name": "LanPaint_PromptMode", + "type": "COMBO", + "widget": { + "name": "LanPaint_PromptMode" + }, + "link": null + }, + { + "localized_name": "LanPaint_Info", + "name": "LanPaint_Info", + "type": "STRING", + "widget": { + "name": "LanPaint_Info" + }, + "link": null + }, + { + "localized_name": "Inpainting_mode", + "name": "Inpainting_mode", + "type": "COMBO", + "widget": { + "name": "Inpainting_mode" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "LATENT", + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 633 + ] + } + ], + "properties": { + "Node name for S&R": "KSampler", + "cnr_id": "LanPaint", + "ver": "0.25.0" + }, + "widgets_values": [ + 0, + 1, + 15, + 1, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler.", + "\ud83d\uddbc\ufe0f Image Inpainting", + "lanpaint_star_button" + ] + }, + { + "id": 411, + "type": "LanPaint_ImageEncode", + "pos": [ + 7110, + 2000 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 50, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 629 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 631 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 630 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 632 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + }, + "widgets_values": [] + }, + { + "id": 412, + "type": "LanPaint_ImageDecode", + "pos": [ + 7420, + 2000 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 51, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 633 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 634 + }, + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 635 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 636 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 637 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + }, + "widgets_values": [ + 9 + ] + } + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + -430, + -320, + 490, + 850 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "Prompt Enhancement", + "bounding": [ + -440, + 580, + 1940, + 840 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 5, + "title": "Group", + "bounding": [ + -1080, + -360, + 610, + 910 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 6, + "title": "Image Generation", + "bounding": [ + -440, + -360, + 1940, + 910 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 7, + "title": "Prompt", + "bounding": [ + 90, + -320, + 500, + 570 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 8, + "title": "Size", + "bounding": [ + 90, + 270, + 500, + 260 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 9, + "title": "Feature Switch", + "bounding": [ + -1080, + 580, + 610, + 400 + ], + "color": "#3f789e", + "flags": {} + } + ], + "links": [ + { + "id": 10, + "origin_id": 11, + "origin_slot": 0, + "target_id": 6, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 40, + "origin_id": 28, + "origin_slot": 0, + "target_id": 6, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 30, + "origin_id": 22, + "origin_slot": 0, + "target_id": 3, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 4, + "origin_id": 6, + "origin_slot": 0, + "target_id": 3, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 14, + "origin_id": 13, + "origin_slot": 0, + "target_id": 3, + "target_slot": 2, + "type": "CONDITIONING" + }, + { + "id": 13, + "origin_id": 6, + "origin_slot": 0, + "target_id": 13, + "target_slot": 0, + "type": "CONDITIONING" + }, + { + "id": 16, + "origin_id": 10, + "origin_slot": 0, + "target_id": 15, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 18, + "origin_id": 11, + "origin_slot": 0, + "target_id": 16, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 19, + "origin_id": 17, + "origin_slot": 0, + "target_id": 16, + "target_slot": 4, + "type": "STRING" + }, + { + "id": 21, + "origin_id": 18, + "origin_slot": 0, + "target_id": 17, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 22, + "origin_id": 19, + "origin_slot": 0, + "target_id": 17, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 27, + "origin_id": 21, + "origin_slot": 0, + "target_id": 20, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 34, + "origin_id": 19, + "origin_slot": 0, + "target_id": 21, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 33, + "origin_id": 16, + "origin_slot": 0, + "target_id": 21, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 32, + "origin_id": 24, + "origin_slot": 0, + "target_id": 21, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 28, + "origin_id": 10, + "origin_slot": 0, + "target_id": 22, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 29, + "origin_id": 15, + "origin_slot": 0, + "target_id": 22, + "target_slot": 1, + "type": "MODEL" + }, + { + "id": 31, + "origin_id": 23, + "origin_slot": 0, + "target_id": 22, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 41, + "origin_id": 20, + "origin_slot": 0, + "target_id": 27, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 37, + "origin_id": 20, + "origin_slot": 0, + "target_id": 28, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 38, + "origin_id": 27, + "origin_slot": 0, + "target_id": 28, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 42, + "origin_id": 23, + "origin_slot": 0, + "target_id": 28, + "target_slot": 2, + "type": "BOOLEAN" + }, + { + "id": 45, + "origin_id": -10, + "origin_slot": 0, + "target_id": 19, + "target_slot": 0, + "type": "STRING" + }, + { + "id": 46, + "origin_id": -10, + "origin_slot": 1, + "target_id": 24, + "target_slot": 0, + "type": "BOOLEAN" + }, + { + "id": 49, + "origin_id": -10, + "origin_slot": 2, + "target_id": 16, + "target_slot": 5, + "type": "INT" + }, + { + "id": 56, + "origin_id": -10, + "origin_slot": 3, + "target_id": 3, + "target_slot": 4, + "type": "INT" + }, + { + "id": 57, + "origin_id": -10, + "origin_slot": 4, + "target_id": 23, + "target_slot": 0, + "type": "BOOLEAN" + }, + { + "id": 58, + "origin_id": -10, + "origin_slot": 5, + "target_id": 15, + "target_slot": 1, + "type": "COMBO" + }, + { + "id": 59, + "origin_id": -10, + "origin_slot": 6, + "target_id": 15, + "target_slot": 2, + "type": "FLOAT" + }, + { + "id": 60, + "origin_id": -10, + "origin_slot": 7, + "target_id": 27, + "target_slot": 1, + "type": "STRING" + }, + { + "id": 61, + "origin_id": -10, + "origin_slot": 8, + "target_id": 10, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 62, + "origin_id": -10, + "origin_slot": 9, + "target_id": 11, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 63, + "origin_id": -10, + "origin_slot": 10, + "target_id": 12, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 629, + "origin_id": -10, + "origin_slot": 11, + "target_id": 411, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 630, + "origin_id": -10, + "origin_slot": 12, + "target_id": 411, + "target_slot": 2, + "type": "MASK" + }, + { + "id": 631, + "origin_id": 12, + "origin_slot": 0, + "target_id": 411, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 632, + "origin_id": 411, + "origin_slot": 0, + "target_id": 3, + "target_slot": 3, + "type": "LATENT" + }, + { + "id": 633, + "origin_id": 3, + "origin_slot": 0, + "target_id": 412, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 634, + "origin_id": 12, + "origin_slot": 0, + "target_id": 412, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 635, + "origin_id": -10, + "origin_slot": 11, + "target_id": 412, + "target_slot": 2, + "type": "IMAGE" + }, + { + "id": 636, + "origin_id": -10, + "origin_slot": 12, + "target_id": 412, + "target_slot": 3, + "type": "MASK" + }, + { + "id": 637, + "origin_id": 412, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "IMAGE" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "frontendVersion": "1.45.19", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ds": { + "scale": 1.537274438720535, + "offset": [ + 27.961010983492418, + 114.39660597537825 + ] + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/example_workflows/Krea2_LanPaint_Inpaint.jpg b/example_workflows/Krea2_LanPaint_Inpaint.jpg deleted file mode 100644 index a3adb7f..0000000 Binary files a/example_workflows/Krea2_LanPaint_Inpaint.jpg and /dev/null differ diff --git a/example_workflows/Krea2_LanPaint_Inpaint.json b/example_workflows/Krea2_LanPaint_Inpaint.json deleted file mode 100644 index e6594e0..0000000 --- a/example_workflows/Krea2_LanPaint_Inpaint.json +++ /dev/null @@ -1 +0,0 @@ -{"id":"08988737-a544-4ab1-99fb-22d67b7c36e3","revision":0,"last_node_id":410,"last_link_id":628,"nodes":[{"id":200,"type":"LoadImage","pos":[-519.8821611382093,0],"size":[270,314],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[300]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":[301]}],"properties":{"Node name for S&R":"LoadImage","cnr_id":"comfy-core","image":"clipspace/clipspace-painted-masked-1782550310396.png [input]"},"widgets_values":["clipspace/clipspace-painted-masked-1782550310396.png [input]","image"]},{"id":29,"type":"SaveImage","pos":[839.1346474889581,-7.177197073684759],"size":[880,1020],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":44},{"localized_name":"filename_prefix","name":"filename_prefix","type":"STRING","widget":{"name":"filename_prefix"},"link":null}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":[]}],"properties":{"cnr_id":"comfy-core","ver":"0.25.0","Node name for S&R":"SaveImage"},"widgets_values":["Krea2_LanPaint_Inpaint"]},{"id":30,"type":"b0e5ca93-2731-42b9-8e0a-d28ea851ff81","pos":[109.94310356783686,-25.917759755456316],"size":[560,1010],"flags":{},"order":1,"mode":0,"inputs":[{"name":"value","type":"STRING","widget":{"name":"value"},"link":null},{"label":"prompt_enhance","name":"value_1","type":"BOOLEAN","widget":{"name":"value_1"},"link":null},{"label":"LLM_max_token","name":"max_length","type":"INT","widget":{"name":"max_length"},"link":null},{"name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"label":"enable_lora?","name":"value_2","type":"BOOLEAN","widget":{"name":"value_2"},"link":null},{"name":"lora_name","type":"COMBO","widget":{"name":"lora_name"},"link":null},{"label":"lora_strength","name":"strength_model","type":"FLOAT","widget":{"name":"strength_model"},"link":null},{"label":"lora_trigger_word","name":"string_b","type":"STRING","widget":{"name":"string_b"},"link":null},{"name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":null},{"name":"clip_name","type":"COMBO","widget":{"name":"clip_name"},"link":null},{"name":"vae_name","type":"COMBO","widget":{"name":"vae_name"},"link":null},{"label":"inpaint_image","name":"inpaint_image","type":"IMAGE","link":300},{"label":"inpaint_mask","name":"inpaint_mask","type":"MASK","link":301}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[44]}],"properties":{"proxyWidgets":[["19","value"],["24","value"],["16","max_length"],["3","seed"],["23","value"],["15","lora_name"],["15","strength_model"],["27","string_b"],["10","unet_name"],["11","clip_name"],["12","vae_name"]],"cnr_id":"comfy-core","ver":"0.25.0","previewExposures":[{"name":"$$canvas-image-preview","sourceNodeId":"3","sourcePreviewName":"$$canvas-image-preview"}]},"widgets_values":[]}],"links":[[44,30,0,29,0,"IMAGE"],[300,200,0,30,11,"IMAGE"],[301,200,1,30,12,"MASK"]],"groups":[],"definitions":{"subgraphs":[{"id":"b0e5ca93-2731-42b9-8e0a-d28ea851ff81","version":1,"state":{"lastGroupId":10,"lastNodeId":410,"lastLinkId":628,"lastRerouteId":0},"revision":0,"config":{},"name":"Text to Image (Krea-2 Turbo)","inputNode":{"id":-10,"bounding":[-1720,410,146.466796875,308]},"outputNode":{"id":-20,"bounding":[1560,496,128,68]},"inputs":[{"id":"b0f5c754-5322-440c-8c1c-ba732e910d33","name":"value","type":"STRING","linkIds":[45],"pos":[-1597.533203125,434]},{"id":"47b0e74d-ef80-4423-a7a6-9bd1673092bb","name":"value_1","type":"BOOLEAN","linkIds":[46],"label":"prompt_enhance","pos":[-1597.533203125,454]},{"id":"5fc735ae-a50b-4363-bff9-850030ad5dd5","name":"max_length","type":"INT","linkIds":[49],"label":"LLM_max_token","pos":[-1597.533203125,474]},{"id":"75652c4f-cde2-4ad7-b322-73d47b533ef8","name":"seed","type":"INT","linkIds":[56],"pos":[-1597.533203125,494]},{"id":"b0ca5f55-a223-40de-9e37-aaf2cf0904dd","name":"value_2","type":"BOOLEAN","linkIds":[57],"label":"enable_lora?","pos":[-1597.533203125,514]},{"id":"eb2e846b-2e6c-49a2-bc56-9c772c8a1862","name":"lora_name","type":"COMBO","linkIds":[58],"pos":[-1597.533203125,534]},{"id":"d2693bbb-bb95-4fb1-9a3d-27a1bb0b664b","name":"strength_model","type":"FLOAT","linkIds":[59],"label":"lora_strength","pos":[-1597.533203125,554]},{"id":"e2031135-b490-4909-b1ec-6b00aecf819e","name":"string_b","type":"STRING","linkIds":[60],"label":"lora_trigger_word","pos":[-1597.533203125,574]},{"id":"14e2eb6a-5fa1-40c9-81d1-a928360fcd80","name":"unet_name","type":"COMBO","linkIds":[61],"pos":[-1597.533203125,594]},{"id":"e27ba0c5-697f-44f4-b475-c2dcfa594724","name":"clip_name","type":"COMBO","linkIds":[62],"pos":[-1597.533203125,614]},{"id":"75c25d8e-b881-46e4-aca7-d2ada9e147d0","name":"vae_name","type":"COMBO","linkIds":[63],"pos":[-1597.533203125,634]},{"id":"82c3b713-d4fb-4723-8171-44e3cf9f661f","name":"inpaint_image","type":"IMAGE","linkIds":[619],"label":"inpaint_image","pos":[-1597.533203125,654]},{"id":"bdf878cf-e03c-4407-98ad-e956e0e855ac","name":"inpaint_mask","type":"MASK","linkIds":[602],"label":"inpaint_mask","pos":[-1597.533203125,674]}],"outputs":[{"id":"e4073813-752d-4584-96b5-6e42eac355dd","name":"IMAGE","type":"IMAGE","linkIds":[618],"localized_name":"IMAGE","pos":[1584,520]}],"widgets":[],"nodes":[{"id":6,"type":"CLIPTextEncode","pos":[100,-250],"size":[480,420],"flags":{},"order":2,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":10},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":40}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","slot_index":0,"links":[4,13]}],"properties":{"Node name for S&R":"CLIPTextEncode","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["A high-contrast, hyper-stylized fashion editorial portrait shot against a saturated mustard-yellow seamless backdrop, with the central figure rendered in crisp desaturated black-and-white, creating a striking duotone aesthetic reminiscent of David LaChapelle meets Helmut Newton with a punk-gothic edge.\n\nThe subject is a fierce young woman with a platinum-bleached, spiked liberty mohawk crown of hair, her expression cold and commanding as she stares directly into the lens. She wears a cropped black leather biker jacket exploding with oversized metallic conical studs and spikes across the shoulders, paired with a minimal black bikini bottom, sheer black thigh-high stockings, and chunky knee-high lace-up combat platform boots. Her toned, athletic physique is fully exposed at the midriff.\n\nShe sits regally upon an ornate throne carved in the shape of a snarling, fanged beast's head โ€” part dragon, part demonic feline โ€” its silver-grey surface intricately detailed with bones, scales, and gothic ornamentation. Her booted foot rests on a battered metal road case wrapped in heavy chains and covered in stickers and band decals.\n\nIn her right hand she grips a massive medieval war scythe, its long wooden shaft wrapped in leather, the enormous curved blade arcing dramatically over her head. Perched on her left fist, talons gripping her knuckles, is a majestic American bald eagle with pristine white head feathers and a sharp yellow beak, staring off to the side with predatory alertness.\n\nStudio lighting is hard and theatrical, casting crisp shadows. The composition is symmetrical, iconic, and poster-like โ€” punk rock goddess of war meets American mythology. Hyperrealistic, high-fashion photography, 8k, sharp detail, magazine cover quality."],"color":"#232","bgcolor":"#353"},{"id":10,"type":"UNETLoader","pos":[-410,-240],"size":[450,140],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"unet_name","name":"unet_name","type":"COMBO","widget":{"name":"unet_name"},"link":61},{"localized_name":"weight_dtype","name":"weight_dtype","type":"COMBO","widget":{"name":"weight_dtype"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[16,28]}],"properties":{"Node name for S&R":"UNETLoader","cnr_id":"comfy-core","ver":"0.25.0","models":[{"name":"krea2_turbo_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/diffusion_models/krea2_turbo_fp8_scaled.safetensors","directory":"diffusion_models"}]},"widgets_values":["krea2_turbo_fp8_scaled.safetensors","default"]},{"id":11,"type":"CLIPLoader","pos":[-410,150],"size":[450,170],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"clip_name","name":"clip_name","type":"COMBO","widget":{"name":"clip_name"},"link":62},{"localized_name":"type","name":"type","type":"COMBO","widget":{"name":"type"},"link":null},{"localized_name":"device","name":"device","shape":7,"type":"COMBO","widget":{"name":"device"},"link":null}],"outputs":[{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[10,18]}],"properties":{"Node name for S&R":"CLIPLoader","cnr_id":"comfy-core","ver":"0.25.0","models":[{"name":"qwen3vl_4b_fp8_scaled.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/text_encoders/qwen3vl_4b_fp8_scaled.safetensors","directory":"text_encoders"}]},"widgets_values":["qwen3vl_4b_fp8_scaled.safetensors","krea2","default"]},{"id":13,"type":"ConditioningZeroOut","pos":[350,220],"size":[230,30],"flags":{"collapsed":true},"order":7,"mode":0,"inputs":[{"localized_name":"conditioning","name":"conditioning","type":"CONDITIONING","link":13}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[14]}],"properties":{"Node name for S&R":"ConditioningZeroOut","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[]},{"id":15,"type":"LoraLoaderModelOnly","pos":[-410,-50],"size":[450,170],"flags":{},"order":8,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":16},{"localized_name":"lora_name","name":"lora_name","type":"COMBO","widget":{"name":"lora_name"},"link":58},{"localized_name":"strength_model","name":"strength_model","type":"FLOAT","widget":{"name":"strength_model"},"link":59}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[29]}],"properties":{"Node name for S&R":"LoraLoaderModelOnly","cnr_id":"comfy-core","ver":"0.25.0","models":[{"name":"krea2_darkbrush.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/loras/krea2_darkbrush.safetensors","directory":"loras"}]},"widgets_values":["krea2_darkbrush.safetensors",0.8]},{"id":16,"type":"TextGenerate","pos":[60,650],"size":[400,412],"flags":{},"order":9,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":18},{"localized_name":"image","name":"image","shape":7,"type":"IMAGE","link":null},{"localized_name":"video","name":"video","shape":7,"type":"IMAGE","link":null},{"localized_name":"audio","name":"audio","shape":7,"type":"AUDIO","link":null},{"localized_name":"prompt","name":"prompt","type":"STRING","widget":{"name":"prompt"},"link":19},{"localized_name":"max_length","name":"max_length","type":"INT","widget":{"name":"max_length"},"link":49},{"localized_name":"sampling_mode","name":"sampling_mode","type":"COMFY_DYNAMICCOMBO_V3","widget":{"name":"sampling_mode"},"link":null},{"localized_name":"temperature","name":"sampling_mode.temperature","type":"FLOAT","widget":{"name":"sampling_mode.temperature"},"link":null},{"localized_name":"top_k","name":"sampling_mode.top_k","type":"INT","widget":{"name":"sampling_mode.top_k"},"link":null},{"localized_name":"top_p","name":"sampling_mode.top_p","type":"FLOAT","widget":{"name":"sampling_mode.top_p"},"link":null},{"localized_name":"min_p","name":"sampling_mode.min_p","type":"FLOAT","widget":{"name":"sampling_mode.min_p"},"link":null},{"localized_name":"repetition_penalty","name":"sampling_mode.repetition_penalty","type":"FLOAT","widget":{"name":"sampling_mode.repetition_penalty"},"link":null},{"localized_name":"seed","name":"sampling_mode.seed","type":"INT","widget":{"name":"sampling_mode.seed"},"link":null},{"localized_name":"presence_penalty","name":"sampling_mode.presence_penalty","shape":7,"type":"FLOAT","widget":{"name":"sampling_mode.presence_penalty"},"link":null},{"localized_name":"thinking","name":"thinking","shape":7,"type":"BOOLEAN","widget":{"name":"thinking"},"link":null},{"localized_name":"use_default_template","name":"use_default_template","shape":7,"type":"BOOLEAN","widget":{"name":"use_default_template"},"link":null}],"outputs":[{"localized_name":"generated_text","name":"generated_text","type":"STRING","links":[33]}],"properties":{"Node name for S&R":"TextGenerate","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["",512,"on",0.7,64,0.95,0.05,1.05,0,0,false,true]},{"id":17,"type":"StringConcatenate","pos":[-210,1310],"size":[230,40],"flags":{"collapsed":true},"order":10,"mode":0,"inputs":[{"localized_name":"string_a","name":"string_a","type":"STRING","widget":{"name":"string_a"},"link":21},{"localized_name":"string_b","name":"string_b","type":"STRING","widget":{"name":"string_b"},"link":22},{"localized_name":"delimiter","name":"delimiter","type":"STRING","widget":{"name":"delimiter"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[19]}],"properties":{"Node name for S&R":"StringConcatenate","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["","",""]},{"id":18,"type":"PrimitiveStringMultiline","pos":[-430,650],"size":[460,610],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"STRING","widget":{"name":"value"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[21]}],"title":"Text String (System Prompt)","properties":{"Node name for S&R":"PrimitiveStringMultiline","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["You are an expert prompt engineer for text-to-image models. Your task is to expand the user's prompt into a highly effective image-generation prompt.\n\nThink step by step about the request before writing the answer:\n- What is the subject and mood?\n- What visual styles, mediums, and lighting options would fit? Consider two or three alternatives and pick the one that best serves the caption.\n- What composition, framing, and grounded details will help the text-to-image model?\n\nThen output a single expanded prompt paragraph.\n\nFollow these rules strictly:\n1. **Faithfulness First:** Preserve all original subjects, actions, colors, and spatial relationships. Do not add new objects, props, characters, or animals unless the user clearly implies them.\n2. **Practical T2I Structure:** Write a prompt that a text-to-image model can parse cleanly. Group subjects with their own attributes and actions. Use grounded phrasing for poses, interactions, and spatial layout.\n3. **Style Planning Stays Internal:** Use your internal reasoning to choose style, medium, framing, and lighting. Do not emit planning tags or wrappers in the visible answer body.\n4. **Text Rendering:** If the user requests visible text, quotes, labels, or typography, specify the exact text clearly and wrap requested words in quotes.\n5. **Avoid Over-Specification:** Do not invent highly specific clothing, colors, materials, or scene details unless the input supports them.\n6. **Structure:** Write one cohesive paragraph after the thinking block. No bullets, JSON, or markdown.\n7. **Respect Existing Detail:** If the user's prompt is already detailed, lightly polish and finalize rather than heavily expanding โ€” preserve their phrasing and direction.\n8. **Respect the Human Form:** Treat depictions of people with dignity. Assume clothing covers genitals and intimate anatomy.\n9. **Preserve User Medium:** When the user explicitly requests a medium (e.g. \"photo of\", \"photograph of\", \"illustration of\", \"painting of\", \"sketch of\", \"3D render of\"), honor it. Do not pivot to a different medium to avoid difficulty โ€” match the user's stated intent.\n\nUser's Input:\n\n"]},{"id":19,"type":"PrimitiveStringMultiline","pos":[-1070,-290],"size":[570,800],"flags":{},"order":11,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"STRING","widget":{"name":"value"},"link":45}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[22,34]}],"title":"Text String (User Prompt)","properties":{"Node name for S&R":"PrimitiveStringMultiline","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["A high-resolution, surreal digital illustration showing a women's hand in red glove holding a martini glass. The image is overlaid with whimsical, expressive ink-style doodles, including a cartoon figure inside the glass, a drawn citrus wedge on the rim, and various abstract sketches and faces surrounding the glass against a clean, white background. The style seamlessly blends a realistic, lit photograph with loose, hand-drawn marker artistry, creating a playful and artistic juxtaposition."],"color":"#322","bgcolor":"#533"},{"id":20,"type":"PreviewAny","pos":[500,660],"size":[470,550],"flags":{"collapsed":false},"order":12,"mode":0,"inputs":[{"localized_name":"source","name":"source","type":"*","link":27}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[41,37]}],"properties":{"Node name for S&R":"PreviewAny","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[null,null,null]},{"id":21,"type":"ComfySwitchNode","pos":[170,1270],"size":[270,130],"flags":{},"order":13,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"STRING","link":34},{"localized_name":"on_true","name":"on_true","type":"STRING","link":33},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":32}],"outputs":[{"localized_name":"output","name":"output","type":"STRING","links":[27]}],"properties":{"Node name for S&R":"ComfySwitchNode","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[false]},{"id":22,"type":"ComfySwitchNode","pos":[640,-270],"size":[320,130],"flags":{},"order":14,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"MODEL","link":28},{"localized_name":"on_true","name":"on_true","type":"MODEL","link":29},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":31}],"outputs":[{"localized_name":"output","name":"output","type":"MODEL","links":[30]}],"title":"Switch (Model)","properties":{"Node name for S&R":"ComfySwitchNode","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[false]},{"id":24,"type":"PrimitiveBoolean","pos":[-910,840],"size":[270,110],"flags":{},"order":16,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"BOOLEAN","widget":{"name":"value"},"link":46}],"outputs":[{"localized_name":"BOOLEAN","name":"BOOLEAN","type":"BOOLEAN","links":[32]}],"title":"Boolean (Refine Prompt?)","properties":{"Node name for S&R":"PrimitiveBoolean","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[true]},{"id":27,"type":"StringConcatenate","pos":[1030,960],"size":[350,250],"flags":{"collapsed":false},"order":17,"mode":0,"inputs":[{"localized_name":"string_a","name":"string_a","type":"STRING","widget":{"name":"string_a"},"link":41},{"localized_name":"string_b","name":"string_b","type":"STRING","widget":{"name":"string_b"},"link":60},{"localized_name":"delimiter","name":"delimiter","type":"STRING","widget":{"name":"delimiter"},"link":null}],"outputs":[{"localized_name":"STRING","name":"STRING","type":"STRING","links":[38]}],"title":"Concatenate Text (LoRA Trigger Word)","properties":{"Node name for S&R":"StringConcatenate","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":["","muted minimalist sketch style",", "]},{"id":28,"type":"ComfySwitchNode","pos":[1050,670],"size":[340,130],"flags":{},"order":18,"mode":0,"inputs":[{"localized_name":"on_false","name":"on_false","type":"STRING","link":37},{"localized_name":"on_true","name":"on_true","type":"STRING","link":38},{"localized_name":"switch","name":"switch","type":"BOOLEAN","widget":{"name":"switch"},"link":42}],"outputs":[{"localized_name":"output","name":"output","type":"STRING","links":[40]}],"properties":{"Node name for S&R":"ComfySwitchNode","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[false]},{"id":401,"type":"MaskToImage","pos":[147.86746615037583,2129.619934932165],"size":[270,110],"flags":{},"order":20,"mode":0,"inputs":[{"localized_name":"mask","name":"mask","type":"MASK","link":602}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[603]}],"properties":{"Node name for S&R":"MaskToImage","cnr_id":"comfy-core"},"widgets_values":[]},{"id":402,"type":"ImageScale","pos":[447.86746615037583,2129.619934932165],"size":[270,130],"flags":{},"order":21,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":603},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":607},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":608},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[609]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core"},"widgets_values":["nearest-exact",1024,1024,"center"]},{"id":404,"type":"GetImageSize","pos":[747.8674661503758,1729.6199349321648],"size":[270,110],"flags":{},"order":23,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":606}],"outputs":[{"localized_name":"width","name":"width","type":"INT","links":[607,614]},{"localized_name":"height","name":"height","type":"INT","links":[608,615]},{"localized_name":"batch_size","name":"batch_size","type":"INT","links":[]}],"properties":{"Node name for S&R":"GetImageSize","cnr_id":"comfy-core"},"widgets_values":[]},{"id":405,"type":"ImageToMask","pos":[747.8674661503758,2129.619934932165],"size":[270,110],"flags":{},"order":24,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":609},{"localized_name":"channel","name":"channel","type":"COMBO","widget":{"name":"channel"},"link":null}],"outputs":[{"localized_name":"MASK","name":"MASK","type":"MASK","links":[611,617]}],"properties":{"Node name for S&R":"ImageToMask","cnr_id":"comfy-core"},"widgets_values":["red"]},{"id":406,"type":"SetLatentNoiseMask","pos":[1047.867466150376,1929.6199349321646],"size":[270,110],"flags":{},"order":25,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":624},{"localized_name":"mask","name":"mask","type":"MASK","link":611}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[612]}],"properties":{"Node name for S&R":"SetLatentNoiseMask","cnr_id":"comfy-core"},"widgets_values":[]},{"id":23,"type":"PrimitiveBoolean","pos":[-910,670],"size":[270,110],"flags":{},"order":15,"mode":0,"inputs":[{"localized_name":"value","name":"value","type":"BOOLEAN","widget":{"name":"value"},"link":57}],"outputs":[{"localized_name":"BOOLEAN","name":"BOOLEAN","type":"BOOLEAN","links":[31,42]}],"title":"Boolean (Enable LoRA?)","properties":{"Node name for S&R":"PrimitiveBoolean","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[false]},{"id":403,"type":"VAEDecode","pos":[424.3817843116961,1656.0995516761895],"size":[270,110],"flags":{},"order":22,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":604},{"localized_name":"vae","name":"vae","type":"VAE","link":605}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[606]}],"properties":{"Node name for S&R":"VAEDecode","cnr_id":"comfy-core"},"widgets_values":[]},{"id":409,"type":"Reroute","pos":[129.50797887091665,1587.2614783224215],"size":[75,26],"flags":{},"order":28,"mode":0,"inputs":[{"name":"","type":"*","link":619}],"outputs":[{"name":"","type":"*","links":[620,621]}],"properties":{"showOutputText":false,"horizontal":false}},{"id":400,"type":"VAEEncode","pos":[110.80097618269227,1739.504339144511],"size":[270,110],"flags":{},"order":19,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":620},{"localized_name":"vae","name":"vae","type":"VAE","link":601}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[604]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core"},"widgets_values":[]},{"id":12,"type":"VAELoader","pos":[-410,390],"size":[450,120],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"vae_name","name":"vae_name","type":"COMBO","widget":{"name":"vae_name"},"link":63}],"outputs":[{"localized_name":"VAE","name":"VAE","type":"VAE","links":[12,601,605,623]}],"properties":{"Node name for S&R":"VAELoader","cnr_id":"comfy-core","ver":"0.25.0","models":[{"name":"qwen_image_vae.safetensors","url":"https://huggingface.co/Comfy-Org/Krea-2/resolve/main/vae/qwen_image_vae.safetensors","directory":"vae"}]},"widgets_values":["qwen_image_vae.safetensors"]},{"id":410,"type":"VAEEncode","pos":[530.8993452205483,1969.3739861542124],"size":[270,110],"flags":{},"order":29,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":622},{"localized_name":"vae","name":"vae","type":"VAE","link":623}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[624]}],"properties":{"Node name for S&R":"VAEEncode","cnr_id":"comfy-core"},"widgets_values":[]},{"id":408,"type":"LanPaint_MaskBlend","pos":[1547.8674661503762,1829.6199349321648],"size":[270,110],"flags":{},"order":27,"mode":0,"inputs":[{"localized_name":"image1","name":"image1","type":"IMAGE","link":627},{"localized_name":"image2","name":"image2","type":"IMAGE","link":628},{"localized_name":"mask","name":"mask","type":"MASK","link":617},{"localized_name":"blend_overlap","name":"blend_overlap","type":"INT","widget":{"name":"blend_overlap"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[618]}],"properties":{"Node name for S&R":"LanPaint_MaskBlend","cnr_id":"comfy-core"},"widgets_values":[9]},{"id":407,"type":"ImageScale","pos":[1219.9699971821344,1605.9835355850012],"size":[270,130],"flags":{},"order":26,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"IMAGE","link":621},{"localized_name":"upscale_method","name":"upscale_method","type":"COMBO","widget":{"name":"upscale_method"},"link":null},{"localized_name":"width","name":"width","type":"INT","widget":{"name":"width"},"link":614},{"localized_name":"height","name":"height","type":"INT","widget":{"name":"height"},"link":615},{"localized_name":"crop","name":"crop","type":"COMBO","widget":{"name":"crop"},"link":null}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[622,627]}],"properties":{"Node name for S&R":"ImageScale","cnr_id":"comfy-core"},"widgets_values":["area",1024,1024,"center"]},{"id":8,"type":"VAEDecode","pos":[928.921056637931,-206.54694272657488],"size":[230,100],"flags":{"collapsed":false},"order":3,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":7},{"localized_name":"vae","name":"vae","type":"VAE","link":12}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","slot_index":0,"links":[628]}],"properties":{"Node name for S&R":"VAEDecode","cnr_id":"comfy-core","ver":"0.25.0"},"widgets_values":[]},{"id":3,"type":"LanPaint_KSampler","pos":[640,-100],"size":[320,590],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":30},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":4},{"localized_name":"negative","name":"negative","type":"CONDITIONING","link":14},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":612},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":56},{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null},{"localized_name":"sampler_name","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null},{"localized_name":"scheduler","name":"scheduler","type":"COMBO","widget":{"name":"scheduler"},"link":null},{"localized_name":"denoise","name":"denoise","type":"FLOAT","widget":{"name":"denoise"},"link":null},{"localized_name":"LanPaint_NumSteps","name":"LanPaint_NumSteps","type":"INT","widget":{"name":"LanPaint_NumSteps"},"link":null},{"localized_name":"LanPaint_PromptMode","name":"LanPaint_PromptMode","type":"COMBO","widget":{"name":"LanPaint_PromptMode"},"link":null},{"localized_name":"LanPaint_Info","name":"LanPaint_Info","type":"STRING","widget":{"name":"LanPaint_Info"},"link":null},{"localized_name":"Inpainting_mode","name":"Inpainting_mode","type":"COMBO","widget":{"name":"Inpainting_mode"},"link":null}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","slot_index":0,"links":[7]}],"properties":{"Node name for S&R":"KSampler","cnr_id":"LanPaint","ver":"0.25.0"},"widgets_values":[0,1,8,1,"euler","simple",1,5,"Image First","LanPaint KSampler.","๐Ÿ–ผ๏ธ Image Inpainting","lanpaint_star_button"]}],"groups":[{"id":1,"title":"Models","bounding":[-430,-320,490,850],"color":"#3f789e","flags":{}},{"id":4,"title":"Prompt Enhancement","bounding":[-440,580,1940,840],"color":"#3f789e","flags":{}},{"id":5,"title":"Group","bounding":[-1080,-360,610,910],"color":"#3f789e","flags":{}},{"id":6,"title":"Image Generation","bounding":[-440,-360,1940,910],"color":"#3f789e","flags":{}},{"id":7,"title":"Prompt","bounding":[90,-320,500,570],"color":"#3f789e","flags":{}},{"id":8,"title":"Size","bounding":[90,270,500,260],"color":"#3f789e","flags":{}},{"id":9,"title":"Feature Switch","bounding":[-1080,580,610,400],"color":"#3f789e","flags":{}}],"links":[{"id":10,"origin_id":11,"origin_slot":0,"target_id":6,"target_slot":0,"type":"CLIP"},{"id":40,"origin_id":28,"origin_slot":0,"target_id":6,"target_slot":1,"type":"STRING"},{"id":30,"origin_id":22,"origin_slot":0,"target_id":3,"target_slot":0,"type":"MODEL"},{"id":4,"origin_id":6,"origin_slot":0,"target_id":3,"target_slot":1,"type":"CONDITIONING"},{"id":14,"origin_id":13,"origin_slot":0,"target_id":3,"target_slot":2,"type":"CONDITIONING"},{"id":7,"origin_id":3,"origin_slot":0,"target_id":8,"target_slot":0,"type":"LATENT"},{"id":12,"origin_id":12,"origin_slot":0,"target_id":8,"target_slot":1,"type":"VAE"},{"id":13,"origin_id":6,"origin_slot":0,"target_id":13,"target_slot":0,"type":"CONDITIONING"},{"id":16,"origin_id":10,"origin_slot":0,"target_id":15,"target_slot":0,"type":"MODEL"},{"id":18,"origin_id":11,"origin_slot":0,"target_id":16,"target_slot":0,"type":"CLIP"},{"id":19,"origin_id":17,"origin_slot":0,"target_id":16,"target_slot":4,"type":"STRING"},{"id":21,"origin_id":18,"origin_slot":0,"target_id":17,"target_slot":0,"type":"STRING"},{"id":22,"origin_id":19,"origin_slot":0,"target_id":17,"target_slot":1,"type":"STRING"},{"id":27,"origin_id":21,"origin_slot":0,"target_id":20,"target_slot":0,"type":"STRING"},{"id":34,"origin_id":19,"origin_slot":0,"target_id":21,"target_slot":0,"type":"STRING"},{"id":33,"origin_id":16,"origin_slot":0,"target_id":21,"target_slot":1,"type":"STRING"},{"id":32,"origin_id":24,"origin_slot":0,"target_id":21,"target_slot":2,"type":"BOOLEAN"},{"id":28,"origin_id":10,"origin_slot":0,"target_id":22,"target_slot":0,"type":"MODEL"},{"id":29,"origin_id":15,"origin_slot":0,"target_id":22,"target_slot":1,"type":"MODEL"},{"id":31,"origin_id":23,"origin_slot":0,"target_id":22,"target_slot":2,"type":"BOOLEAN"},{"id":41,"origin_id":20,"origin_slot":0,"target_id":27,"target_slot":0,"type":"STRING"},{"id":37,"origin_id":20,"origin_slot":0,"target_id":28,"target_slot":0,"type":"STRING"},{"id":38,"origin_id":27,"origin_slot":0,"target_id":28,"target_slot":1,"type":"STRING"},{"id":42,"origin_id":23,"origin_slot":0,"target_id":28,"target_slot":2,"type":"BOOLEAN"},{"id":45,"origin_id":-10,"origin_slot":0,"target_id":19,"target_slot":0,"type":"STRING"},{"id":46,"origin_id":-10,"origin_slot":1,"target_id":24,"target_slot":0,"type":"BOOLEAN"},{"id":49,"origin_id":-10,"origin_slot":2,"target_id":16,"target_slot":5,"type":"INT"},{"id":56,"origin_id":-10,"origin_slot":3,"target_id":3,"target_slot":4,"type":"INT"},{"id":57,"origin_id":-10,"origin_slot":4,"target_id":23,"target_slot":0,"type":"BOOLEAN"},{"id":58,"origin_id":-10,"origin_slot":5,"target_id":15,"target_slot":1,"type":"COMBO"},{"id":59,"origin_id":-10,"origin_slot":6,"target_id":15,"target_slot":2,"type":"FLOAT"},{"id":60,"origin_id":-10,"origin_slot":7,"target_id":27,"target_slot":1,"type":"STRING"},{"id":61,"origin_id":-10,"origin_slot":8,"target_id":10,"target_slot":0,"type":"COMBO"},{"id":62,"origin_id":-10,"origin_slot":9,"target_id":11,"target_slot":0,"type":"COMBO"},{"id":63,"origin_id":-10,"origin_slot":10,"target_id":12,"target_slot":0,"type":"COMBO"},{"id":601,"origin_id":12,"origin_slot":0,"target_id":400,"target_slot":1,"type":"VAE"},{"id":602,"origin_id":-10,"origin_slot":12,"target_id":401,"target_slot":0,"type":"MASK"},{"id":603,"origin_id":401,"origin_slot":0,"target_id":402,"target_slot":0,"type":"IMAGE"},{"id":604,"origin_id":400,"origin_slot":0,"target_id":403,"target_slot":0,"type":"LATENT"},{"id":605,"origin_id":12,"origin_slot":0,"target_id":403,"target_slot":1,"type":"VAE"},{"id":606,"origin_id":403,"origin_slot":0,"target_id":404,"target_slot":0,"type":"IMAGE"},{"id":607,"origin_id":404,"origin_slot":0,"target_id":402,"target_slot":2,"type":"INT"},{"id":608,"origin_id":404,"origin_slot":1,"target_id":402,"target_slot":3,"type":"INT"},{"id":609,"origin_id":402,"origin_slot":0,"target_id":405,"target_slot":0,"type":"IMAGE"},{"id":611,"origin_id":405,"origin_slot":0,"target_id":406,"target_slot":1,"type":"MASK"},{"id":612,"origin_id":406,"origin_slot":0,"target_id":3,"target_slot":3,"type":"LATENT"},{"id":614,"origin_id":404,"origin_slot":0,"target_id":407,"target_slot":2,"type":"INT"},{"id":615,"origin_id":404,"origin_slot":1,"target_id":407,"target_slot":3,"type":"INT"},{"id":617,"origin_id":405,"origin_slot":0,"target_id":408,"target_slot":2,"type":"MASK"},{"id":618,"origin_id":408,"origin_slot":0,"target_id":-20,"target_slot":0,"type":"IMAGE"},{"id":619,"origin_id":-10,"origin_slot":11,"target_id":409,"target_slot":0,"type":"*"},{"id":620,"origin_id":409,"origin_slot":0,"target_id":400,"target_slot":0,"type":"IMAGE"},{"id":621,"origin_id":409,"origin_slot":0,"target_id":407,"target_slot":0,"type":"IMAGE"},{"id":622,"origin_id":407,"origin_slot":0,"target_id":410,"target_slot":0,"type":"IMAGE"},{"id":623,"origin_id":12,"origin_slot":0,"target_id":410,"target_slot":1,"type":"VAE"},{"id":624,"origin_id":410,"origin_slot":0,"target_id":406,"target_slot":0,"type":"LATENT"},{"id":627,"origin_id":407,"origin_slot":0,"target_id":408,"target_slot":0,"type":"IMAGE"},{"id":628,"origin_id":8,"origin_slot":0,"target_id":408,"target_slot":1,"type":"IMAGE"}],"extra":{}}]},"config":{},"extra":{"frontendVersion":"1.45.19","VHS_latentpreview":false,"VHS_latentpreviewrate":0,"VHS_MetadataImage":true,"VHS_KeepIntermediate":true,"ds":{"scale":1.537274438720535,"offset":[27.961010983492418,114.39660597537825]}},"version":0.4} \ No newline at end of file diff --git a/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.jpg b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.jpg new file mode 100644 index 0000000..4c9359c Binary files /dev/null and b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.jpg differ diff --git a/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.json b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.json new file mode 100644 index 0000000..e6524cc --- /dev/null +++ b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.json @@ -0,0 +1,2147 @@ +{ + "id": "fe515782-2414-462e-9656-2f5b3a0506af", + "revision": 0, + "last_node_id": 168, + "last_link_id": 323, + "nodes": [ + { + "id": 115, + "type": "ResolutionSelector", + "pos": [ + -1550, + 5220 + ], + "size": [ + 270, + 170 + ], + "flags": {}, + "order": 0, + "mode": 0, + "showAdvanced": true, + "inputs": [ + { + "localized_name": "aspect_ratio", + "name": "aspect_ratio", + "type": "COMBO", + "widget": { + "name": "aspect_ratio" + }, + "link": null + }, + { + "localized_name": "megapixels", + "name": "megapixels", + "type": "FLOAT", + "widget": { + "name": "megapixels" + }, + "link": null + }, + { + "localized_name": "multiple", + "name": "multiple", + "type": "INT", + "widget": { + "name": "multiple" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "width", + "name": "width", + "type": "INT", + "links": [ + 219 + ] + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "links": [ + 219 + ] + } + ], + "properties": { + "Node name for S&R": "ResolutionSelector" + }, + "widgets_values": [ + "16:9 (Widescreen)", + 0.4, + 32 + ] + }, + { + "id": 118, + "type": "MarkdownNote", + "pos": [ + -1570, + 5460 + ], + "size": [ + 300, + 520 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Size Settings Reference", + "properties": {}, + "widgets_values": [ + "| megapixels | Aspect | Output (multiple=32) |\n|---|---|---|\n| 0.2 | 16:9 | 608 x 352 |\n| 0.3 | 16:9 | 736 x 416 |\n| 0.4 | 16:9 | 864 x 480 |\n| 0.5 | 16:9 | 960 x 544 |\n| 0.6 | 16:9 | 1056 x 608 |\n| 0.7 | 16:9 | 1152 x 640 |\n| 0.8 | 16:9 | 1216 x 672 |\n| 0.9 | 16:9 | 1280 x 736 |\n| 0.98 | 16:9 | 1344 x 768 |\n| 1.0 | 16:9 | 1376 x 768 |\n| 1.2 | 16:9 | 1504 x 832 |\n| 1.5 | 16:9 | 1664 x 928 |\n| 1.8 | 16:9 | 1824 x 1024 |\n| 2.0 | 16:9 | 1920 x 1088 |\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 117, + "type": "MarkdownNote", + "pos": [ + -3172.0114592094674, + 4951.5330524399205 + ], + "size": [ + 440, + 740 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Model Links", + "properties": {}, + "widgets_values": [ + "## Model Links\n\n**vae**\n\n- [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors)\n- [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors)\n\n**diffusion_models**\n\n- [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors)\n\n\n## Model Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ”‚ โ”œโ”€โ”€ minimax_h3_video_vae_fp16.safetensors\nโ”‚ โ”‚ โ””โ”€โ”€ minimax_h3_audio_vae_fp32.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ minimax_h3_fl2va_pruned_int8_convrot.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ””โ”€โ”€ qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 116, + "type": "MarkdownNote", + "pos": [ + -2456.9852533158955, + 6244.243891108001 + ], + "size": [ + 450, + 740 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: MiniMax H3", + "properties": {}, + "widgets_values": [ + "## MiniMax H3\n\n[MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's general-purpose, omni-modal generation model. It jointly understands text, image, video, and audio, and generates video with **native stereo audio**: voice, sound effects, and music are modeled jointly in a single forward pass, not layered on afterward. Output is up to 2K resolution, 24fps, and up to about 15 seconds.\n\n## ComfyUI links\n- [ComfyUI#15224](https://github.com/Comfy-Org/ComfyUI/pull/15224)\n- [๐Ÿค— Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)\n\n## About this workflow\n\n**Key inputs**\n\n- **prompt**: describe the shots, camera moves, and the accompanying audio (dialogue, SFX, music) in one block\n- **width / height**: set via Resolution Selector. H3's native canvas is a 768px short edge, capped at 768x1344 pixels, rounded to a multiple of 32\n- **duration (seconds)**: converted to a valid frame `length` by the Math Expression node, snapping up to the model's 17-frame-per-block (17k+5) grid at 24fps\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 92, + "type": "SaveVideo", + "pos": [ + -551.9372154660158, + 4466.6393413977985 + ], + "size": [ + 1070, + 692.4444444444445 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "link": 194 + }, + { + "localized_name": "filename_prefix", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + }, + "link": null + }, + { + "localized_name": "format", + "name": "format", + "type": "COMBO", + "widget": { + "name": "format" + }, + "link": null + }, + { + "localized_name": "codec", + "name": "codec", + "type": "COMFY_DYNAMICCOMBO_V3", + "widget": { + "name": "codec" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "links": null + } + ], + "properties": {}, + "widgets_values": [ + "video/MiniMax_H3", + "auto", + "auto" + ] + }, + { + "id": 164, + "type": "LanPaint_VideoMaskEditor", + "pos": [ + -2233.3521653257376, + 4718.799341142038 + ], + "size": [ + 594.3118061482351, + 510.1732256379084 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "video", + "name": "video", + "type": "COMBO", + "widget": { + "name": "video" + }, + "link": null + }, + { + "localized_name": "keyframes", + "name": "keyframes", + "type": "STRING", + "widget": { + "name": "keyframes" + }, + "link": null + }, + { + "localized_name": "audio_mask", + "name": "audio_mask", + "type": "STRING", + "widget": { + "name": "audio_mask" + }, + "link": null + }, + { + "localized_name": "upload", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "links": [ + 300 + ] + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "links": [ + 300 + ] + }, + { + "localized_name": "audio_mask", + "name": "audio_mask", + "type": "MASK", + "links": [ + 300 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_VideoMaskEditor" + }, + "widgets_values": [ + "MiniMax_H3_00009_.mp4", + "{\"0\":\"lanpaint_kf_1786198992745_0.png\",\"41\":\"lanpaint_kf_1786198992745_41.png\",\"42\":\"lanpaint_kf_1786198992745_42.png\",\"56\":\"lanpaint_kf_1786198992745_56.png\",\"64\":\"lanpaint_kf_1786198992745_64.png\",\"65\":\"lanpaint_kf_1786198992745_65.png\",\"66\":\"lanpaint_kf_1786198992745_66.png\",\"70\":\"lanpaint_kf_1786198992745_70.png\",\"78\":\"lanpaint_kf_1786198992745_78.png\",\"82\":\"lanpaint_kf_1786198992745_82.png\",\"83\":\"lanpaint_kf_1786198992745_83.png\",\"86\":\"lanpaint_kf_1786198992745_86.png\",\"87\":\"lanpaint_kf_1786198992745_87.png\",\"88\":\"lanpaint_kf_1786198992745_88.png\",\"89\":\"lanpaint_kf_1786198992745_89.png\",\"92\":\"lanpaint_kf_1786198992745_92.png\",\"98\":\"lanpaint_kf_1786198992745_98.png\",\"106\":\"lanpaint_kf_1786198992745_106.png\",\"112\":\"lanpaint_kf_1786198992745_112.png\",\"115\":\"lanpaint_kf_1786198992745_115.png\",\"116\":\"lanpaint_kf_1786198992745_116.png\",\"117\":\"lanpaint_kf_1786198992745_117.png\",\"121\":\"lanpaint_kf_1786198992745_121.png\",\"122\":\"lanpaint_kf_1786198992745_122.png\",\"123\":\"lanpaint_kf_1786198992745_123.png\"}", + "[{\"start\":3.7479933970546644,\"end\":5.161482918309433}]", + null, + null + ] + }, + { + "id": 105, + "type": "4c314f31-ecda-4b08-ae98-faaba1bf613f", + "pos": [ + -1180.0123438616117, + 4841.429926449377 + ], + "size": [ + 480, + 630 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "first_frame", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "name": "last_frame", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": null + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 219 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 220 + }, + { + "label": "duration", + "name": "value_1", + "type": "FLOAT", + "widget": { + "name": "value_1" + }, + "link": null + }, + { + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": null + }, + { + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": null + }, + { + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": null + }, + { + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": null + }, + { + "label": "audio_vae", + "name": "vae_name_1", + "type": "COMBO", + "widget": { + "name": "vae_name_1" + }, + "link": null + }, + { + "name": "video", + "type": "VIDEO", + "link": 300 + }, + { + "label": "mask_video", + "name": "mask", + "type": "MASK", + "link": 301 + }, + { + "label": "mask_audio", + "name": "mask_1", + "type": "MASK", + "link": 306 + } + ], + "outputs": [ + { + "localized_name": "VIDEO", + "name": "VIDEO", + "type": "VIDEO", + "links": [ + 194 + ] + }, + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 194 + ] + } + ], + "properties": { + "previewExposures": [] + }, + "widgets_values": [ + "PRIESTESS OF THE BLUE HOUR โ€” Dance Music Video\n\nHigh-end 2D anime cinematic look, dance music-video style โ€” delicate, refined hand-drawn animation: fine precise linework with elegant variation in line weight, soft watercolor and airbrush shading instead of hard cel shadows, subtle gradient tints across skin and fabric, gentle film grain, volumetric haze, anamorphic framing, shallow depth of field. The palette is restrained and premium: deep blue-hour dusk, muted neon accents, and the dancer's warm white-and-gold as the only saturated warmth. Evoking the delicate hand-drawn elegance of Makoto Shinkai's character work and KyoAni's refined, graceful linework โ€” never crude, never exaggerated. This is the centerpiece dance sequence of an anime music video: each motion is emotional, fluid, alive.\n\nScene overview: at blue-hour dusk on an empty rain-wet plaza between glowing towers, the dancer moves alone, choreography building from stillness to explosive, every move landing on the musical beats. Her long blonde hair catches the wind; her white-and-gold priestess vestments โ€” layered robes with gold trim, church embroidery, a small pendant at her neck โ€” flare and settle with each motion. Beside her, a cute toy bear โ€” soft plush, glass-button eyes, stitched paws โ€” floats gently, emitting a faint golden glow and a trail of tiny twinkling stars and light particles that drift and spin in the air, catching the neon light like miniature fireflies, reweaving into a halo orbit as she moves. No transformation, no destruction โ€” just her, her dance, the bear, and the city's glow.\n\nCharacter design: slender, graceful proportions; a refined, gentle face with soft features and a serene, slightly devout expression โ€” eyes half-lidded, calm; long blonde hair rendered strand by strand, flowing and luminous; her signature white-and-gold priestess outfit drawn with fine elegant lines, layers of cloth that lift and settle beautifully in motion.\n\n0sโ€“1.5s Shot 1 โ€” The Stillness โ€” wide shot: the dancer stands motionless at the center of the plaza, eyes closed, wind catching her hair and the hem of her robes, city lights and mist behind her. The toy bear floats at her side, its button eyes glowing softly, a warm radiance pulsing from its little chest, and a ring of golden sparkles circles it slowly. Behind her, the towers shimmer with neon; the wet pavement mirrors the sky. She breathes โ€” the bear's glow flickers gently.\n\n1sโ€“2.5s Shot 2 โ€” The Unfolding โ€” she begins to move: a slow arm extension turning into a spin, long hair sweeping through the air. Her robes flare with the rotation, white cloth catching the blue light, gold trim tracing glowing arcs; the floating sparkles and starlight spiral with her like a comet of tiny lights, one cluster passing close to the camera, its warm glints reflecting in the bear's glassy eyes. She opens her eyes โ€” serene, focused โ€” as she completes the turn. Neon light trails and passing cars streak softly behind her, a slight slow-motion feel.\n\n2.5sโ€“4s Shot 3 โ€” The Leap โ€” fast footwork into a leaping turn, body stretching mid-air, robes and hair streaming upward like wings, the halo of golden particles exploding outward and reforming as she twists, the toy bear tumbling playfully through the air alongside her. Wet pavement reflections flash below, softly blurred; the city's glow blooms around her silhouette as she soars through the frame. The motion is fluid, weightless, precise โ€” every beat landing.\n\n4sโ€“5s Shot 4 โ€” The Landing โ€” freeze: she lands softly, the momentum settling through her body, robes settling around her, the sparkling lights returning to the bear, which floats down and nestles gently at her side. She strikes the final pose โ€” one arm extended, palm open, head tilted, eyes lowered, a quiet smile. Her lips part and she whispers, \"I am the hour.\" โ€” silhouette against the glowing city, the last tiny star drifting down past her face, holding. Only the shimmer of heat and city light in the air, and the bear's soft glow fading.\n\nCamera: each shot its own angle, cuts clean and hard, no dissolves โ€” precise cuts on the beat with a slight, elegant frame jitter on each accent hit; soft lens bloom where the sparkles catch the light; the golden glow of the bear as a secondary light source alongside the blue-hour dusk, warm highlights tracing her profile and the edges of her robes.\n\nAudio: a restrained, atmospheric score โ€” wind, distant city ambience, footsteps on wet pavement, a soft tinkling chime accompanying the bear's sparkles on each accent beat, low strings and piano underneath, an accent hit on each beat, the score bursting at 4s as she lands, closing the final 1s in near-silence with only the wind, her breathing, her soft whisper fading, and the faint rustle of plush fur settling.\n\nNo text, subtitles, logos or watermarks of any kind, no 3D-CG or cel-shaded video-game look, no photorealism, no rough or crude linework โ€” keep the delicate hand-drawn 2D anime texture with fine, elegant lines throughout.", + 1344, + 768, + 5, + 944652234912912, + "minimax_h3_fl2va_pruned_fp8_scaled.safetensors", + "qwen3vl_32b_minimax_h3_int8_convrot.safetensors", + "minimax_h3_video_vae_fp16.safetensors", + "minimax_h3_audio_vae_fp32.safetensors" + ] + } + ], + "links": [ + [ + 194, + 105, + 0, + 92, + 0, + "VIDEO" + ], + [ + 219, + 115, + 0, + 105, + 3, + "INT" + ], + [ + 220, + 115, + 1, + 105, + 4, + "INT" + ], + [ + 300, + 164, + 0, + 105, + 11, + "VIDEO" + ], + [ + 301, + 164, + 1, + 105, + 12, + "MASK" + ], + [ + 306, + 164, + 2, + 105, + 13, + "MASK" + ] + ], + "groups": [], + "definitions": { + "subgraphs": [ + { + "id": "4c314f31-ecda-4b08-ae98-faaba1bf613f", + "version": 1, + "state": { + "lastGroupId": 4, + "lastNodeId": 168, + "lastLinkId": 323, + "lastRerouteId": 0 + }, + "revision": 0, + "config": {}, + "name": "Image to Video (MiniMax H3)", + "inputNode": { + "id": -10, + "bounding": [ + -2560, + 4720, + 128, + 328 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 856.3218078333152, + 4744.442409440307, + 128, + 88 + ] + }, + "inputs": [ + { + "id": "d6eaa195-2266-4016-b7ed-b2d17a3e53c2", + "name": "first_frame", + "type": "IMAGE", + "linkIds": [ + 195 + ], + "pos": [ + -2456, + 4744 + ] + }, + { + "id": "03b95567-f496-4279-9d38-989dd34fa882", + "name": "last_frame", + "type": "IMAGE", + "linkIds": [ + 196 + ], + "pos": [ + -2456, + 4764 + ] + }, + { + "id": "d7302ca7-24ed-44c4-8ac9-736540dab7fb", + "name": "prompt", + "type": "STRING", + "linkIds": [ + 197 + ], + "pos": [ + -2456, + 4784 + ] + }, + { + "id": "709e2d94-3172-496f-ad86-7d672f3df568", + "name": "width", + "type": "INT", + "linkIds": [ + 200 + ], + "pos": [ + -2456, + 4804 + ] + }, + { + "id": "8205b85b-19bb-47f6-8418-89cd42940c1d", + "name": "height", + "type": "INT", + "linkIds": [ + 201 + ], + "pos": [ + -2456, + 4824 + ] + }, + { + "id": "a40e5e96-4307-4a8e-a4f8-13a27d4bc9d3", + "name": "value_1", + "type": "FLOAT", + "linkIds": [ + 206 + ], + "label": "duration", + "pos": [ + -2456, + 4844 + ] + }, + { + "id": "9f8734bc-c2b3-43b0-911e-e89560e8b777", + "name": "noise_seed", + "type": "INT", + "linkIds": [ + 207 + ], + "pos": [ + -2456, + 4864 + ] + }, + { + "id": "9a6d2811-673c-47e0-aa94-dda7c83621e4", + "name": "unet_name", + "type": "COMBO", + "linkIds": [ + 221 + ], + "pos": [ + -2456, + 4884 + ] + }, + { + "id": "7100a787-5536-4002-840b-1d2fd071010a", + "name": "clip_name", + "type": "COMBO", + "linkIds": [ + 227 + ], + "pos": [ + -2456, + 4904 + ] + }, + { + "id": "d40632fd-e0ae-4319-b85d-5479db4d6e11", + "name": "vae_name", + "type": "COMBO", + "linkIds": [ + 223 + ], + "pos": [ + -2456, + 4924 + ] + }, + { + "id": "2992852c-4b20-439a-8771-c866ec1996e6", + "name": "vae_name_1", + "type": "COMBO", + "linkIds": [ + 224 + ], + "label": "audio_vae", + "pos": [ + -2456, + 4944 + ] + }, + { + "id": "0ea86a95-0bd8-4d23-a65c-93e92aed63be", + "name": "video", + "type": "VIDEO", + "linkIds": [ + 312, + 318 + ], + "pos": [ + -2456, + 4964 + ] + }, + { + "id": "afece772-8ec7-4fe2-a9b6-2c73ed3b80fa", + "name": "mask", + "type": "MASK", + "linkIds": [ + 309, + 321 + ], + "label": "mask_video", + "pos": [ + -2456, + 4984 + ] + }, + { + "id": "d0ef6025-33de-4225-8d06-5750dacfd7cd", + "name": "mask_1", + "type": "MASK", + "linkIds": [ + 308, + 322 + ], + "label": "mask_audio", + "pos": [ + -2456, + 5004 + ] + } + ], + "outputs": [ + { + "id": "adb2611c-e490-4fca-8067-b718c992f8cc", + "name": "VIDEO", + "type": "VIDEO", + "linkIds": [ + 323 + ], + "localized_name": "VIDEO", + "pos": [ + 880.3218078333152, + 4768.442409440307 + ] + }, + { + "id": "6495a47f-a51e-4f29-b8bb-9fc0b68d566e", + "name": "IMAGE", + "type": "IMAGE", + "linkIds": [], + "pos": [ + 880.3218078333152, + 4788.442409440307 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 6, + "type": "UNETLoader", + "pos": [ + -2020, + 4630 + ], + "size": [ + 640, + 90 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": 221 + }, + { + "localized_name": "weight_dtype", + "name": "weight_dtype", + "type": "COMBO", + "widget": { + "name": "weight_dtype" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 5, + 193 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "default" + ] + }, + { + "id": 13, + "type": "CLIPLoader", + "pos": [ + -2020, + 4780 + ], + "size": [ + 640, + 120 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "clip_name", + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": 227 + }, + { + "localized_name": "type", + "name": "type", + "type": "COMBO", + "widget": { + "name": "type" + }, + "link": null + }, + { + "localized_name": "device", + "name": "device", + "shape": 7, + "type": "COMBO", + "widget": { + "name": "device" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 189 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "directory": "text_encoders" + } + ] + }, + "widgets_values": [ + "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "minimax", + "default" + ] + }, + { + "id": 107, + "type": "ComfyMathExpression", + "pos": [ + -1710, + 5300 + ], + "size": [ + 360, + 160 + ], + "flags": { + "collapsed": false + }, + "order": 9, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 205 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + }, + { + "localized_name": "expression", + "name": "expression", + "type": "STRING", + "widget": { + "name": "expression" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [] + }, + { + "localized_name": "BOOL", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "Node name for S&R": "ComfyMathExpression" + }, + "widgets_values": [ + "max(5, round(a * 24)) + (5 - (max(5, round(a * 24)) % 17)) % 17" + ] + }, + { + "id": 111, + "type": "PrimitiveFloat", + "pos": [ + -2020, + 5300 + ], + "size": [ + 270, + 70 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "FLOAT", + "widget": { + "name": "value" + }, + "link": 206 + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": [ + 205 + ] + } + ], + "title": "Float (duration)", + "properties": { + "Node name for S&R": "PrimitiveFloat" + }, + "widgets_values": [ + 2 + ] + }, + { + "id": 104, + "type": "MiniMaxH3ImageToVideo", + "pos": [ + -1290.8682858436853, + 4612.272798297438 + ], + "size": [ + 410, + 510 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 189 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 190 + }, + { + "localized_name": "first_frame", + "name": "first_frame", + "shape": 7, + "type": "IMAGE", + "link": 195 + }, + { + "localized_name": "last_frame", + "name": "last_frame", + "shape": 7, + "type": "IMAGE", + "link": 196 + }, + { + "localized_name": "prompt", + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 197 + }, + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 200 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 201 + }, + { + "localized_name": "length", + "name": "length", + "type": "INT", + "widget": { + "name": "length" + }, + "link": 199 + } + ], + "outputs": [ + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "links": [ + 187 + ] + }, + { + "localized_name": "LATENT", + "name": "LATENT", + "type": "LATENT", + "links": [ + 187 + ] + } + ], + "properties": { + "Node name for S&R": "MiniMaxH3ImageToVideo" + }, + "widgets_values": [ + "Vaporwave title sequence look: pink and blue gradient palette, VHS tracking artifacts, Greek statue motifs, chrome palm trees, RGB chromatic aberration, lo-fi retro atmosphere, mood languid and nostalgic.\n\nTimeline:\n[0s-1s] VHS static opens the frame, the title \"COMFYUI\" appears with RGB split and a slight horizontal jitter.\n[1s-2.5s] Hard cut, a Greek plaster bust close-up, pink-purple gradient sky, a pixelated sun.\n[2.5s-4s] Clean \"STARRING\" credits appear, \"LATENT\" and \"CONTROLNET\" each shown exactly once.\n[4s-5s] Final card \"DIRECTED BY COMFYUI\" holds, one VHS tracking glitch settling into stability.\n\nHard cuts only, transitions landing with tape jumps, no push-ins, no dissolves.\n\nAudio: lo-fi vaporwave score, slow drum machine with soft bass, VHS tape-noise sample joins at 2.5s, melody fading for the last 1s.\n\nAll text must be clearly legible, do not misspell English, no Chinese characters, do not repeat names or job titles, no soft dissolves, no subtitle bars.", + 1344, + 768, + 73 + ] + }, + { + "id": 11, + "type": "VAELoader", + "pos": [ + -2020, + 4970 + ], + "size": [ + 640, + 70 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 223 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 190, + 257 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_video_vae_fp16.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_video_vae_fp16.safetensors" + ] + }, + { + "id": 15, + "type": "RandomNoise", + "pos": [ + -790, + 4660 + ], + "size": [ + 360, + 90 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "localized_name": "noise_seed", + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": 207 + } + ], + "outputs": [ + { + "localized_name": "NOISE", + "name": "NOISE", + "type": "NOISE", + "links": [ + 283 + ] + } + ], + "properties": { + "Node name for S&R": "RandomNoise" + }, + "widgets_values": [ + 1, + "randomize" + ] + }, + { + "id": 16, + "type": "BasicGuider", + "pos": [ + -790, + 4800 + ], + "size": [ + 360, + 60 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 193 + }, + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 187 + } + ], + "outputs": [ + { + "localized_name": "GUIDER", + "name": "GUIDER", + "type": "GUIDER", + "links": [ + 284 + ] + } + ], + "properties": { + "Node name for S&R": "BasicGuider" + }, + "widgets_values": [] + }, + { + "id": 17, + "type": "KSamplerSelect", + "pos": [ + -790, + 4910 + ], + "size": [ + 370, + 70 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "sampler_name", + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "SAMPLER", + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 285 + ] + } + ], + "properties": { + "Node name for S&R": "KSamplerSelect" + }, + "widgets_values": [ + "res_multistep" + ] + }, + { + "id": 9, + "type": "BasicScheduler", + "pos": [ + -790, + 5030 + ], + "size": [ + 370, + 130 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 5 + }, + { + "localized_name": "scheduler", + "name": "scheduler", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "link": null + }, + { + "localized_name": "steps", + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": null + }, + { + "localized_name": "denoise", + "name": "denoise", + "type": "FLOAT", + "widget": { + "name": "denoise" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "SIGMAS", + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 286 + ] + } + ], + "properties": { + "Node name for S&R": "BasicScheduler" + }, + "widgets_values": [ + "simple", + 20, + 1 + ] + }, + { + "id": 24, + "type": "VAELoader", + "pos": [ + -2020, + 5100 + ], + "size": [ + 650, + 70 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 224 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 260 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_audio_vae_fp32.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_audio_vae_fp32.safetensors" + ] + }, + { + "id": 146, + "type": "Reroute", + "pos": [ + -835.8940054991671, + 5347.11973069682 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 257 + } + ], + "outputs": [ + { + "name": "", + "type": "VAE", + "links": [ + 310, + 319 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 148, + "type": "Reroute", + "pos": [ + -893.7306965867806, + 5435.637235883182 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 260 + } + ], + "outputs": [ + { + "name": "", + "type": "VAE", + "links": [ + 311, + 320 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 168, + "type": "LanPaint_AVDecode", + "pos": [ + 211.57706521551415, + 4833.943607581178 + ], + "size": [ + 270, + 182 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 317 + }, + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "link": 318 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 319 + }, + { + "localized_name": "audio_vae", + "name": "audio_vae", + "type": "VAE", + "link": 320 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 321 + }, + { + "localized_name": "audio_mask", + "name": "audio_mask", + "type": "MASK", + "link": 322 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + }, + { + "localized_name": "audio_crossfade", + "name": "audio_crossfade", + "type": "FLOAT", + "widget": { + "name": "audio_crossfade" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "links": [ + 323 + ] + }, + { + "localized_name": "audio", + "name": "audio", + "type": "AUDIO", + "links": [ + 323 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_AVDecode" + }, + "widgets_values": [ + 7, + 0.02 + ] + }, + { + "id": 166, + "type": "LanPaint_AVEncode", + "pos": [ + -601.0463335288465, + 5203.030777752436 + ], + "size": [ + 344.4587012448927, + 147.1212731848782 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "localized_name": "video", + "name": "video", + "type": "VIDEO", + "link": 312 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 310 + }, + { + "localized_name": "audio_vae", + "name": "audio_vae", + "type": "VAE", + "link": 311 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 309 + }, + { + "localized_name": "audio_mask", + "name": "audio_mask", + "type": "MASK", + "link": 308 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 313 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_AVEncode" + }, + "widgets_values": [] + }, + { + "id": 159, + "type": "LanPaint_SamplerCustomAdvanced", + "pos": [ + -364.1178713407107, + 4691.433212981466 + ], + "size": [ + 351.4830078125, + 378 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "localized_name": "noise", + "name": "noise", + "type": "NOISE", + "link": 283 + }, + { + "localized_name": "guider", + "name": "guider", + "type": "GUIDER", + "link": 284 + }, + { + "localized_name": "sampler", + "name": "sampler", + "type": "SAMPLER", + "link": 285 + }, + { + "localized_name": "sigmas", + "name": "sigmas", + "type": "SIGMAS", + "link": 286 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 313 + }, + { + "localized_name": "LanPaint_NumSteps", + "name": "LanPaint_NumSteps", + "type": "INT", + "widget": { + "name": "LanPaint_NumSteps" + }, + "link": null + }, + { + "localized_name": "LanPaint_Lambda", + "name": "LanPaint_Lambda", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Lambda" + }, + "link": null + }, + { + "localized_name": "LanPaint_StepSize", + "name": "LanPaint_StepSize", + "type": "FLOAT", + "widget": { + "name": "LanPaint_StepSize" + }, + "link": null + }, + { + "localized_name": "LanPaint_Beta", + "name": "LanPaint_Beta", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Beta" + }, + "link": null + }, + { + "localized_name": "LanPaint_Friction", + "name": "LanPaint_Friction", + "type": "FLOAT", + "widget": { + "name": "LanPaint_Friction" + }, + "link": null + }, + { + "localized_name": "LanPaint_PromptMode", + "name": "LanPaint_PromptMode", + "type": "COMBO", + "widget": { + "name": "LanPaint_PromptMode" + }, + "link": null + }, + { + "localized_name": "LanPaint_EarlyStop", + "name": "LanPaint_EarlyStop", + "type": "INT", + "widget": { + "name": "LanPaint_EarlyStop" + }, + "link": null + }, + { + "localized_name": "LanPaint_Info", + "name": "LanPaint_Info", + "type": "STRING", + "widget": { + "name": "LanPaint_Info" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerThreshold", + "name": "LanPaint_InnerThreshold", + "type": "FLOAT", + "widget": { + "name": "LanPaint_InnerThreshold" + }, + "link": null + }, + { + "localized_name": "LanPaint_InnerPatience", + "name": "LanPaint_InnerPatience", + "type": "INT", + "widget": { + "name": "LanPaint_InnerPatience" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "LATENT", + "links": [ + 317 + ] + }, + { + "localized_name": "denoised_output", + "name": "denoised_output", + "type": "LATENT", + "links": [ + 317 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_SamplerCustomAdvanced" + }, + "widgets_values": [ + 5, + 5.0, + 0.2, + 1, + 15, + "Image First", + 1, + "LanPaint Custom Sampler Adv.", + 0, + 1, + "lanpaint_star_button" + ] + } + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + -2050, + 4540, + 700, + 670 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "Sampling", + "bounding": [ + -810, + 4540, + 690, + 670 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Conditioning", + "bounding": [ + -1326.4654840084838, + 4479.223842103051, + 480, + 670 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "Decoding and create video", + "bounding": [ + -90, + 4540, + 670, + 670 + ], + "color": "#3f789e", + "flags": {} + } + ], + "links": [ + { + "id": 5, + "origin_id": 6, + "origin_slot": 0, + "target_id": 9, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 193, + "origin_id": 6, + "origin_slot": 0, + "target_id": 16, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 187, + "origin_id": 104, + "origin_slot": 0, + "target_id": 16, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 189, + "origin_id": 13, + "origin_slot": 0, + "target_id": 104, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 190, + "origin_id": 11, + "origin_slot": 0, + "target_id": 104, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 195, + "origin_id": -10, + "origin_slot": 0, + "target_id": 104, + "target_slot": 2, + "type": "IMAGE" + }, + { + "id": 196, + "origin_id": -10, + "origin_slot": 1, + "target_id": 104, + "target_slot": 3, + "type": "IMAGE" + }, + { + "id": 197, + "origin_id": -10, + "origin_slot": 2, + "target_id": 104, + "target_slot": 4, + "type": "STRING" + }, + { + "id": 199, + "origin_id": 107, + "origin_slot": 1, + "target_id": 104, + "target_slot": 7, + "type": "INT" + }, + { + "id": 200, + "origin_id": -10, + "origin_slot": 3, + "target_id": 104, + "target_slot": 5, + "type": "INT" + }, + { + "id": 201, + "origin_id": -10, + "origin_slot": 4, + "target_id": 104, + "target_slot": 6, + "type": "INT" + }, + { + "id": 205, + "origin_id": 111, + "origin_slot": 0, + "target_id": 107, + "target_slot": 0, + "type": "FLOAT" + }, + { + "id": 206, + "origin_id": -10, + "origin_slot": 5, + "target_id": 111, + "target_slot": 0, + "type": "FLOAT" + }, + { + "id": 207, + "origin_id": -10, + "origin_slot": 6, + "target_id": 15, + "target_slot": 0, + "type": "INT" + }, + { + "id": 221, + "origin_id": -10, + "origin_slot": 7, + "target_id": 6, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 223, + "origin_id": -10, + "origin_slot": 9, + "target_id": 11, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 224, + "origin_id": -10, + "origin_slot": 10, + "target_id": 24, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 227, + "origin_id": -10, + "origin_slot": 8, + "target_id": 13, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 257, + "origin_id": 11, + "origin_slot": 0, + "target_id": 146, + "target_slot": 0, + "type": "VAE" + }, + { + "id": 260, + "origin_id": 24, + "origin_slot": 0, + "target_id": 148, + "target_slot": 0, + "type": "VAE" + }, + { + "id": 283, + "origin_id": 15, + "origin_slot": 0, + "target_id": 159, + "target_slot": 0, + "type": "NOISE" + }, + { + "id": 284, + "origin_id": 16, + "origin_slot": 0, + "target_id": 159, + "target_slot": 1, + "type": "GUIDER" + }, + { + "id": 285, + "origin_id": 17, + "origin_slot": 0, + "target_id": 159, + "target_slot": 2, + "type": "SAMPLER" + }, + { + "id": 286, + "origin_id": 9, + "origin_slot": 0, + "target_id": 159, + "target_slot": 3, + "type": "SIGMAS" + }, + { + "id": 308, + "origin_id": -10, + "origin_slot": 13, + "target_id": 166, + "target_slot": 4, + "type": "MASK" + }, + { + "id": 309, + "origin_id": -10, + "origin_slot": 12, + "target_id": 166, + "target_slot": 3, + "type": "MASK" + }, + { + "id": 310, + "origin_id": 146, + "origin_slot": 0, + "target_id": 166, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 311, + "origin_id": 148, + "origin_slot": 0, + "target_id": 166, + "target_slot": 2, + "type": "VAE" + }, + { + "id": 312, + "origin_id": -10, + "origin_slot": 11, + "target_id": 166, + "target_slot": 0, + "type": "VIDEO" + }, + { + "id": 313, + "origin_id": 166, + "origin_slot": 0, + "target_id": 159, + "target_slot": 4, + "type": "LATENT" + }, + { + "id": 317, + "origin_id": 159, + "origin_slot": 0, + "target_id": 168, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 318, + "origin_id": -10, + "origin_slot": 11, + "target_id": 168, + "target_slot": 1, + "type": "VIDEO" + }, + { + "id": 319, + "origin_id": 146, + "origin_slot": 0, + "target_id": 168, + "target_slot": 2, + "type": "VAE" + }, + { + "id": 320, + "origin_id": 148, + "origin_slot": 0, + "target_id": 168, + "target_slot": 3, + "type": "VAE" + }, + { + "id": 321, + "origin_id": -10, + "origin_slot": 12, + "target_id": 168, + "target_slot": 4, + "type": "MASK" + }, + { + "id": 322, + "origin_id": -10, + "origin_slot": 13, + "target_id": 168, + "target_slot": 5, + "type": "MASK" + }, + { + "id": 323, + "origin_id": 168, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "VIDEO" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "frontendVersion": "1.47.12", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} diff --git a/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.mp4 b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.mp4 new file mode 100644 index 0000000..11babc0 Binary files /dev/null and b/example_workflows/MiniMax_H3_AV_EncodeDecode_Inpaint.mp4 differ diff --git a/example_workflows/Qwen_Image_Edit_ImageEncode_Inpaint.json b/example_workflows/Qwen_Image_Edit_ImageEncode_Inpaint.json new file mode 100644 index 0000000..7899e3d --- /dev/null +++ b/example_workflows/Qwen_Image_Edit_ImageEncode_Inpaint.json @@ -0,0 +1,1173 @@ +{ + "id": "91f6bbe2-ed41-4fd6-bac7-71d5b5864ecb", + "revision": 0, + "last_node_id": 149, + "last_link_id": 324, + "nodes": [ + { + "id": 99, + "type": "MarkdownNote", + "pos": [ + -830, + -10 + ], + "size": [ + 540, + 550 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Model links", + "properties": { + "widget_ue_connectable": {} + }, + "widgets_values": [ + "[Tutorial](https://docs.comfy.org/tutorials/image/qwen/qwen-image-edit) | [ๆ•™็จ‹](https://docs.comfy.org/zh-CN/tutorials/image/qwen/qwen-image-edit)\n\n\n## Model links\n\nYou can find all the models on [Comfy-Org/Qwen-Image_ComfyUI](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main) and [Comfy-Org/Qwen-Image-Edit_ComfyUI](https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI) \n\n**Diffusion model**\n\n- [qwen_image_edit_fp8_e4m3fn.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_fp8_e4m3fn.safetensors)\n\n**LoRA**\n\n- [Qwen-Image-Lightning-4steps-V1.0.safetensors](https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Lightning-4steps-V1.0.safetensors)\n\n**Text encoder**\n\n- [qwen_2.5_vl_7b_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors)\n\n**VAE**\n\n- [qwen_image_vae.safetensors](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors)\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ qwen_image_edit_fp8_e4m3fn.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ loras/\nโ”‚ โ”‚ โ””โ”€โ”€ Qwen-Image-Lightning-4steps-V1.0.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ”‚ โ””โ”€โ”€ qwen_image_vae.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ””โ”€โ”€ qwen_2.5_vl_7b_fp8_scaled.safetensors\n```\n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 129, + "type": "ModelSamplingAuraFlow", + "pos": [ + 550.1956176757812, + 27.127967834472656 + ], + "size": [ + 290, + 60 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 293 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 260 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.48", + "Node name for S&R": "ModelSamplingAuraFlow", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + 3 + ] + }, + { + "id": 130, + "type": "CFGNorm", + "pos": [ + 550.1956176757812, + 137.1279754638672 + ], + "size": [ + 290, + 60 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 260 + } + ], + "outputs": [ + { + "name": "patched_model", + "type": "MODEL", + "links": [ + 269 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "CFGNorm", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "strength": true + } + } + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 97, + "type": "MarkdownNote", + "pos": [ + 960.13525390625, + 776.3380737304688 + ], + "size": [ + 300, + 190 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "KSampler settings", + "properties": {}, + "widgets_values": [ + "You can test and find the best setting by yourself. The following table is for reference.\n\n| Model | Steps | CFG |\n|---------------------|---------------|---------------|\n| Offical | 50 | 4.0 \n| fp8_e4m3fn | 20 | 2.5 |\n| fp8_e4m3fn + 4steps LoRA | 4 | 1.0 |\n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 124, + "type": "UNETLoader", + "pos": [ + -249.80447387695312, + 37.12797164916992 + ], + "size": [ + 330, + 90 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 292 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.48", + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "qwen_image_edit_fp8_e4m3fn.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image-Edit_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_edit_fp8_e4m3fn.safetensors", + "directory": "diffusion_models" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_image_edit_fp8_e4m3fn.safetensors", + "default" + ] + }, + { + "id": 141, + "type": "LoraLoaderModelOnly", + "pos": [ + 199.41346740722656, + 19.401098251342773 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 8, + "mode": 4, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 292 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 293 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "LoraLoaderModelOnly", + "models": [ + { + "name": "Qwen-Image-Lightning-4steps-V1.0.safetensors", + "url": "https://huggingface.co/lightx2v/Qwen-Image-Lightning/resolve/main/Qwen-Image-Lightning-4steps-V1.0.safetensors", + "directory": "loras" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "lora_name": true, + "strength_model": true + } + } + }, + "widgets_values": [ + "Qwen-Image-Lightning-4steps-V1.0.safetensors", + 1 + ] + }, + { + "id": 125, + "type": "CLIPLoader", + "pos": [ + -249.80447387695312, + 177.12796020507812 + ], + "size": [ + 330, + 110 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 0, + "links": [ + 255, + 257 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.48", + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "qwen_2.5_vl_7b_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors", + "directory": "text_encoders" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_2.5_vl_7b_fp8_scaled.safetensors", + "qwen_image", + "default" + ] + }, + { + "id": 104, + "type": "SaveImage", + "pos": [ + 2063.178955078125, + 10.873106002807617 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 324 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 127, + "type": "TextEncodeQwenImageEdit", + "pos": [ + 182.30767822265625, + 198.8886260986328 + ], + "size": [ + 360, + 150 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 255 + }, + { + "name": "vae", + "shape": 7, + "type": "VAE", + "link": 256 + }, + { + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": 306 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 267 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "TextEncodeQwenImageEdit", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "prompt": true + } + } + }, + "widgets_values": [ + "change the girl's cloth to red evening gown " + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 128, + "type": "TextEncodeQwenImageEdit", + "pos": [ + 190.8400421142578, + 395.84197998046875 + ], + "size": [ + 360, + 150 + ], + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 257 + }, + { + "name": "vae", + "shape": 7, + "type": "VAE", + "link": 258 + }, + { + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": 307 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 268 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "TextEncodeQwenImageEdit", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "prompt": true + } + } + }, + "widgets_values": [ + "" + ], + "color": "#223", + "bgcolor": "#335" + }, + { + "id": 126, + "type": "VAELoader", + "pos": [ + -249.80447387695312, + 337.1279296875 + ], + "size": [ + 330, + 60 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "slot_index": 0, + "links": [ + 256, + 258, + 318, + 321 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.48", + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "qwen_image_vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors", + "directory": "vae" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_image_vae.safetensors" + ] + }, + { + "id": 144, + "type": "ImageScale", + "pos": [ + -163.11903381347656, + 1055.310546875 + ], + "size": [ + 270, + 130 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 314 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": null + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 306, + 307 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.52", + "Node name for S&R": "ImageScale" + }, + "widgets_values": [ + "nearest-exact", + 512, + 512, + "center" + ] + }, + { + "id": 110, + "type": "LoadImage", + "pos": [ + -224.69882202148438, + 491.67425537109375 + ], + "size": [ + 274.080078125, + 314.0000305175781 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 275, + 314, + 316, + 322 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 275, + 314, + 316, + 322 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "LoadImage", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "image": true, + "upload": true + } + } + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (9).png", + "image" + ] + }, + { + "id": 96, + "type": "MarkdownNote", + "pos": [ + -548.3401489257812, + 1051.436279296875 + ], + "size": [ + 280, + 88 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "This node is to avoid poor output results caused by excessively large input image sizes." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 140, + "type": "MarkdownNote", + "pos": [ + 1361.85009765625, + 360.32342529296875 + ], + "size": [ + 300, + 190 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "KSampler settings", + "properties": {}, + "widgets_values": [ + "Decrease **LanPaint_NumSteps** for faster generation. \n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 131, + "type": "ImageScaleToTotalPixels", + "pos": [ + -851.1531982421875, + 1230.9898681640625 + ], + "size": [ + 270, + 82 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 275 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.50", + "Node name for S&R": "ImageScaleToTotalPixels", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "ue_properties": { + "widget_ue_connectable": { + "upscale_method": true, + "megapixels": true + } + } + }, + "widgets_values": [ + "nearest-exact", + 1 + ] + }, + { + "id": 102, + "type": "LanPaint_KSampler", + "pos": [ + 935.6971435546875, + 22.220111846923828 + ], + "size": [ + 400, + 572 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 269 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 267 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 268 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 319 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 320 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "453b6c090e400123bb82f5bc0c97854031b09274", + "Node name for S&R": "LanPaint_KSampler" + }, + "widgets_values": [ + 0, + "fixed", + 20, + 2.5, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!" + ] + }, + { + "id": 148, + "type": "LanPaint_ImageEncode", + "pos": [ + 4480, + 2000 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 50, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 316 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 318 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 317 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 319 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + }, + "widgets_values": [] + }, + { + "id": 149, + "type": "LanPaint_ImageDecode", + "pos": [ + 4790, + 2000 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 51, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 320 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 321 + }, + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 322 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 323 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 324 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + }, + "widgets_values": [ + 9 + ] + } + ], + "links": [ + [ + 255, + 125, + 0, + 127, + 0, + "CLIP" + ], + [ + 256, + 126, + 0, + 127, + 1, + "VAE" + ], + [ + 257, + 125, + 0, + 128, + 0, + "CLIP" + ], + [ + 258, + 126, + 0, + 128, + 1, + "VAE" + ], + [ + 260, + 129, + 0, + 130, + 0, + "MODEL" + ], + [ + 267, + 127, + 0, + 102, + 1, + "CONDITIONING" + ], + [ + 268, + 128, + 0, + 102, + 2, + "CONDITIONING" + ], + [ + 269, + 130, + 0, + 102, + 0, + "MODEL" + ], + [ + 275, + 110, + 0, + 131, + 0, + "IMAGE" + ], + [ + 292, + 124, + 0, + 141, + 0, + "MODEL" + ], + [ + 293, + 141, + 0, + 129, + 0, + "MODEL" + ], + [ + 306, + 144, + 0, + 127, + 2, + "IMAGE" + ], + [ + 307, + 144, + 0, + 128, + 2, + "IMAGE" + ], + [ + 314, + 110, + 0, + 144, + 0, + "IMAGE" + ], + [ + 316, + 110, + 0, + 148, + 0, + "IMAGE" + ], + [ + 317, + 110, + 1, + 148, + 2, + "MASK" + ], + [ + 318, + 126, + 0, + 148, + 1, + "VAE" + ], + [ + 319, + 148, + 0, + 102, + 3, + "LATENT" + ], + [ + 320, + 102, + 0, + 149, + 0, + "LATENT" + ], + [ + 321, + 126, + 0, + 149, + 1, + "VAE" + ], + [ + 322, + 110, + 0, + 149, + 2, + "IMAGE" + ], + [ + 323, + 110, + 1, + 149, + 3, + "MASK" + ], + [ + 324, + 149, + 0, + 104, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Step1 - Load models", + "bounding": [ + -270, + -40, + 370, + 450 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Step 2 - Upload image for editing", + "bounding": [ + -270, + 430, + 370, + 400 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Step 3 - Prompt", + "bounding": [ + 130, + 130, + 380, + 433.6000061035156 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.8770472573513671, + "offset": [ + -1288.739882247765, + 215.50013247190662 + ] + }, + "frontendVersion": "1.25.10", + "ue_links": [], + "links_added_by_ue": [], + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "groupNodes": {} + }, + "version": 0.4 +} diff --git a/example_workflows/Qwen_Image_ImageEncode_Inpaint.json b/example_workflows/Qwen_Image_ImageEncode_Inpaint.json new file mode 100644 index 0000000..db6bbd5 --- /dev/null +++ b/example_workflows/Qwen_Image_ImageEncode_Inpaint.json @@ -0,0 +1,731 @@ +{ + "id": "11cce4ab-536b-4f42-a95c-0be437d04ace", + "revision": 0, + "last_node_id": 137, + "last_link_id": 364, + "nodes": [ + { + "id": 74, + "type": "LanPaint_KSampler", + "pos": [ + 276.219970703125, + 179.55892944335938 + ], + "size": [ + 388.97625732421875, + 572 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 325 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 323 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 324 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 359 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 360 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_KSampler", + "cnr_id": "LanPaint", + "ver": "56bd6c04e89124cd06682b304245d6ddf8b20522" + }, + "widgets_values": [ + 0, + "fixed", + 20, + 4, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", + "๐Ÿ–ผ๏ธ Image Inpainting", + "lanpaint_star_button" + ] + }, + { + "id": 113, + "type": "SaveImage", + "pos": [ + 807.1268310546875, + 868.395263671875 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 364 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 117, + "type": "CLIPLoader", + "pos": [ + -824.4296875, + 177.9814910888672 + ], + "size": [ + 330, + 110 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 0, + "links": [ + 318, + 319 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "models": [ + { + "name": "qwen_2.5_vl_7b_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/text_encoders/qwen_2.5_vl_7b_fp8_scaled.safetensors", + "directory": "text_encoders" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_2.5_vl_7b_fp8_scaled.safetensors", + "qwen_image", + "default" + ] + }, + { + "id": 122, + "type": "ModelSamplingAuraFlow", + "pos": [ + -34.14249038696289, + -43.64523696899414 + ], + "size": [ + 300, + 58 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 320 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 325 + ] + } + ], + "properties": { + "Node name for S&R": "ModelSamplingAuraFlow", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + 3.5 + ] + }, + { + "id": 119, + "type": "UNETLoader", + "pos": [ + -824.4296875, + 37.98154830932617 + ], + "size": [ + 330, + 90 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 320 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "models": [ + { + "name": "qwen_image_fp8_e4m3fn.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/diffusion_models/qwen_image_fp8_e4m3fn.safetensors", + "directory": "diffusion_models" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_image_fp8_e4m3fn.safetensors", + "default" + ] + }, + { + "id": 128, + "type": "MarkdownNote", + "pos": [ + 715.929931640625, + 371.1071472167969 + ], + "size": [ + 300, + 190 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "KSampler settings", + "properties": {}, + "widgets_values": [ + "Decrease **LanPaint_NumSteps** for faster generation. \n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 123, + "type": "LoadImage", + "pos": [ + -935.2606748101325, + 786.6170753867922 + ], + "size": [ + 262.12347412109375, + 487.22296142578125 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 356, + 362 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 357, + 363 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "Example_12_Masked.png", + "image" + ] + }, + { + "id": 118, + "type": "VAELoader", + "pos": [ + -824.4296875, + 327.9817199707031 + ], + "size": [ + 330, + 60 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "slot_index": 0, + "links": [ + 358, + 361 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "models": [ + { + "name": "qwen_image_vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/resolve/main/split_files/vae/qwen_image_vae.safetensors", + "directory": "vae" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "qwen_image_vae.safetensors" + ] + }, + { + "id": 121, + "type": "CLIPTextEncode", + "pos": [ + -454.4298095703125, + 247.9816436767578 + ], + "size": [ + 425.27801513671875, + 180.6060791015625 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 319 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 324 + ] + } + ], + "title": "CLIP Text Encode (Negative Prompt)", + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + " low quality, bad anatomy, extra digits, missing digits, extra limbs, missing limbs" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 120, + "type": "CLIPTextEncode", + "pos": [ + -454.86480712890625, + 41.89194869995117 + ], + "size": [ + 422.84503173828125, + 164.31304931640625 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 318 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 323 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.3.48", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "Cyberpunk-style Einstein portrait: He wears a sleek black coat with glowing cyan circuit patterns, silver-rimmed cybernetic glasses (lenses display faint data streams), and his hair has subtle neon blue highlights. His expression is calm, with a faint smile. Behind him: a dark, rain-washed cybercity backdropโ€”towering skyscrapers with flickering holographic ads, wet pavement reflecting neon pink/magenta lights. In front of him: giant, glowing white 3D text of \"LanPaint\", with electric blue energy pulses swirling around the equation. Cinematic lighting, hyper-detailed textures, rain droplets visible in the air." + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 136, + "type": "LanPaint_ImageEncode", + "pos": [ + 4360, + 2000 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 50, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 356 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 358 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 357 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 359 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + }, + "widgets_values": [] + }, + { + "id": 137, + "type": "LanPaint_ImageDecode", + "pos": [ + 4670, + 2000 + ], + "size": [ + 270, + 150 + ], + "flags": {}, + "order": 51, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 360 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 361 + }, + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 362 + }, + { + "localized_name": "mask", + "name": "mask", + "type": "MASK", + "link": 363 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 364 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + }, + "widgets_values": [ + 9 + ] + } + ], + "links": [ + [ + 318, + 117, + 0, + 120, + 0, + "CLIP" + ], + [ + 319, + 117, + 0, + 121, + 0, + "CLIP" + ], + [ + 320, + 119, + 0, + 122, + 0, + "MODEL" + ], + [ + 323, + 120, + 0, + 74, + 1, + "CONDITIONING" + ], + [ + 324, + 121, + 0, + 74, + 2, + "CONDITIONING" + ], + [ + 325, + 122, + 0, + 74, + 0, + "MODEL" + ], + [ + 356, + 123, + 0, + 136, + 0, + "IMAGE" + ], + [ + 357, + 123, + 1, + 136, + 2, + "MASK" + ], + [ + 358, + 118, + 0, + 136, + 1, + "VAE" + ], + [ + 359, + 136, + 0, + 74, + 3, + "LATENT" + ], + [ + 360, + 74, + 0, + 137, + 0, + "LATENT" + ], + [ + 361, + 118, + 0, + 137, + 1, + "VAE" + ], + [ + 362, + 123, + 0, + 137, + 2, + "IMAGE" + ], + [ + 363, + 123, + 1, + 137, + 3, + "MASK" + ], + [ + 364, + 137, + 0, + 113, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": { + "ds": { + "scale": 0.6722341729170042, + "offset": [ + 1421.2190992818914, + -80.75631642004547 + ] + }, + "frontendVersion": "1.43.18", + "node_versions": { + "comfy-core": "0.3.18", + "LanPaint": "0f509469ed2cd60c6032f739e282aad5dfc06166" + }, + "groupNodes": {} + }, + "version": 0.4 +} diff --git a/example_workflows/SD3.5_ImageEncode_Inpaint.json b/example_workflows/SD3.5_ImageEncode_Inpaint.json new file mode 100644 index 0000000..694ff0f --- /dev/null +++ b/example_workflows/SD3.5_ImageEncode_Inpaint.json @@ -0,0 +1,1694 @@ +{ + "id": "11cce4ab-536b-4f42-a95c-0be437d04ace", + "revision": 0, + "last_node_id": 100, + "last_link_id": 273, + "nodes": [ + { + "id": 57, + "type": "VAEDecode", + "pos": [ + 375.7364196777344, + 1065.1798095703125 + ], + "size": [ + 210, + 46 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 132 + }, + { + "name": "vae", + "type": "VAE", + "link": 243 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 134 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 62, + "type": "VAEDecode", + "pos": [ + 768.3919067382812, + 1066.875244140625 + ], + "size": [ + 210, + 46 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 150 + }, + { + "name": "vae", + "type": "VAE", + "link": 246 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 153 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 60, + "type": "VAEEncode", + "pos": [ + -184.552734375, + 1881.4002685546875 + ], + "size": [ + 210, + 46 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [ + { + "name": "pixels", + "type": "IMAGE", + "link": 141 + }, + { + "name": "vae", + "type": "VAE", + "link": 240 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 174 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "VAEEncode" + }, + "widgets_values": [] + }, + { + "id": 70, + "type": "RepeatLatentBatch", + "pos": [ + -293.03985595703125, + 2005.1365966796875 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 174 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 175 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "RepeatLatentBatch" + }, + "widgets_values": [ + 4 + ] + }, + { + "id": 59, + "type": "SetLatentNoiseMask", + "pos": [ + 59.09994125366211, + 1895.3350830078125 + ], + "size": [ + 264.5999755859375, + 46 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 175 + }, + { + "name": "mask", + "type": "MASK", + "link": 144 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 145 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "SetLatentNoiseMask" + }, + "widgets_values": [] + }, + { + "id": 92, + "type": "EmptySD3LatentImage", + "pos": [ + 393.2322692871094, + 583.048828125 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.34", + "Node name for S&R": "EmptySD3LatentImage" + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 93, + "type": "Reroute", + "pos": [ + -119.7474365234375, + 736.22412109375 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 247 + } + ], + "outputs": [ + { + "name": "", + "type": "VAE", + "links": [ + 240, + 242, + 243, + 246, + 266, + 270 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 90, + "type": "CLIPTextEncode", + "pos": [ + 289.5769958496094, + 342.0919494628906 + ], + "size": [ + 432, + 192 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 235 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 252 + ] + } + ], + "title": "Negative Prompt", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.34", + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 95, + "type": "Reroute", + "pos": [ + 812.967529296875, + 491.6490783691406 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 252 + } + ], + "outputs": [ + { + "name": "", + "type": "CONDITIONING", + "links": [ + 253, + 254, + 255 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 94, + "type": "Reroute", + "pos": [ + 816.7250366210938, + 315.13153076171875 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 251 + } + ], + "outputs": [ + { + "name": "", + "type": "CONDITIONING", + "links": [ + 248, + 249, + 250 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 89, + "type": "CheckpointLoaderSimple", + "pos": [ + -190.42303466796875, + 486.09197998046875 + ], + "size": [ + 384.75592041015625, + 98 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 256 + ] + }, + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 1, + "links": [] + }, + { + "name": "VAE", + "type": "VAE", + "slot_index": 2, + "links": [ + 247 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.34", + "Node name for S&R": "CheckpointLoaderSimple" + }, + "widgets_values": [ + "sd3.5_large.safetensors" + ] + }, + { + "id": 96, + "type": "Reroute", + "pos": [ + 258.5778503417969, + 635.1219482421875 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 256 + } + ], + "outputs": [ + { + "name": "", + "type": "MODEL", + "links": [ + 257, + 258, + 259 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 54, + "type": "VAEEncodeForInpaint", + "pos": [ + 491.6502380371094, + 1924.27734375 + ], + "size": [ + 340.20001220703125, + 98 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "name": "pixels", + "type": "IMAGE", + "link": 125 + }, + { + "name": "vae", + "type": "VAE", + "link": 242 + }, + { + "name": "mask", + "type": "MASK", + "link": 126 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 176 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "VAEEncodeForInpaint" + }, + "widgets_values": [ + 0 + ] + }, + { + "id": 71, + "type": "RepeatLatentBatch", + "pos": [ + 528.021728515625, + 2073.6640625 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 176 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 177 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "RepeatLatentBatch" + }, + "widgets_values": [ + 4 + ] + }, + { + "id": 63, + "type": "SaveImage", + "pos": [ + 719.3301391601562, + 1155.3548583984375 + ], + "size": [ + 320.0124206542969, + 493.46875 + ], + "flags": {}, + "order": 26, + "mode": 4, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 153 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 56, + "type": "SaveImage", + "pos": [ + 331.3768310546875, + 1154.2471923828125 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 24, + "mode": 4, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 134 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 52, + "type": "LoadImage", + "pos": [ + -248.0169219970703, + 1121.7154541015625 + ], + "size": [ + 262.12347412109375, + 487.22296142578125 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "ComfyUI_05949_.png", + "image" + ] + }, + { + "id": 88, + "type": "TripleCLIPLoader", + "pos": [ + -183.123779296875, + 317.98052978515625 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 0, + "links": [ + 235, + 236 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.34", + "Node name for S&R": "TripleCLIPLoader" + }, + "widgets_values": [ + "clip_l_hidream.safetensors", + "clip_g_hidream.safetensors", + "t5xxl_fp8_e4m3fn_scaled.safetensors" + ] + }, + { + "id": 91, + "type": "CLIPTextEncode", + "pos": [ + 289.5769958496094, + 102.09196472167969 + ], + "size": [ + 432, + 192 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 236 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 251 + ] + } + ], + "title": "Positive Prompt", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.34", + "Node name for S&R": "CLIPTextEncode" + }, + "widgets_values": [ + "a bottle with a rainbow galaxy inside it on top of a wooden table on a snowy mountain top with the ocean and clouds in the background" + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 74, + "type": "LanPaint_KSampler", + "pos": [ + 1013.8515625, + 251.58590698242188 + ], + "size": [ + 412.3423767089844, + 572 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 257 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 248 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 253 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 268 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 269 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "56bd6c04e89124cd06682b304245d6ddf8b20522", + "Node name for S&R": "LanPaint_KSampler" + }, + "widgets_values": [ + 0, + "fixed", + 30, + 5.5, + "euler", + "sgm_uniform", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!" + ] + }, + { + "id": 48, + "type": "SaveImage", + "pos": [ + 1123.389892578125, + 1188.722900390625 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 273 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 69, + "type": "RepeatLatentBatch", + "pos": [ + 364.2433166503906, + 862.7393188476562 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 267 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 268 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "RepeatLatentBatch" + }, + "widgets_values": [ + 4 + ] + }, + { + "id": 55, + "type": "KSampler", + "pos": [ + 897.1165161132812, + 1900.3353271484375 + ], + "size": [ + 315, + 474 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 258 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 249 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 254 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 177 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 132 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 0, + "fixed", + 30, + 5.5, + "euler", + "sgm_uniform", + 1 + ] + }, + { + "id": 61, + "type": "KSampler", + "pos": [ + 49.68569564819336, + 1998.5968017578125 + ], + "size": [ + 315, + 474.0001220703125 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 259 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 250 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 255 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 145 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 150 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "KSampler" + }, + "widgets_values": [ + 0, + "fixed", + 30, + 5.5, + "euler", + "sgm_uniform", + 1 + ] + }, + { + "id": 20, + "type": "LoadImage", + "pos": [ + 45.70227813720703, + 1147.2928466796875 + ], + "size": [ + 262.12347412109375, + 487.22296142578125 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 125, + 141, + 264, + 271 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 126, + 144, + 265, + 272 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "Example_9_Masked.png", + "image" + ] + }, + { + "id": 99, + "type": "LanPaint_ImageEncode", + "pos": [ + 198, + 768 + ], + "size": [ + 210, + 82 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 264 + }, + { + "name": "vae", + "type": "VAE", + "link": 266 + }, + { + "name": "mask", + "type": "MASK", + "link": 265 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 267 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode" + }, + "widgets_values": [] + }, + { + "id": 100, + "type": "LanPaint_ImageDecode", + "pos": [ + 1120, + 1060 + ], + "size": [ + 210, + 118 + ], + "flags": {}, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 269 + }, + { + "name": "vae", + "type": "VAE", + "link": 270 + }, + { + "name": "image", + "type": "IMAGE", + "link": 271 + }, + { + "name": "mask", + "type": "MASK", + "link": 272 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 273 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode" + }, + "widgets_values": [ + 9 + ] + } + ], + "links": [ + [ + 125, + 20, + 0, + 54, + 0, + "IMAGE" + ], + [ + 126, + 20, + 1, + 54, + 2, + "MASK" + ], + [ + 132, + 55, + 0, + 57, + 0, + "LATENT" + ], + [ + 134, + 57, + 0, + 56, + 0, + "IMAGE" + ], + [ + 141, + 20, + 0, + 60, + 0, + "IMAGE" + ], + [ + 144, + 20, + 1, + 59, + 1, + "MASK" + ], + [ + 145, + 59, + 0, + 61, + 3, + "LATENT" + ], + [ + 150, + 61, + 0, + 62, + 0, + "LATENT" + ], + [ + 153, + 62, + 0, + 63, + 0, + "IMAGE" + ], + [ + 174, + 60, + 0, + 70, + 0, + "LATENT" + ], + [ + 175, + 70, + 0, + 59, + 0, + "LATENT" + ], + [ + 176, + 54, + 0, + 71, + 0, + "LATENT" + ], + [ + 177, + 71, + 0, + 55, + 3, + "LATENT" + ], + [ + 235, + 88, + 0, + 90, + 0, + "CLIP" + ], + [ + 236, + 88, + 0, + 91, + 0, + "CLIP" + ], + [ + 240, + 93, + 0, + 60, + 1, + "VAE" + ], + [ + 242, + 93, + 0, + 54, + 1, + "VAE" + ], + [ + 243, + 93, + 0, + 57, + 1, + "VAE" + ], + [ + 246, + 93, + 0, + 62, + 1, + "VAE" + ], + [ + 247, + 89, + 2, + 93, + 0, + "*" + ], + [ + 248, + 94, + 0, + 74, + 1, + "CONDITIONING" + ], + [ + 249, + 94, + 0, + 55, + 1, + "CONDITIONING" + ], + [ + 250, + 94, + 0, + 61, + 1, + "CONDITIONING" + ], + [ + 251, + 91, + 0, + 94, + 0, + "*" + ], + [ + 252, + 90, + 0, + 95, + 0, + "*" + ], + [ + 253, + 95, + 0, + 74, + 2, + "CONDITIONING" + ], + [ + 254, + 95, + 0, + 55, + 2, + "CONDITIONING" + ], + [ + 255, + 95, + 0, + 61, + 2, + "CONDITIONING" + ], + [ + 256, + 89, + 0, + 96, + 0, + "*" + ], + [ + 257, + 96, + 0, + 74, + 0, + "MODEL" + ], + [ + 258, + 96, + 0, + 55, + 0, + "MODEL" + ], + [ + 259, + 96, + 0, + 61, + 0, + "MODEL" + ], + [ + 264, + 20, + 0, + 99, + 0, + "IMAGE" + ], + [ + 265, + 20, + 1, + 99, + 2, + "MASK" + ], + [ + 266, + 93, + 0, + 99, + 1, + "VAE" + ], + [ + 267, + 99, + 0, + 69, + 0, + "LATENT" + ], + [ + 268, + 69, + 0, + 74, + 3, + "LATENT" + ], + [ + 269, + 74, + 0, + 100, + 0, + "LATENT" + ], + [ + 270, + 93, + 0, + 100, + 1, + "VAE" + ], + [ + 271, + 20, + 0, + 100, + 2, + "IMAGE" + ], + [ + 272, + 20, + 1, + 100, + 3, + "MASK" + ], + [ + 273, + 100, + 0, + 48, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Mask image for inpainting.", + "bounding": [ + 36.04227828979492, + 989.7313232421875, + 278.89093017578125, + 669.3414916992188 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Convert Latents for LanPaint", + "bounding": [ + 286.0640563964844, + 714.343505859375, + 489.16796875, + 197.81044006347656 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Load Model and Set Prompts", + "bounding": [ + -78.9311294555664, + 176.08712768554688, + 1006.1721801757812, + 514.258544921875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Inpaint with the LanPaint KSampler", + "bounding": [ + 960.8922729492188, + 179.17588806152344, + 474.8909606933594, + 630.4742431640625 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "LanPaint OutPut", + "bounding": [ + 1085.6029052734375, + 994.0775756835938, + 345.4561767578125, + 669.4969482421875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 6, + "title": "Original Image", + "bounding": [ + -263.5933837890625, + 989.2400512695312, + 297.57080078125, + 670.1135864257812 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 7, + "title": "Comfy Original Inpaint: VAE Encode for inpainting", + "bounding": [ + 481.6502380371094, + 1810.525390625, + 757.8348388671875, + 345.6000061035156 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 8, + "title": "Encode for InPainting OutPut", + "bounding": [ + 319.9195861816406, + 991.5802612304688, + 328.3387451171875, + 669.1323852539062 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 9, + "title": "Latent Noise Mask OutPut", + "bounding": [ + 707.5668334960938, + 990.3363037109375, + 358.9906005859375, + 661.2262573242188 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 10, + "title": "Comfy Original Inpaint: Latent Noise Mask", + "bounding": [ + -185.77822875976562, + 1807.8648681640625, + 549.8079833984375, + 482.0323791503906 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 11, + "title": "LanPaint", + "bounding": [ + -262.59381103515625, + 140.46656799316406, + 1737.328857421875, + 797.4443359375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 12, + "title": "Baselines for Comparison, Delete them if you don't nee comparison", + "bounding": [ + -256.9761047363281, + 1733.4495849609375, + 1582.3065185546875, + 593.7572021484375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 13, + "title": "Paste back the original to preserve it exactly, if you want", + "bounding": [ + 1486.6221923828125, + 1002.1036987304688, + 749.66455078125, + 637.360595703125 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.7627768444385489, + "offset": [ + -308.32243774693706, + -605.7385256990528 + ] + }, + "frontendVersion": "1.20.6", + "node_versions": { + "comfy-core": "0.3.18", + "LanPaint": "0f509469ed2cd60c6032f739e282aad5dfc06166" + } + }, + "version": 0.4 +} diff --git a/example_workflows/SDXL_ImageEncode_Inpaint.json b/example_workflows/SDXL_ImageEncode_Inpaint.json new file mode 100644 index 0000000..f1c5c28 --- /dev/null +++ b/example_workflows/SDXL_ImageEncode_Inpaint.json @@ -0,0 +1,759 @@ +{ + "id": "26fb90cb-eb4a-422e-97d0-8b84dd6c3302", + "revision": 0, + "last_node_id": 79, + "last_link_id": 211, + "nodes": [ + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 333.06903076171875, + 249.68698120117188 + ], + "size": [ + 422.84503173828125, + 164.31304931640625 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 81 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 199 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "1girl, blue shirt, masterpiece, high score, great score, absurdres" + ] + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 335.06903076171875, + 462.68701171875 + ], + "size": [ + 425.27801513671875, + 180.6060791015625 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 82 + }, + { + "localized_name": "text", + "name": "text", + "type": "STRING", + "widget": { + "name": "text" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "CONDITIONING", + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 200 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "lowres, bad anatomy, bad hands, text, error, missing finger, extra digits, fewer digits, cropped, worst quality, low quality, low score, bad score, average score, signature, watermark, username, blurry, nude, NSFW" + ] + }, + { + "id": 78, + "type": "LanPaint_ImageEncode", + "pos": [ + 627.3978942185906, + 984.308971592649 + ], + "size": [ + 195.3150390625, + 66 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "link": 204 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 203 + }, + { + "localized_name": "mask", + "name": "mask", + "shape": 7, + "type": "MASK", + "link": 205 + } + ], + "outputs": [ + { + "localized_name": "latent", + "name": "latent", + "type": "LATENT", + "links": [ + 206 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode" + } + }, + { + "id": 73, + "type": "LanPaint_KSampler", + "pos": [ + 992.965419921875, + 268.686944885254 + ], + "size": [ + 413.6495666503906, + 572 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 198 + }, + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "link": 199 + }, + { + "localized_name": "negative", + "name": "negative", + "type": "CONDITIONING", + "link": 200 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 206 + }, + { + "localized_name": "seed", + "name": "seed", + "type": "INT", + "widget": { + "name": "seed" + }, + "link": null + }, + { + "localized_name": "steps", + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": null + }, + { + "localized_name": "cfg", + "name": "cfg", + "type": "FLOAT", + "widget": { + "name": "cfg" + }, + "link": null + }, + { + "localized_name": "sampler_name", + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": null + }, + { + "localized_name": "scheduler", + "name": "scheduler", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "link": null + }, + { + "localized_name": "denoise", + "name": "denoise", + "type": "FLOAT", + "widget": { + "name": "denoise" + }, + "link": null + }, + { + "localized_name": "LanPaint_NumSteps", + "name": "LanPaint_NumSteps", + "type": "INT", + "widget": { + "name": "LanPaint_NumSteps" + }, + "link": null + }, + { + "localized_name": "LanPaint_PromptMode", + "name": "LanPaint_PromptMode", + "type": "COMBO", + "widget": { + "name": "LanPaint_PromptMode" + }, + "link": null + }, + { + "localized_name": "LanPaint_Info", + "name": "LanPaint_Info", + "type": "STRING", + "widget": { + "name": "LanPaint_Info" + }, + "link": null + }, + { + "localized_name": "Inpainting_mode", + "name": "Inpainting_mode", + "type": "COMBO", + "widget": { + "name": "Inpainting_mode" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "LATENT", + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [ + 207 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_KSampler", + "cnr_id": "LanPaint", + "ver": "56bd6c04e89124cd06682b304245d6ddf8b20522" + }, + "widgets_values": [ + 0, + "fixed", + 20, + 5, + "euler", + "karras", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", + "๐Ÿ–ผ๏ธ Image Inpainting", + "lanpaint_star_button" + ] + }, + { + "id": 29, + "type": "CheckpointLoaderSimple", + "pos": [ + -62.627220153808594, + 407.01416015625 + ], + "size": [ + 315, + 98 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "localized_name": "ckpt_name", + "name": "ckpt_name", + "type": "COMBO", + "widget": { + "name": "ckpt_name" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 198 + ] + }, + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "slot_index": 1, + "links": [ + 81, + 82 + ] + }, + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "slot_index": 2, + "links": [ + 203, + 208 + ] + } + ], + "properties": { + "Node name for S&R": "CheckpointLoaderSimple", + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "animagineXL40_v4Opt.safetensors" + ] + }, + { + "id": 20, + "type": "LoadImage", + "pos": [ + 45.70227813720703, + 1147.2928466796875 + ], + "size": [ + 262.12347412109375, + 487.22296142578125 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "image", + "name": "image", + "type": "COMBO", + "widget": { + "name": "image" + }, + "link": null + }, + { + "localized_name": "choose file to upload", + "name": "upload", + "type": "IMAGEUPLOAD", + "widget": { + "name": "upload" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 204, + 209 + ] + }, + { + "localized_name": "MASK", + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 205, + 210 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (19).png", + "image" + ] + }, + { + "id": 75, + "type": "SaveImage", + "pos": [ + 2279.375686842185, + 747.0061447670435 + ], + "size": [ + 311.2532653808594, + 484.7096252441406 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 211 + }, + { + "localized_name": "filename_prefix", + "name": "filename_prefix", + "type": "STRING", + "widget": { + "name": "filename_prefix" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "links": null + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 79, + "type": "LanPaint_ImageDecode", + "pos": [ + 1755.3697160664874, + 781.9181675937066 + ], + "size": [ + 270, + 118 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 207 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 208 + }, + { + "localized_name": "image", + "name": "image", + "shape": 7, + "type": "IMAGE", + "link": 209 + }, + { + "localized_name": "mask", + "name": "mask", + "shape": 7, + "type": "MASK", + "link": 210 + }, + { + "localized_name": "blend_overlap", + "name": "blend_overlap", + "shape": 7, + "type": "INT", + "widget": { + "name": "blend_overlap" + }, + "link": null + } + ], + "outputs": [ + { + "localized_name": "image", + "name": "image", + "type": "IMAGE", + "links": [ + 211 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode" + }, + "widgets_values": [ + 9 + ] + } + ], + "links": [ + [ + 81, + 29, + 1, + 6, + 0, + "CLIP" + ], + [ + 82, + 29, + 1, + 7, + 0, + "CLIP" + ], + [ + 198, + 29, + 0, + 73, + 0, + "MODEL" + ], + [ + 199, + 6, + 0, + 73, + 1, + "CONDITIONING" + ], + [ + 200, + 7, + 0, + 73, + 2, + "CONDITIONING" + ], + [ + 203, + 29, + 2, + 78, + 1, + "VAE" + ], + [ + 204, + 20, + 0, + 78, + 0, + "IMAGE" + ], + [ + 205, + 20, + 1, + 78, + 2, + "MASK" + ], + [ + 206, + 78, + 0, + 73, + 3, + "LATENT" + ], + [ + 207, + 73, + 0, + 79, + 0, + "LATENT" + ], + [ + 208, + 29, + 2, + 79, + 1, + "VAE" + ], + [ + 209, + 20, + 0, + 79, + 2, + "IMAGE" + ], + [ + 210, + 20, + 1, + 79, + 3, + "MASK" + ], + [ + 211, + 79, + 0, + 75, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Mask image for inpainting.", + "bounding": [ + 36.04227828979492, + 989.7313232421875, + 278.89093017578125, + 669.3414916992188 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "Convert Latents for LanPaint", + "bounding": [ + 286.0640563964844, + 714.343505859375, + 489.16796875, + 197.81044006347656 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Load Model and Set Prompts", + "bounding": [ + -78.9311294555664, + 176.08712768554688, + 1006.1721801757812, + 514.258544921875 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "Inpaint with the LanPaint KSampler", + "bounding": [ + 960.8922729492188, + 179.17588806152344, + 474.8909606933594, + 630.4742431640625 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 11, + "title": "LanPaint", + "bounding": [ + -262.59381103515625, + 140.46656799316406, + 1737.328857421875, + 797.4443359375 + ], + "color": "#3f789e", + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.8954302432552493, + "offset": [ + -1381.79269847794, + -521.6998945185028 + ] + }, + "frontendVersion": "1.25.10", + "node_versions": { + "comfy-core": "0.3.18", + "LanPaint": "0f509469ed2cd60c6032f739e282aad5dfc06166" + } + }, + "version": 0.4 +} diff --git a/example_workflows/Z_Image_ImageEncode_Inpaint.json b/example_workflows/Z_Image_ImageEncode_Inpaint.json new file mode 100644 index 0000000..56b5b3b --- /dev/null +++ b/example_workflows/Z_Image_ImageEncode_Inpaint.json @@ -0,0 +1,925 @@ +{ + "id": "9ae6082b-c7f4-433c-9971-7a8f65a3ea65", + "revision": 0, + "last_node_id": 75, + "last_link_id": 105, + "nodes": [ + { + "id": 39, + "type": "CLIPLoader", + "pos": [ + 158.31605577680375, + 488.30506119064967 + ], + "size": [ + 323.734375, + 179.390625 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "links": [ + 44 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "cnr_id": "comfy-core", + "ver": "0.3.73", + "models": [ + { + "name": "qwen_3_4b.safetensors", + "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors", + "directory": "text_encoders" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "qwen_3_4b.safetensors", + "lumina2", + "default" + ] + }, + { + "id": 40, + "type": "VAELoader", + "pos": [ + 159.30157212272297, + 693.9279006020886 + ], + "size": [ + 323.734375, + 111.390625 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "links": [ + 97, + 101 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "cnr_id": "comfy-core", + "ver": "0.3.73", + "models": [ + { + "name": "ae.safetensors", + "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors", + "directory": "vae" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "ae.safetensors" + ] + }, + { + "id": 42, + "type": "ConditioningZeroOut", + "pos": [ + 794.3164307166835, + 836.3052371197768 + ], + "size": [ + 236.984375, + 77.421875 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "name": "conditioning", + "type": "CONDITIONING", + "link": 36 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 64 + ] + } + ], + "properties": { + "Node name for S&R": "ConditioningZeroOut", + "cnr_id": "comfy-core", + "ver": "0.3.73", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [] + }, + { + "id": 41, + "type": "EmptySD3LatentImage", + "pos": [ + 158.31605577680375, + 848.3047505883683 + ], + "size": [ + 311.734375, + 179.390625 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [] + } + ], + "properties": { + "Node name for S&R": "EmptySD3LatentImage", + "cnr_id": "comfy-core", + "ver": "0.3.64", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + 1024, + 1024, + 1 + ] + }, + { + "id": 47, + "type": "ModelSamplingAuraFlow", + "pos": [ + 1106.844558468847, + 300.1767719883135 + ], + "size": [ + 371.875, + 111.390625 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 60 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 62 + ] + } + ], + "properties": { + "Node name for S&R": "ModelSamplingAuraFlow", + "cnr_id": "comfy-core", + "ver": "0.3.64", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + 3 + ] + }, + { + "id": 45, + "type": "CLIPTextEncode", + "pos": [ + 542.3159768994137, + 332.3053621604172 + ], + "size": [ + 491.734375, + 479.734375 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 44 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "links": [ + 36, + 63 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPTextEncode", + "cnr_id": "comfy-core", + "ver": "0.3.73", + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "Latina female with thick wavy hair, white shirt, harbor boats and pastel houses behind. Breezy seaside light, warm tones, cinematic close-up." + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 48, + "type": "LoraLoaderModelOnly", + "pos": [ + 553.9994917632011, + 133.99988695553816 + ], + "size": [ + 443.75, + 145.390625 + ], + "flags": {}, + "order": 10, + "mode": 4, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 54 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 60 + ] + } + ], + "properties": { + "Node name for S&R": "LoraLoaderModelOnly", + "cnr_id": "comfy-core", + "ver": "0.3.75", + "models": [ + { + "name": "pixel_art_style_z_image_turbo.safetensors", + "url": "https://huggingface.co/tarn59/pixel_art_style_lora_z_image_turbo/resolve/main/pixel_art_style_z_image_turbo.safetensors", + "directory": "loras" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "pixel_art_style_z_image_turbo.safetensors", + 1 + ] + }, + { + "id": 35, + "type": "MarkdownNote", + "pos": [ + -466.00011584916956, + 289.9999302108306 + ], + "size": [ + 587.734375, + 770.859375 + ], + "flags": { + "collapsed": false + }, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Model link", + "properties": {}, + "widgets_values": [ + "## Report workflow issue\n\nIf you found any issues when running this workflow, [report template issue here](https://github.com/Comfy-Org/workflow_templates/issues)\n\n\n## Model links\n\n**text_encoders**\n\n- [qwen_3_4b.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors)\n\n**loras**\n\n- [pixel_art_style_z_image_turbo.safetensors](https://huggingface.co/tarn59/pixel_art_style_lora_z_image_turbo/resolve/main/pixel_art_style_z_image_turbo.safetensors)\n\n**diffusion_models**\n\n- [z_image_turbo_bf16.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors)\n\n**vae**\n\n- [ae.safetensors](https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors)\n\n\nModel Storage Location\n\n```\n๐Ÿ“‚ ComfyUI/\nโ”œโ”€โ”€ ๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€ qwen_3_4b.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ loras/\nโ”‚ โ”‚ โ””โ”€โ”€ pixel_art_style_z_image_turbo.safetensors\nโ”‚ โ”œโ”€โ”€ ๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ””โ”€โ”€ z_image_turbo_bf16.safetensors\nโ”‚ โ””โ”€โ”€ ๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ ae.safetensors\n```\n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 56, + "type": "LanPaint_KSampler", + "pos": [ + 1280.6434468860161, + 480.42471689895115 + ], + "size": [ + 479.765625, + 887.59375 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 62 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 63 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 64 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 99 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 100 + ] + } + ], + "properties": { + "Node name for S&R": "LanPaint_KSampler", + "cnr_id": "LanPaint", + "ver": "6109df6591a4cf2bc9d3b113d03f7297fa9248e9" + }, + "widgets_values": [ + 880311146947153, + "randomize", + 9, + 1, + "euler", + "simple", + 1, + 5, + "Image First", + "LanPaint KSampler. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!", + "๐Ÿ–ผ๏ธ Image Inpainting" + ] + }, + { + "id": 57, + "type": "LoadImage", + "pos": [ + 9.292593918969033, + 1110.6054508670231 + ], + "size": [ + 328.65625, + 686.171875 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 96, + 102 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 96, + 102 + ] + } + ], + "properties": { + "Node name for S&R": "LoadImage", + "cnr_id": "comfy-core", + "ver": "0.3.59", + "ue_properties": { + "widget_ue_connectable": {}, + "version": "7.1", + "input_ue_unconnectable": {} + }, + "image": "clipspace/clipspace-painted-masked-1764827669471.png [input]" + }, + "widgets_values": [ + "Example_21_Masked.png", + "image" + ] + }, + { + "id": 61, + "type": "SaveImage", + "pos": [ + 3313.9622863771715, + 1191.2159032348995 + ], + "size": [ + 1304.078125, + 1434.015625 + ], + "flags": {}, + "order": 24, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 104 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.23" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 73, + "type": "PreviewImage", + "pos": [ + 2226.506787053337, + 107.57278250350078 + ], + "size": [ + 225, + 246 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 105 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage", + "cnr_id": "comfy-core", + "ver": "0.3.76" + }, + "widgets_values": [] + }, + { + "id": 46, + "type": "UNETLoader", + "pos": [ + 159.05646022112083, + 288.62105108441466 + ], + "size": [ + 323.734375, + 145.390625 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "links": [ + 54 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "cnr_id": "comfy-core", + "ver": "0.3.73", + "models": [ + { + "name": "z_image_turbo_bf16.safetensors", + "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/diffusion_models/z_image_turbo_bf16.safetensors", + "directory": "diffusion_models" + } + ], + "enableTabs": false, + "tabWidth": 65, + "tabXOffset": 10, + "hasSecondTab": false, + "secondTabText": "Send Back", + "secondTabOffset": 80, + "secondTabWidth": 65 + }, + "widgets_values": [ + "z_image_turbo_bf16.safetensors", + "default" + ] + }, + { + "id": 72, + "type": "Note", + "pos": [ + 1288.7909707861209, + 1503.5796522859714 + ], + "size": [ + 225, + 109.765625 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "Reshape image to suit VAE " + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 74, + "type": "LanPaint_ImageEncode", + "pos": [ + 1700, + 1660 + ], + "size": [ + 300, + 150 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 96 + }, + { + "name": "vae", + "type": "VAE", + "link": 97 + }, + { + "name": "mask", + "type": "MASK", + "link": 98 + } + ], + "outputs": [ + { + "name": "latent", + "type": "LATENT", + "links": [ + 99 + ] + } + ], + "widgets_values": [], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + } + }, + { + "id": 75, + "type": "LanPaint_ImageDecode", + "pos": [ + 2740, + 1190 + ], + "size": [ + 300, + 200 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 100 + }, + { + "name": "vae", + "type": "VAE", + "link": 101 + }, + { + "name": "image", + "type": "IMAGE", + "link": 102 + }, + { + "name": "mask", + "type": "MASK", + "link": 103 + }, + { + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + } + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 104, + 105 + ] + } + ], + "widgets_values": [ + 9 + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + } + } + ], + "links": [ + [ + 36, + 45, + 0, + 42, + 0, + "CONDITIONING" + ], + [ + 44, + 39, + 0, + 45, + 0, + "CLIP" + ], + [ + 54, + 46, + 0, + 48, + 0, + "MODEL" + ], + [ + 60, + 48, + 0, + 47, + 0, + "MODEL" + ], + [ + 62, + 47, + 0, + 56, + 0, + "MODEL" + ], + [ + 63, + 45, + 0, + 56, + 1, + "CONDITIONING" + ], + [ + 64, + 42, + 0, + 56, + 2, + "CONDITIONING" + ], + [ + 96, + 57, + 0, + 74, + 0, + "IMAGE" + ], + [ + 97, + 40, + 0, + 74, + 1, + "VAE" + ], + [ + 98, + 57, + 1, + 74, + 2, + "MASK" + ], + [ + 99, + 74, + 0, + 56, + 3, + "LATENT" + ], + [ + 100, + 56, + 0, + 75, + 0, + "LATENT" + ], + [ + 101, + 40, + 0, + 75, + 1, + "VAE" + ], + [ + 102, + 57, + 0, + 75, + 2, + "IMAGE" + ], + [ + 103, + 57, + 1, + 75, + 3, + "MASK" + ], + [ + 104, + 75, + 0, + 61, + 0, + "IMAGE" + ], + [ + 105, + 75, + 0, + 73, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 2, + "title": "Step2 - Image size", + "bounding": [ + 146, + 770, + 348, + 240 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Step3 - Prompt", + "bounding": [ + 518, + 254, + 540, + 648 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "Step1 - Load models", + "bounding": [ + 146, + 254, + 348, + 496.32 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "Ctrl-B to enable LoRA input", + "bounding": [ + 518, + 50, + 528, + 192 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.3800835362432756, + "offset": [ + -902.897494105397, + -396.4805064253962 + ] + }, + "frontendVersion": "1.33.14", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "workflowRendererVersion": "Vue" + }, + "version": 0.4 +} diff --git a/example_workflows/wan2_2_T2I_ImageEncode_Inpaint.json b/example_workflows/wan2_2_T2I_ImageEncode_Inpaint.json new file mode 100644 index 0000000..7cef851 --- /dev/null +++ b/example_workflows/wan2_2_T2I_ImageEncode_Inpaint.json @@ -0,0 +1,1318 @@ +{ + "id": "26bf2769-956f-4cee-b5f6-a57a366c9101", + "revision": 0, + "last_node_id": 85, + "last_link_id": 189, + "nodes": [ + { + "id": 56, + "type": "UNETLoader", + "pos": [ + 34.70310592651367, + 57.175601959228516 + ], + "size": [ + 346.7470703125, + 82 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 112 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors", + "directory": "diffusion_models" + } + ], + "widget_ue_connectable": {} + }, + "widgets_values": [ + "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors", + "default" + ] + }, + { + "id": 54, + "type": "ModelSamplingSD3", + "pos": [ + 640, + -70 + ], + "size": [ + 210, + 60 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 110 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 150 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "ModelSamplingSD3", + "widget_ue_connectable": {} + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 55, + "type": "ModelSamplingSD3", + "pos": [ + 640, + 60 + ], + "size": [ + 210, + 58 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 112 + } + ], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 159 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "ModelSamplingSD3", + "widget_ue_connectable": {} + }, + "widgets_values": [ + 1 + ] + }, + { + "id": 62, + "type": "MarkdownNote", + "pos": [ + -480, + -120 + ], + "size": [ + 480, + 350 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Model Links", + "properties": { + "widget_ue_connectable": {} + }, + "widgets_values": [ + "[Tutorial](https://docs.comfy.org/tutorials/video/wan/wan2_2\n) | [ๆ•™็จ‹](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2\n)\n\n**Diffusion Model**\n- [wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors)\n- [wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors)\n\n**VAE**\n- [wan_2.1_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors)\n\n**Text Encoder** \n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors)\n\n\nFile save location\n\n```\nComfyUI/\nโ”œโ”€โ”€โ”€๐Ÿ“‚ models/\nโ”‚ โ”œโ”€โ”€โ”€๐Ÿ“‚ diffusion_models/\nโ”‚ โ”‚ โ”œโ”€โ”€โ”€ wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors\nโ”‚ โ”‚ โ””โ”€โ”€โ”€ wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors\nโ”‚ โ”œโ”€โ”€โ”€๐Ÿ“‚ text_encoders/\nโ”‚ โ”‚ โ””โ”€โ”€โ”€ umt5_xxl_fp8_e4m3fn_scaled.safetensors \nโ”‚ โ””โ”€โ”€โ”€๐Ÿ“‚ vae/\nโ”‚ โ””โ”€โ”€ wan_2.1_vae.safetensors\n```\n" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 7, + "type": "CLIPTextEncode", + "pos": [ + 415.27801513671875, + 562.8309936523438 + ], + "size": [ + 425.27801513671875, + 180.6060791015625 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 75 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 152, + 161 + ] + } + ], + "title": "CLIP Text Encode (Negative Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "CLIPTextEncode", + "widget_ue_connectable": {} + }, + "widgets_values": [ + "่‰ฒ่ฐƒ่‰ณไธฝ๏ผŒ่ฟ‡ๆ›๏ผŒ้™ๆ€๏ผŒ็ป†่Š‚ๆจก็ณŠไธๆธ…๏ผŒๅญ—ๅน•๏ผŒ้ฃŽๆ ผ๏ผŒไฝœๅ“๏ผŒ็”ปไฝœ๏ผŒ็”ป้ข๏ผŒ้™ๆญข๏ผŒๆ•ดไฝ“ๅ‘็ฐ๏ผŒๆœ€ๅทฎ่ดจ้‡๏ผŒไฝŽ่ดจ้‡๏ผŒJPEGๅŽ‹็ผฉๆฎ‹็•™๏ผŒไธ‘้™‹็š„๏ผŒๆฎ‹็ผบ็š„๏ผŒๅคšไฝ™็š„ๆ‰‹ๆŒ‡๏ผŒ็”ปๅพ—ไธๅฅฝ็š„ๆ‰‹้ƒจ๏ผŒ็”ปๅพ—ไธๅฅฝ็š„่„ธ้ƒจ๏ผŒ็•ธๅฝข็š„๏ผŒๆฏๅฎน็š„๏ผŒๅฝขๆ€็•ธๅฝข็š„่‚ขไฝ“๏ผŒๆ‰‹ๆŒ‡่žๅˆ๏ผŒ้™ๆญขไธๅŠจ็š„็”ป้ข๏ผŒๆ‚ไนฑ็š„่ƒŒๆ™ฏ๏ผŒไธ‰ๆก่…ฟ๏ผŒ่ƒŒๆ™ฏไบบๅพˆๅคš๏ผŒๅ€’็€่ตฐ" + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 59, + "type": "EmptyHunyuanLatentVideo", + "pos": [ + 50, + 530 + ], + "size": [ + 315, + 130 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "slot_index": 0, + "links": [] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "EmptyHunyuanLatentVideo", + "widget_ue_connectable": {} + }, + "widgets_values": [ + 768, + 1344, + 1, + 1 + ] + }, + { + "id": 37, + "type": "UNETLoader", + "pos": [ + 34.225364685058594, + -71.77911376953125 + ], + "size": [ + 346.7470703125, + 82 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MODEL", + "type": "MODEL", + "slot_index": 0, + "links": [ + 110 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors", + "directory": "diffusion_models" + } + ], + "widget_ue_connectable": {} + }, + "widgets_values": [ + "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors", + "default" + ] + }, + { + "id": 38, + "type": "CLIPLoader", + "pos": [ + 38.86457061767578, + 189.26513671875 + ], + "size": [ + 346.391845703125, + 106 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "CLIP", + "type": "CLIP", + "slot_index": 0, + "links": [ + 74, + 75 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors", + "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors", + "directory": "text_encoders" + } + ], + "widget_ue_connectable": {} + }, + "widgets_values": [ + "umt5_xxl_fp8_e4m3fn_scaled.safetensors", + "wan", + "default" + ] + }, + { + "id": 67, + "type": "PrimitiveNode", + "pos": [ + 874.0289916992188, + 28.25248908996582 + ], + "size": [ + 312.7867736816406, + 88.04627990722656 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "widget": { + "name": "steps" + }, + "links": [ + 154, + 163 + ] + } + ], + "title": "Steps", + "properties": { + "Run widget replace on values": false, + "widget_ue_connectable": {} + }, + "widgets_values": [ + 20, + "fixed" + ] + }, + { + "id": 68, + "type": "PrimitiveNode", + "pos": [ + 881.3255615234375, + 167.12957763671875 + ], + "size": [ + 299.6272277832031, + 82 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "widget": { + "name": "end_at_step" + }, + "links": [ + 157, + 166 + ] + } + ], + "title": "Switch_step", + "properties": { + "Run widget replace on values": false, + "widget_ue_connectable": {} + }, + "widgets_values": [ + 3, + "fixed" + ] + }, + { + "id": 66, + "type": "PrimitiveNode", + "pos": [ + 869.0523071289062, + 458.133544921875 + ], + "size": [ + 302.1168212890625, + 106 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "COMBO", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "links": [ + 156, + 165 + ] + } + ], + "title": "Scheduler", + "properties": { + "Run widget replace on values": false, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "sgm_uniform", + "fixed", + "" + ] + }, + { + "id": 65, + "type": "PrimitiveNode", + "pos": [ + 871.877197265625, + 301.2847595214844 + ], + "size": [ + 304.6064453125, + 106 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "COMBO", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "links": [ + 155, + 164 + ] + } + ], + "title": "Sampler", + "properties": { + "Run widget replace on values": false, + "widget_ue_connectable": {} + }, + "widgets_values": [ + "euler", + "fixed", + "" + ] + }, + { + "id": 39, + "type": "VAELoader", + "pos": [ + 40, + 350 + ], + "size": [ + 344.731689453125, + 59.98149108886719 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "VAE", + "type": "VAE", + "slot_index": 0, + "links": [ + 182, + 186 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "wan_2.1_vae.safetensors", + "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors", + "directory": "vae" + } + ], + "widget_ue_connectable": {} + }, + "widgets_values": [ + "wan_2.1_vae.safetensors" + ] + }, + { + "id": 70, + "type": "SaveImage", + "pos": [ + 1818.5047607421875, + -71.57525634765625 + ], + "size": [ + 270, + 270 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 189 + } + ], + "outputs": [], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.59" + }, + "widgets_values": [ + "ComfyUI" + ] + }, + { + "id": 75, + "type": "LanPaint_KSamplerAdvanced", + "pos": [ + 1271.481201171875, + -503.987548828125 + ], + "size": [ + 400, + 764 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 150 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 151 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 152 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 184 + }, + { + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": 154 + }, + { + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": 155 + }, + { + "name": "scheduler", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "link": 156 + }, + { + "name": "end_at_step", + "type": "INT", + "widget": { + "name": "end_at_step" + }, + "link": 157 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 172 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "1b50a90424318a457ff32a1fd5ee8a441b768b45", + "Node name for S&R": "LanPaint_KSamplerAdvanced" + }, + "widgets_values": [ + "enable", + 310185466124726, + "randomize", + 20, + 2, + "euler", + "sgm_uniform", + 0, + 3, + "disable", + 5, + 5.0, + 0.15, + 1, + 15, + "Image First", + 1, + "LanPaint KSampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!" + ] + }, + { + "id": 63, + "type": "Note", + "pos": [ + 20, + 720 + ], + "size": [ + 370, + 120 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Video Size", + "properties": { + "widget_ue_connectable": {} + }, + "widgets_values": [ + "By default, we set the video to a smaller size for users with low VRAM. If you have enough VRAM, you can change the size" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 76, + "type": "LanPaint_KSamplerAdvanced", + "pos": [ + 1276.2220458984375, + 325.4043884277344 + ], + "size": [ + 400, + 764 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "model", + "type": "MODEL", + "link": 159 + }, + { + "name": "positive", + "type": "CONDITIONING", + "link": 160 + }, + { + "name": "negative", + "type": "CONDITIONING", + "link": 161 + }, + { + "name": "latent_image", + "type": "LATENT", + "link": 172 + }, + { + "name": "steps", + "type": "INT", + "widget": { + "name": "steps" + }, + "link": 163 + }, + { + "name": "sampler_name", + "type": "COMBO", + "widget": { + "name": "sampler_name" + }, + "link": 164 + }, + { + "name": "scheduler", + "type": "COMBO", + "widget": { + "name": "scheduler" + }, + "link": 165 + }, + { + "name": "start_at_step", + "type": "INT", + "widget": { + "name": "start_at_step" + }, + "link": 166 + } + ], + "outputs": [ + { + "name": "LATENT", + "type": "LATENT", + "links": [ + 185 + ] + } + ], + "properties": { + "cnr_id": "LanPaint", + "ver": "1b50a90424318a457ff32a1fd5ee8a441b768b45", + "Node name for S&R": "LanPaint_KSamplerAdvanced" + }, + "widgets_values": [ + "enable", + 542259685031634, + "randomize", + 20, + 2, + "euler", + "sgm_uniform", + 3, + 10000, + "disable", + 5, + 5.0, + 0.15, + 1, + 15, + "Image First", + 1, + "LanPaint KSampler Adv. For more info, visit https://github.com/scraed/LanPaint. If you find it useful, please give a star โญ๏ธ!" + ] + }, + { + "id": 82, + "type": "Note", + "pos": [ + 1722.8084716796875, + -428.4427185058594 + ], + "size": [ + 370, + 120 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Acceleration tip", + "properties": { + "widget_ue_connectable": {} + }, + "widgets_values": [ + "Reduce LanPaint NumSteps for faster generation!" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 83, + "type": "Note", + "pos": [ + 1736.30029296875, + 592.1900024414062 + ], + "size": [ + 370, + 120 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Acceleration tip", + "properties": { + "widget_ue_connectable": {} + }, + "widgets_values": [ + "Increase LanPaint Early Stop for faster generation!" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 6, + "type": "CLIPTextEncode", + "pos": [ + 420, + 280 + ], + "size": [ + 425.4649963378906, + 225.1785888671875 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [ + { + "name": "clip", + "type": "CLIP", + "link": 74 + } + ], + "outputs": [ + { + "name": "CONDITIONING", + "type": "CONDITIONING", + "slot_index": 0, + "links": [ + 151, + 160 + ] + } + ], + "title": "CLIP Text Encode (Positive Prompt)", + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.45", + "Node name for S&R": "CLIPTextEncode", + "widget_ue_connectable": {} + }, + "widgets_values": [ + "Close up Portrait of a futuristic cowgirl wearing jeans rides a mechanical horse across a vast cyberpunk desert. The dunes shimmer with holographic projections, glowing in blues and purples. cacti and two massive moons hang low on the horizon, illuminating the dusty air. Cyberpunk western fusion, cinematic, 8K, highly detailed, atmospheric perspective, Blade Runner style." + ], + "color": "#232", + "bgcolor": "#353" + }, + { + "id": 69, + "type": "LoadImage", + "pos": [ + 38.325469970703125, + 964.1947021484375 + ], + "size": [ + 274.080078125, + 314 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 181, + 187 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": [ + 181, + 187 + ] + } + ], + "properties": { + "cnr_id": "comfy-core", + "ver": "0.3.59", + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "Masked_Load_Me_in_Loader (8).png", + "image" + ] + }, + { + "id": 84, + "type": "LanPaint_ImageEncode", + "pos": [ + 386, + 924 + ], + "size": [ + 300, + 150 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 181 + }, + { + "name": "vae", + "type": "VAE", + "link": 182 + }, + { + "name": "mask", + "type": "MASK", + "link": 183 + } + ], + "outputs": [ + { + "name": "latent", + "type": "LATENT", + "links": [ + 184 + ] + } + ], + "widgets_values": [], + "properties": { + "Node name for S&R": "LanPaint_ImageEncode", + "cnr_id": "LanPaint" + } + }, + { + "id": 85, + "type": "LanPaint_ImageDecode", + "pos": [ + 1818, + -75 + ], + "size": [ + 300, + 200 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [ + { + "name": "samples", + "type": "LATENT", + "link": 185 + }, + { + "name": "vae", + "type": "VAE", + "link": 186 + }, + { + "name": "image", + "type": "IMAGE", + "link": 187 + }, + { + "name": "mask", + "type": "MASK", + "link": 188 + }, + { + "name": "blend_overlap", + "type": "INT", + "widget": { + "name": "blend_overlap" + } + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 189 + ] + } + ], + "widgets_values": [ + 9 + ], + "properties": { + "Node name for S&R": "LanPaint_ImageDecode", + "cnr_id": "LanPaint" + } + } + ], + "links": [ + [ + 74, + 38, + 0, + 6, + 0, + "CLIP" + ], + [ + 75, + 38, + 0, + 7, + 0, + "CLIP" + ], + [ + 110, + 37, + 0, + 54, + 0, + "MODEL" + ], + [ + 112, + 56, + 0, + 55, + 0, + "MODEL" + ], + [ + 150, + 54, + 0, + 75, + 0, + "MODEL" + ], + [ + 151, + 6, + 0, + 75, + 1, + "CONDITIONING" + ], + [ + 152, + 7, + 0, + 75, + 2, + "CONDITIONING" + ], + [ + 154, + 67, + 0, + 75, + 4, + "INT" + ], + [ + 155, + 65, + 0, + 75, + 5, + "COMBO" + ], + [ + 156, + 66, + 0, + 75, + 6, + "COMBO" + ], + [ + 157, + 68, + 0, + 75, + 7, + "INT" + ], + [ + 159, + 55, + 0, + 76, + 0, + "MODEL" + ], + [ + 160, + 6, + 0, + 76, + 1, + "CONDITIONING" + ], + [ + 161, + 7, + 0, + 76, + 2, + "CONDITIONING" + ], + [ + 163, + 67, + 0, + 76, + 4, + "INT" + ], + [ + 164, + 65, + 0, + 76, + 5, + "COMBO" + ], + [ + 165, + 66, + 0, + 76, + 6, + "COMBO" + ], + [ + 166, + 68, + 0, + 76, + 7, + "INT" + ], + [ + 172, + 75, + 0, + 76, + 3, + "LATENT" + ], + [ + 181, + 69, + 0, + 84, + 0, + "IMAGE" + ], + [ + 182, + 39, + 0, + 84, + 1, + "VAE" + ], + [ + 183, + 69, + 1, + 84, + 2, + "MASK" + ], + [ + 184, + 84, + 0, + 75, + 3, + "LATENT" + ], + [ + 185, + 76, + 0, + 85, + 0, + "LATENT" + ], + [ + 186, + 39, + 0, + 85, + 1, + "VAE" + ], + [ + 187, + 69, + 0, + 85, + 2, + "IMAGE" + ], + [ + 188, + 69, + 1, + 85, + 3, + "MASK" + ], + [ + 189, + 85, + 0, + 70, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 1, + "title": "Step1 - Load models", + "bounding": [ + 20, + -150, + 371.0310363769531, + 571.3974609375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Step 1: Image size", + "bounding": [ + 20, + 450, + 367.5572814941406, + 222.82713317871094 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "Step3 Prompt", + "bounding": [ + 410, + 210, + 445.27801513671875, + 464.2060852050781 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.4241196229884343, + "offset": [ + 228.44262760495175, + 461.85293161095177 + ] + }, + "frontendVersion": "1.25.11", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ue_links": [], + "links_added_by_ue": [] + }, + "version": 0.4 +} diff --git a/examples/Example_29/Masked_LoadMe.mp4 b/examples/Example_29/Masked_LoadMe.mp4 new file mode 100644 index 0000000..1bbf064 Binary files /dev/null and b/examples/Example_29/Masked_LoadMe.mp4 differ diff --git a/src/LanPaint/nodes.py b/src/LanPaint/nodes.py index e8e46d1..c5fec8d 100644 --- a/src/LanPaint/nodes.py +++ b/src/LanPaint/nodes.py @@ -865,7 +865,7 @@ class LanPaint_VideoMaskEditor: files = [] return { "required": { - "video": (files, {"image_upload": True, "tooltip": "Source video file. Returned as the video output and used by the mask editor preview."}), + "video": (files, {"video_upload": True, "tooltip": "Source video file. Returned as the video output and used by the mask editor preview."}), "keyframes": ("STRING", {"default": "{}", "multiline": True, "tooltip": "Hidden: keyframe mask files {\"frame\": \"file.png\"}. Written by the mask editor."}), "audio_mask": ("STRING", {"default": "[]", "multiline": True, "tooltip": "Hidden: audio inpainting intervals [{\"start\": s, \"end\": e}] in seconds. Written by the mask editor."}), }, @@ -1170,8 +1170,11 @@ class LanPaint_ImageEncode: Replaces the chain VAEEncode -> SetLatentNoiseMask (plus the manual ImageScale of the mask) with one node. The mask is snapped to the latent's actual spatial size (nearest-exact, the LanPaint mask convention), so - whatever the VAE's padding does, the mask always matches. Without a mask - this is a plain encode. + whatever the VAE's padding does, the mask always matches. Works with + image VAEs (4D latent) and video VAEs encoding a single image (5D latent + [B, C, T, H, W], e.g. the Hunyuan video VAE): the mask is attached as + [1, 1, T, H, W] and the sampler's prep handles it. Without a mask this is + a plain encode. """ @classmethod @@ -1194,10 +1197,10 @@ class LanPaint_ImageEncode: def encode(self, image, vae, mask=None): z = vae.encode(image) - if len(z.shape) != 4: + ndim = len(z.shape) + if ndim not in (4, 5): raise ValueError( - "LanPaint_ImageEncode expects an image VAE (latent [B, C, H, W]); " - f"got a {len(z.shape)}D latent โ€” use LanPaint_AVEncode for video." + f"LanPaint_ImageEncode expects a 4D or 5D latent, got {ndim}D" ) latent = {"samples": z} if mask is not None: @@ -1206,12 +1209,20 @@ class LanPaint_ImageEncode: m = m[0, 0] elif m.ndim == 3: m = m[0] - target = z.shape[-2:] - if tuple(m.shape) != target: - m = torch.nn.functional.interpolate( - m.unsqueeze(0).unsqueeze(0), size=target, mode="nearest-exact" - )[0, 0] - latent["noise_mask"] = m.unsqueeze(0).unsqueeze(0) + if ndim == 4: + target = z.shape[-2:] + if tuple(m.shape) != target: + m = torch.nn.functional.interpolate( + m.unsqueeze(0).unsqueeze(0), size=target, mode="nearest-exact" + )[0, 0] + latent["noise_mask"] = m.unsqueeze(0).unsqueeze(0) + else: # 5D video-style VAE: snap to (T, H, W), one mask frame per token + t, h, w = z.shape[-3:] + if tuple(m.shape) != (h, w): + m = torch.nn.functional.interpolate( + m.unsqueeze(0).unsqueeze(0), size=(h, w), mode="nearest-exact" + )[0, 0] + latent["noise_mask"] = m.unsqueeze(0).unsqueeze(0).unsqueeze(2).expand(1, 1, t, h, w) return (latent,) diff --git a/src/LanPaint/videometa.py b/src/LanPaint/videometa.py new file mode 100644 index 0000000..9c2b3a8 --- /dev/null +++ b/src/LanPaint/videometa.py @@ -0,0 +1,291 @@ +"""Read and write LanPaint mask metadata in MP4 files via PyAV. + +The metadata tag ``lanpaint-mask`` holds a UTF-8 JSON payload: +{ + "version": 1, + "video": "", + "fps": , + "keyframes": {"": "", ...}, + "audio_intervals": [{"start": , "end": }, ...] +} + +Keyframes are base64-encoded PNG masks (RGBA, alpha = mask). +"No mask" = tag absent (None); "empty mask" = tag present with ``{}`` keyframes. + +PyAV is import-guarded: the module-level ``av`` is ``None`` when PyAV is +unavailable, and the read/write functions raise ``RuntimeError`` in that case. +""" + +import json +import os +from typing import Any, Dict, Optional + +try: + import av + + _HAS_AV = True +except ImportError: + av = None # type: ignore[assignment] + _HAS_AV = False + + +# --------------------------------------------------------------------------- +# Payload helpers +# --------------------------------------------------------------------------- + +_METADATA_KEY = "lanpaint-mask" +_PAYLOAD_VERSION = 1 + + +def encode_payload(payload: dict) -> str: + """Encode a payload dict as a compact JSON string (UTF-8).""" + return json.dumps(payload, ensure_ascii=False, separators=(",", ":")) + + +def decode_payload(raw: Optional[str]) -> Optional[dict]: + """Decode a metadata value to a payload dict, or None on any error. + + ``raw`` may be ``None`` (tag absent), a JSON string, or something + unexpected. Malformed / missing input returns ``None`` gracefully. + """ + if raw is None: + return None + if not isinstance(raw, str): + return None + try: + data = json.loads(raw) + except (TypeError, ValueError): + return None + if not isinstance(data, dict): + return None + return data + + +# --------------------------------------------------------------------------- +# Core read / write +# --------------------------------------------------------------------------- + + +def read_mask_metadata(path: str) -> Optional[dict]: + """Read the ``lanpaint-mask`` metadata tag from an MP4 file. + + Returns the decoded payload dict, or ``None`` when the tag is absent or + PyAV is unavailable. + """ + if not _HAS_AV: + raise RuntimeError( + "PyAV (av) is required to read mask metadata but is not installed" + ) + with av.open(path, "r") as container: + raw = container.metadata.get(_METADATA_KEY, None) + return decode_payload(raw) + + +def write_mask_metadata( + input_path: str, + output_path: str, + payload: dict, +) -> None: + """Remux *input_path* to *output_path*, attaching a ``lanpaint-mask`` + metadata tag. + + The video track is stream-copied (no re-encode) so the video content is + preserved byte-for-byte. Audio and other tracks are also preserved. + + The source file at *input_path* is **never** modified. + + Raises ``RuntimeError`` when PyAV is unavailable. + """ + if not _HAS_AV: + raise RuntimeError( + "PyAV (av) is required to write mask metadata but is not installed" + ) + + json_str = encode_payload(payload) + + with av.open(input_path, "r") as in_container: + # ``movflags=use_metadata_tags`` is MANDATORY โ€” without it ffmpeg + # silently drops custom metadata keys from the output. + with av.open( + output_path, + "w", + format="mp4", + options={"movflags": "use_metadata_tags"}, + ) as out_container: + # Copy any existing metadata (except our own key) from the source. + for key, value in in_container.metadata.items(): + if key != _METADATA_KEY: + out_container.metadata[key] = value + + # Write the LanPaint payload. + out_container.metadata[_METADATA_KEY] = json_str + + # Stream-copy every stream from the source. + stream_map: Dict[int, Any] = {} + for in_stream in in_container.streams: + out_stream = out_container.add_stream_from_template(in_stream) + stream_map[in_stream.index] = out_stream + + # Demux โ†’ mux every packet. + for packet in in_container.demux(): + if packet.dts is None: + continue + out_stream = stream_map[packet.stream.index] + packet.stream = out_stream + out_container.mux(packet) + + # The caller is responsible for the output file on disk. + + +# --------------------------------------------------------------------------- +# Helpers for server routes +# --------------------------------------------------------------------------- + + +def _unique_output_path(input_dir: str, base_name: str) -> str: + """Return a non-clobbering output filename in *input_dir*. + + Appends ``_masked``, then ``_masked_2``, ``_masked_3``, ... until a name + that does not already exist is found. + + Returns the bare filename (not the full path). + """ + stem, ext = os.path.splitext(base_name) + candidate = f"{stem}_masked{ext}" + if not os.path.exists(os.path.join(input_dir, candidate)): + return candidate + n = 2 + while True: + candidate = f"{stem}_masked_{n}{ext}" + if not os.path.exists(os.path.join(input_dir, candidate)): + return candidate + n += 1 + + +def export_mask_video_from_request( + input_dir: str, + filename: str, + keyframes: dict, + audio_intervals: list, + fps: float, +) -> str: + """Remux a source video with mask metadata, returning the new filename. + + Parameters + ---------- + input_dir: + The ComfyUI input directory (``folder_paths.get_input_directory()``). + filename: + The source video filename (relative to *input_dir*). + keyframes: + Dict of ``{frame_idx: base64_png_string}``. + audio_intervals: + List of ``{"start": float, "end": float}`` dicts. + fps: + The video frame rate. + + Returns + ------- + The bare filename of the exported MP4 (in *input_dir*). + """ + payload: Dict[str, Any] = { + "version": _PAYLOAD_VERSION, + "video": filename, + "fps": fps, + "keyframes": keyframes, + "audio_intervals": audio_intervals, + } + + src = os.path.join(input_dir, filename) + if not os.path.isfile(src): + raise FileNotFoundError(f"source video not found: {src}") + + out_name = _unique_output_path(input_dir, filename) + out_path = os.path.join(input_dir, out_name) + write_mask_metadata(src, out_path, payload) + return out_name + + +def register_routes(server) -> None: + """Register the LanPaint video-mask metadata routes on a ComfyUI + PromptServer instance. + + Call this from ``__init__.py`` when running inside ComfyUI (the ``server`` + module is only importable in that environment). Safe to call multiple + times โ€” routes are registered once. + """ + import aiohttp + import folder_paths + + @server.routes.get("/lanpaint/video_mask_meta") + async def video_mask_meta(request: aiohttp.web.Request) -> aiohttp.web.Response: + filename = request.query.get("filename", "") + if not filename: + return aiohttp.web.json_response({"found": False}) + + input_dir = folder_paths.get_input_directory() + path = os.path.join(input_dir, filename) + if not os.path.isfile(path): + return aiohttp.web.json_response({"found": False}) + + try: + payload = read_mask_metadata(path) + except Exception: + payload = None + + if payload is None: + return aiohttp.web.json_response({"found": False}) + return aiohttp.web.json_response({"found": True, "payload": payload}) + + @server.routes.post("/lanpaint/export_mask_video") + async def export_mask_video(request: aiohttp.web.Request) -> aiohttp.web.Response: + try: + body = await request.json() + except Exception: + return aiohttp.web.json_response( + {"error": "invalid JSON body"}, status=400 + ) + + filename = body.get("filename", "") + if not filename: + return aiohttp.web.json_response( + {"error": "missing filename"}, status=400 + ) + + keyframes = body.get("keyframes", {}) + if not isinstance(keyframes, dict): + return aiohttp.web.json_response( + {"error": "keyframes must be a dict"}, status=400 + ) + + audio_intervals = body.get("audio_intervals", []) + if not isinstance(audio_intervals, list): + return aiohttp.web.json_response( + {"error": "audio_intervals must be a list"}, status=400 + ) + + fps = body.get("fps", 30.0) + try: + fps = float(fps) + except (TypeError, ValueError): + return aiohttp.web.json_response( + {"error": "fps must be a number"}, status=400 + ) + + input_dir = folder_paths.get_input_directory() + try: + out_name = export_mask_video_from_request( + input_dir, filename, keyframes, audio_intervals, fps + ) + except FileNotFoundError as e: + return aiohttp.web.json_response({"error": str(e)}, status=404) + except RuntimeError as e: + return aiohttp.web.json_response({"error": str(e)}, status=500) + except Exception as e: + return aiohttp.web.json_response( + {"error": f"export failed: {e}"}, status=500 + ) + + return aiohttp.web.json_response( + {"filename": out_name, "path": os.path.join(input_dir, out_name)} + ) diff --git a/tests/test_videomask.py b/tests/test_videomask.py index 046b0b9..1ca30d4 100644 --- a/tests/test_videomask.py +++ b/tests/test_videomask.py @@ -928,7 +928,10 @@ def test_merge_audio_resamples_to_original_rate(monkeypatch, tmp_path) -> None: am = torch.ones(8) out = nodes.merge_audio_with_mask(orig, inp, am, 0.0, 32000, 24000) assert out.shape == (1, 2, 32000) # at the original sample rate - assert (out == 1.0).all() # fully masked: everything from the inpainted track + # fully masked: everything from the inpainted track. torchaudio's + # resampler rings at the signal edges (a constant signal is a step at the + # boundary), so assert the interior is exactly the inpainted track. + assert torch.allclose(out[..., 512:-512], torch.ones_like(out[..., 512:-512]), atol=1e-3) def test_scipy_edt_matches_python_fallback(monkeypatch) -> None: @@ -1043,15 +1046,21 @@ def test_image_encode_accepts_3d_and_4d_masks(monkeypatch, tmp_path) -> None: assert torch.equal(l1["noise_mask"], l3["noise_mask"]) -def test_image_encode_rejects_video_latent(monkeypatch, tmp_path) -> None: +def test_image_encode_accepts_video_vae_latent(monkeypatch, tmp_path) -> None: nodes = _import_nodes(monkeypatch, tmp_path) class VideoVAE: def encode(self, x): - return torch.zeros(1, 24, 2, 2, 3) # 5D: video VAE + return torch.zeros(1, 24, 2, 2, 3) # 5D [B, C, T, H, W]: video VAE - with pytest.raises(ValueError, match="AVEncode"): - nodes.LanPaint_ImageEncode().encode(torch.zeros(1, 16, 24, 3), VideoVAE()) + mask = torch.zeros(16, 24) + mask[8:, 12:] = 1.0 + latent = nodes.LanPaint_ImageEncode().encode( + torch.zeros(1, 16, 24, 3), VideoVAE(), mask)[0] + # the mask rides as [1, 1, T, H, W], snapped to the latent spatial size + assert latent["noise_mask"].shape == (1, 1, 2, 2, 3) + assert latent["noise_mask"][0, 0, 1, 1, 1] == 1.0 + assert latent["noise_mask"][0, 0, 0, 0, 0] == 0.0 def test_image_decode_resizes_and_merges(monkeypatch, tmp_path) -> None: diff --git a/tests/test_videometa.py b/tests/test_videometa.py new file mode 100644 index 0000000..d10501b --- /dev/null +++ b/tests/test_videometa.py @@ -0,0 +1,349 @@ +"""Tests for the LanPaint video mask metadata read/write (videometa module). + +Requires PyAV. All tests are skipped gracefully when PyAV is unavailable, +which is the case in CI environments (e.g., the system Python at C:\\Python314 +does not have av installed, while the ComfyUI venv at E:\\ComfyUI\\.venv does). +""" + +import os +import sys +import tempfile + +import pytest + +# Ensure the project root is on sys.path (tests may be run from any CWD). +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) + +try: + import av + import numpy as np + + HAVE_AV = True +except ImportError: + av = None # type: ignore[assignment] + np = None # type: ignore[assignment] + HAVE_AV = False + +pytestmark = pytest.mark.skipif(not HAVE_AV, reason="PyAV (av) not available") + +if HAVE_AV: + from src.LanPaint.videometa import ( + decode_payload, + encode_payload, + export_mask_video_from_request, + read_mask_metadata, + write_mask_metadata, + ) + +# --------------------------------------------------------------------------- +# Helpers +# --------------------------------------------------------------------------- + +if HAVE_AV: + + def _make_test_mp4(path: str, duration_frames: int = 10, fps: int = 10) -> None: + """Create a tiny colour-bar MP4 via PyAV (no external tool required). + + The video is 32x24 pixels, RGB frames encoded with libx264. + """ + container = av.open(path, "w", format="mp4") + stream = container.add_stream("libx264", rate=fps) + stream.width = 32 + stream.height = 24 + stream.pix_fmt = "yuv420p" + for i in range(duration_frames): + # simple colour bar: red channel varies per frame + arr = np.zeros((24, 32, 3), dtype=np.uint8) + r = (i * 25) % 256 + for py in range(24): + for px in range(32): + arr[py, px] = [r, (px * 8) % 256, (py * 10) % 256] + frame = av.VideoFrame.from_ndarray(arr, format="rgb24") + for packet in stream.encode(frame): + container.mux(packet) + for packet in stream.encode(): + container.mux(packet) + container.close() + + +# --------------------------------------------------------------------------- +# Payload encode / decode +# --------------------------------------------------------------------------- + + +class TestPayloadCodec: + def test_roundtrip_simple(self) -> None: + payload = { + "version": 1, + "video": "test.mp4", + "fps": 30.0, + "keyframes": {"0": "iVBORw0KGgoAAAA="}, + "audio_intervals": [{"start": 1.0, "end": 2.5}], + } + encoded = encode_payload(payload) + assert isinstance(encoded, str) + decoded = decode_payload(encoded) + assert decoded == payload + + def test_roundtrip_unicode(self) -> None: + payload = { + "version": 1, + "video": "ใƒ†ใ‚นใƒˆๅ‹•็”ป.mp4", + "fps": 24.0, + "keyframes": { + "0": "iVBORw0KGgoAAAA=", + "12": "iVBORw0KGgoAAAANSUhEUg==", + }, + "audio_intervals": [ + {"start": 0.5, "end": 1.25}, + {"start": 3.0, "end": 4.75}, + ], + } + encoded = encode_payload(payload) + decoded = decode_payload(encoded) + assert decoded == payload + + def test_empty_keyframes(self) -> None: + payload = { + "version": 1, + "video": "no_mask.mp4", + "fps": 30.0, + "keyframes": {}, + "audio_intervals": [], + } + encoded = encode_payload(payload) + decoded = decode_payload(encoded) + assert decoded == payload + + def test_decode_none(self) -> None: + assert decode_payload(None) is None + + def test_decode_garbage(self) -> None: + assert decode_payload("not json") is None + assert decode_payload(42) is None # type: ignore[arg-type] + assert decode_payload("[]") is None # valid JSON but not a dict + + def test_decode_missing_keyframes_ok(self) -> None: + # payloads missing optional fields still decode + assert decode_payload('{"version":1,"video":"v.mp4"}') == { + "version": 1, + "video": "v.mp4", + } + + +# --------------------------------------------------------------------------- +# Read / write round-trip +# --------------------------------------------------------------------------- + + +class TestWriteRead: + def test_roundtrip_with_keyframes(self) -> None: + payload = { + "version": 1, + "video": "src.mp4", + "fps": 30.0, + "keyframes": { + "0": "iVBORw0KGgoAAAA=", + "5": "iVBORw0KGgoAAAANSUhEUg==", + }, + "audio_intervals": [{"start": 1.0, "end": 3.0}], + } + with tempfile.TemporaryDirectory() as td: + src = os.path.join(td, "src.mp4") + dst = os.path.join(td, "out.mp4") + _make_test_mp4(src, duration_frames=10, fps=30) + write_mask_metadata(src, dst, payload) + assert os.path.isfile(dst) + read_back = read_mask_metadata(dst) + assert read_back == payload + + def test_tag_absent_on_plain_mp4(self) -> None: + with tempfile.TemporaryDirectory() as td: + src = os.path.join(td, "plain.mp4") + _make_test_mp4(src) + result = read_mask_metadata(src) + assert result is None + + def test_source_is_never_modified(self) -> None: + payload = { + "version": 1, + "video": "src.mp4", + "fps": 25.0, + "keyframes": {}, + "audio_intervals": [], + } + with tempfile.TemporaryDirectory() as td: + src = os.path.join(td, "src.mp4") + dst = os.path.join(td, "out.mp4") + _make_test_mp4(src, duration_frames=5, fps=25) + + # hash the source bytes before writing + src_bytes_before = open(src, "rb").read() + write_mask_metadata(src, dst, payload) + src_bytes_after = open(src, "rb").read() + assert src_bytes_before == src_bytes_after, ( + "write_mask_metadata modified the source file" + ) + + def test_unicode_in_keyframe_data(self) -> None: + # base64 strings can contain unicode context; metadata values are + # UTF-8 โ€• ensure round-trip with non-ASCII frame indices works. + payload = { + "version": 1, + "video": "ะฒะธะดะตะพ.mp4", + "fps": 24.0, + "keyframes": {"0": "iVBORw0KGgoAAAA="}, + "audio_intervals": [], + } + with tempfile.TemporaryDirectory() as td: + src = os.path.join(td, "src.mp4") + dst = os.path.join(td, "out.mp4") + _make_test_mp4(src, duration_frames=6, fps=24) + write_mask_metadata(src, dst, payload) + result = read_mask_metadata(dst) + assert result is not None + assert result["video"] == "ะฒะธะดะตะพ.mp4" + + +# --------------------------------------------------------------------------- +# Filename suffixing (non-clobber) +# --------------------------------------------------------------------------- + + +class TestExportMaskVideo: + def test_basic_export(self) -> None: + with tempfile.TemporaryDirectory() as td: + src_name = "video.mp4" + src = os.path.join(td, src_name) + _make_test_mp4(src, duration_frames=10, fps=30) + out_name = export_mask_video_from_request( + input_dir=td, + filename=src_name, + keyframes={"0": "abc123"}, + audio_intervals=[{"start": 0.0, "end": 2.0}], + fps=30.0, + ) + assert out_name == "video_masked.mp4" + assert os.path.isfile(os.path.join(td, out_name)) + + def test_suffix_when_target_exists(self) -> None: + with tempfile.TemporaryDirectory() as td: + src_name = "video.mp4" + src = os.path.join(td, src_name) + _make_test_mp4(src, duration_frames=5, fps=25) + + # Create a fake collision file + with open(os.path.join(td, "video_masked.mp4"), "wb") as f: + f.write(b"not an mp4") + + out_name = export_mask_video_from_request( + input_dir=td, + filename=src_name, + keyframes={}, + audio_intervals=[], + fps=25.0, + ) + assert out_name == "video_masked_2.mp4" + assert os.path.isfile(os.path.join(td, out_name)) + + def test_multiple_suffixes(self) -> None: + with tempfile.TemporaryDirectory() as td: + src_name = "video.mp4" + src = os.path.join(td, src_name) + _make_test_mp4(src, duration_frames=5, fps=25) + # create several collisions + for name in ("video_masked.mp4", "video_masked_2.mp4", "video_masked_3.mp4"): + with open(os.path.join(td, name), "wb") as f: + f.write(b"not an mp4") + + out_name = export_mask_video_from_request( + input_dir=td, + filename=src_name, + keyframes={}, + audio_intervals=[], + fps=25.0, + ) + assert out_name == "video_masked_4.mp4" + + def test_source_not_found(self) -> None: + with tempfile.TemporaryDirectory() as td: + with pytest.raises(FileNotFoundError): + export_mask_video_from_request( + input_dir=td, + filename="nonexistent.mp4", + keyframes={}, + audio_intervals=[], + fps=30.0, + ) + + def test_payload_fidelity(self) -> None: + """The exported file must carry the exact payload that was given.""" + payload_kf = {"0": "iVBORw0KGgoAAAA=", "7": "/9j/4AAQSkZJRgABAQ=="} + payload_ai = [ + {"start": 0.5, "end": 1.0}, + {"start": 3.25, "end": 5.75}, + ] + with tempfile.TemporaryDirectory() as td: + src_name = "vid.mp4" + _make_test_mp4(os.path.join(td, src_name), duration_frames=10, fps=30) + out_name = export_mask_video_from_request( + input_dir=td, + filename=src_name, + keyframes=payload_kf, + audio_intervals=payload_ai, + fps=30.0, + ) + payload = read_mask_metadata(os.path.join(td, out_name)) + assert payload is not None + assert payload["version"] == 1 + assert payload["video"] == src_name + assert payload["fps"] == 30.0 + assert payload["keyframes"] == payload_kf + assert payload["audio_intervals"] == payload_ai + + +# --------------------------------------------------------------------------- +# Metadata coexistence +# --------------------------------------------------------------------------- + + +class TestMetadataCoexistence: + def test_preexisting_metadata_is_preserved(self) -> None: + """When the source MP4 already has metadata (e.g., title), it survives.""" + with tempfile.TemporaryDirectory() as td: + src = os.path.join(td, "labelled.mp4") + # Create with a metadata tag + container = av.open(src, "w", format="mp4") + container.metadata["title"] = "Original Title" + container.metadata["comment"] = "Should survive" + stream = container.add_stream("libx264", rate=10) + stream.width = 32 + stream.height = 24 + stream.pix_fmt = "yuv420p" + frame = av.VideoFrame.from_ndarray( + np.zeros((24, 32, 3), dtype=np.uint8), format="rgb24" + ) + for pkt in stream.encode(frame): + container.mux(pkt) + for pkt in stream.encode(): + container.mux(pkt) + container.close() + + dst = os.path.join(td, "labelled_masked.mp4") + payload = { + "version": 1, + "video": "labelled.mp4", + "fps": 10.0, + "keyframes": {}, + "audio_intervals": [], + } + write_mask_metadata(src, dst, payload) + + result = read_mask_metadata(dst) + assert result == payload + + # Verify original metadata survived + container2 = av.open(dst, "r") + assert container2.metadata.get("title") == "Original Title" + assert container2.metadata.get("comment") == "Should survive" + container2.close() diff --git a/web/lanpaint_video_mask_editor.js b/web/lanpaint_video_mask_editor.js index 09955f6..efcc173 100644 --- a/web/lanpaint_video_mask_editor.js +++ b/web/lanpaint_video_mask_editor.js @@ -345,6 +345,7 @@ class VideoMaskEditor { this.peaks = null; // decoded waveform peaks this.waveCanvas = null; this.waveDrag = null; // {start, end} while dragging a new interval + this._maskVideo = null; // last video for which masks were auto-loaded } /* ---------------- lifecycle ---------------- */ @@ -369,7 +370,9 @@ class VideoMaskEditor { try { await this._loadVideo(filename); - await this._loadSavedKeyframes(); + if (!this._metaLoaded) { + await this._loadSavedKeyframes(); + } this.peaks = await loadAudioPeaks(this.video.currentSrc); this._loadAudioIntervals(); await this.showFrame(0); @@ -517,6 +520,114 @@ class VideoMaskEditor { video.pause(); this.fps = await measureVideoFps(video); this.frameCount = Math.max(1, Math.round(video.duration * this.fps)); + this._metaLoaded = await this._autoLoadMaskMeta(filename); + } + + /** + * Fetch `/lanpaint/video_mask_meta` for the video and, if metadata is + * present, upload the base64 keyframes as PNGs and populate the timeline + * and widget. Returns true when metadata was found and loaded. + */ + async _autoLoadMaskMeta(filename) { + try { + const url = + api.apiURL( + "/lanpaint/video_mask_meta?filename=" + encodeURIComponent(filename) + ) + "&rand=" + Math.random(); + const resp = await fetch(url); + if (!resp.ok) throw new Error("HTTP " + resp.status); + const json = await resp.json(); + if (!json.found || !json.payload) { + // the video carries no mask metadata: the workflow's masks are + // meaningless for it, so clear them (the video is the source + // of truth for masks) + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + this.undo.clear(); + this.audioIntervals = []; + const kw = this.getKeyframesWidget(); + if (kw) kw.value = "{}"; + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = "[]"; + return false; + } + const payload = json.payload; + // clear existing keyframes (the metadata is the source of truth) + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + this.undo.clear(); + + const keyframeData = payload.keyframes || {}; + const filenames = {}; + const stamp = Date.now(); + for (const [idxStr, b64png] of Object.entries(keyframeData)) { + const idx = parseInt(idxStr, 10); + if (isNaN(idx) || idx < 0 || idx >= this.frameCount) continue; + try { + const img = await new Promise((resolve, reject) => { + const im = new Image(); + im.onload = () => resolve(im); + im.onerror = () => reject(new Error("decode failed")); + im.src = "data:image/png;base64," + b64png; + }); + const c = this.timeline.newMaskCanvas(); + c.getContext("2d").drawImage(img, 0, 0, c.width, c.height); + this.timeline.setKeyframe(idx, c); + + // upload so the widget stores a server filename + const blob = await new Promise((r) => c.toBlob(r, "image/png")); + if (!blob) continue; + const name = "lanpaint_kf_" + stamp + "_" + idx + ".png"; + const fd = new FormData(); + fd.append("image", blob, name); + fd.append("type", "input"); + const upResp = await api.fetchApi("/upload/image", { + method: "POST", + body: fd, + }); + if (!upResp.ok) continue; + const upData = await upResp.json(); + filenames[idx] = upData.name; + } catch (e) { + console.warn("[LanPaint] auto-load keyframe decode failed:", e); + } + } + + const kw = this.getKeyframesWidget(); + if (kw) kw.value = JSON.stringify(filenames); + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = JSON.stringify(payload.audio_intervals || "[]"); + this._loadAudioIntervals(); + this._maskVideo = filename; + + // keep widget_values in sync + if (this.node.widgets_values && this.node.widgets) { + for (const ww of [kw, aw]) { + if (!ww) continue; + const wi = this.node.widgets.indexOf(ww); + if (wi >= 0) this.node.widgets_values[wi] = ww.value; + } + } + + console.log( + "[LanPaint VideoMaskEditor] auto-loaded", + Object.keys(filenames).length, + "keyframes from mp4 metadata" + ); + return true; + } catch (err) { + console.warn("[LanPaint] video_mask_meta fetch failed:", err); + // no metadata could be read: treat like not-found and clear + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + this.undo.clear(); + this.audioIntervals = []; + const kw = this.getKeyframesWidget(); + if (kw) kw.value = "{}"; + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = "[]"; + return false; + } } /** Canvas for frame `index` (cached, LRU). */ @@ -690,6 +801,93 @@ class VideoMaskEditor { } } + async _exportMaskVideo() { + const filename = this.getVideoFilename(); + if (!filename) { + alert("No video file selected."); + return; + } + if (this.timeline.keyframes.size === 0 && this.audioIntervals.length === 0) { + alert("No keyframes or audio intervals to export."); + return; + } + try { + const keyframes = {}; + for (const [idx, canvas] of this.timeline.keyframes) { + keyframes[idx] = canvas + .toDataURL("image/png") + .replace(/^data:image\/png;base64,/, ""); + } + const body = { + filename: filename, + keyframes: keyframes, + audio_intervals: this.audioIntervals, + fps: this.fps, + }; + const resp = await api.fetchApi("/lanpaint/export_mask_video", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify(body), + }); + if (!resp.ok) { + const text = await resp.text().catch(() => ""); + throw new Error("Export failed (" + resp.status + "): " + text); + } + const result = await resp.json(); + this._maskVideo = filename; + // offer a native save dialog (choose location + name) when available; + // the input/ copy from the export stays as the ComfyUI-visible copy + if (typeof window.showSaveFilePicker === "function") { + try { + const viewUrl = + api.apiURL( + "/view?filename=" + encodeURIComponent(result.filename) + "&type=input" + ) + app.getRandParam(); + const buf = await (await fetch(viewUrl)).arrayBuffer(); + const handle = await window.showSaveFilePicker({ + suggestedName: result.filename, + types: [ + { + description: "MP4 video", + accept: { "video/mp4": [".mp4"] }, + }, + ], + }); + const writable = await handle.createWritable(); + await writable.write(new Uint8Array(buf)); + await writable.close(); + this._flash( + "Saved to " + handle.name + " (also in input: " + result.filename + ")" + ); + } catch (pickErr) { + // user cancelled the picker or the API failed: the input/ + // copy is still there and usable + this._flash("Exported to input: " + (result.path || result.filename)); + } + } else { + this._flash("Exported: " + (result.path || result.filename)); + } + + // If the video widget points at the source file, refresh it to the + // newly exported masked file. + const vw = this.node.widgets?.find((x) => x.name === "video"); + if (vw && vw.value === filename && vw.callback) { + vw.value = result.filename; + if (this.node.widgets_values) { + const vi = this.node.widgets.indexOf(vw); + if (vi >= 0) this.node.widgets_values[vi] = result.filename; + } + try { + vw.callback(result.filename); + } catch (_) { + /* ignore callback errors */ + } + } + } catch (err) { + alert("Export failed: " + err.message); + } + } + async save() { const w = this.getKeyframesWidget(); if (!w) return; @@ -745,6 +943,7 @@ class VideoMaskEditor { frame 0 / 0 +
@@ -859,6 +1058,9 @@ class VideoMaskEditor { alert("Save failed: " + err.message); } }); + this.el.querySelector("#lpvme-export").addEventListener("click", () => { + this._exportMaskVideo(); + }); this.el.querySelector("#lpvme-close").addEventListener("click", () => this.close()); this.el.querySelector("#lpvme-add-kf").addEventListener("click", () => { this.ensureKeyframe(this.current); @@ -1030,9 +1232,15 @@ class NodeMaskPreview { this.lastDrawnValue = null; this.lastPlayheadX = null; this._sizeWrapped = false; + this._maskVideo = null; // last video for which masks were auto-loaded this._tick(); } + _getVideoFilename() { + const w = this.node.widgets?.find((x) => x.name === "video"); + return w && typeof w.value === "string" ? w.value : null; + } + _keyframesWidget() { return this.node.widgets?.find((w) => w.name === "keyframes"); } @@ -1188,10 +1396,114 @@ class NodeMaskPreview { this.timeline = new MaskTimeline(); this.timeline.setSize(video.videoWidth, video.videoHeight); this.lastMaskIdx = null; - await this._reloadKeyframes(); + const filename = this._getVideoFilename(); + if (filename) { + const metaLoaded = await this._autoLoadMaskMeta(filename); + if (!metaLoaded) { + await this._reloadKeyframes(); + } + } else { + await this._reloadKeyframes(); + } this.lastKeyframesValue = this._keyframesWidget()?.value; } + /** + * Fetch `/lanpaint/video_mask_meta` for the video and, if metadata is + * present, upload the base64 keyframes as PNGs and populate the timeline + * and widget. Returns true when metadata was found and loaded. + */ + async _autoLoadMaskMeta(filename) { + try { + const url = + api.apiURL( + "/lanpaint/video_mask_meta?filename=" + encodeURIComponent(filename) + ) + "&rand=" + Math.random(); + const resp = await fetch(url); + if (!resp.ok) throw new Error("HTTP " + resp.status); + const json = await resp.json(); + if (!json.found || !json.payload) { + // the video carries no mask metadata: clear the workflow's masks + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + const kw = this._keyframesWidget(); + if (kw) kw.value = "{}"; + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = "[]"; + return false; + } + const payload = json.payload; + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + + const keyframeData = payload.keyframes || {}; + const filenames = {}; + const stamp = Date.now(); + for (const [idxStr, b64png] of Object.entries(keyframeData)) { + const idx = parseInt(idxStr, 10); + if (isNaN(idx) || idx < 0 || idx >= this.frameCount) continue; + try { + const img = await new Promise((resolve, reject) => { + const im = new Image(); + im.onload = () => resolve(im); + im.onerror = () => reject(new Error("decode failed")); + im.src = "data:image/png;base64," + b64png; + }); + const c = this.timeline.newMaskCanvas(); + c.getContext("2d").drawImage(img, 0, 0, c.width, c.height); + this.timeline.setKeyframe(idx, c); + + const blob = await new Promise((r) => c.toBlob(r, "image/png")); + if (!blob) continue; + const name = "lanpaint_kf_" + stamp + "_" + idx + ".png"; + const fd = new FormData(); + fd.append("image", blob, name); + fd.append("type", "input"); + const upResp = await api.fetchApi("/upload/image", { + method: "POST", + body: fd, + }); + if (!upResp.ok) continue; + const upData = await upResp.json(); + filenames[idx] = upData.name; + } catch (e) { + console.warn("[LanPaint] preview auto-load keyframe decode failed:", e); + } + } + + const kw = this._keyframesWidget(); + if (kw) kw.value = JSON.stringify(filenames); + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = JSON.stringify(payload.audio_intervals || "[]"); + this._maskVideo = filename; + + if (this.node.widgets_values && this.node.widgets) { + for (const ww of [kw, aw]) { + if (!ww) continue; + const wi = this.node.widgets.indexOf(ww); + if (wi >= 0) this.node.widgets_values[wi] = ww.value; + } + } + + console.log( + "[LanPaint NodeMaskPreview] auto-loaded", + Object.keys(filenames).length, + "keyframes from mp4 metadata" + ); + return true; + } catch (err) { + console.warn("[LanPaint] preview video_mask_meta fetch failed:", err); + // no metadata could be read: treat like not-found and clear + this.timeline.keyframes.clear(); + this.timeline.sdfCache.clear(); + const kw = this._keyframesWidget(); + if (kw) kw.value = "{}"; + const aw = this.getAudioMaskWidget(); + if (aw) aw.value = "[]"; + return false; + } + } + async _reloadKeyframes() { const w = this._keyframesWidget(); const timeline = this.timeline;