{
  "config": {},
  "definitions": {
    "subgraphs": [
      {
        "config": {},
        "extra": {
          "workflowRendererVersion": "LG"
        },
        "groups": [],
        "id": "b2b04275-4dea-49ba-a3fd-ce0b2f1e39dc",
        "inputNode": {
          "bounding": [
            8555.985538346582,
            -1276.709184061327,
            120,
            140
          ],
          "id": -10
        },
        "inputs": [
          {
            "id": "7601bdcf-7bd6-453d-b969-9804366d7184",
            "linkIds": [
              250
            ],
            "localized_name": "image",
            "name": "image",
            "pos": [
              8655.985538346582,
              -1256.709184061327
            ],
            "type": "IMAGE"
          },
          {
            "id": "94c9e40d-c35a-4d1c-ac1f-f45f0c8e6143",
            "linkIds": [
              255
            ],
            "localized_name": "mask",
            "name": "mask",
            "pos": [
              8655.985538346582,
              -1236.709184061327
            ],
            "type": "MASK"
          },
          {
            "id": "76465456-267f-4f27-b803-b3fac6262e8a",
            "linkIds": [
              261,
              263
            ],
            "name": "width",
            "pos": [
              8655.985538346582,
              -1216.709184061327
            ],
            "type": "INT"
          },
          {
            "id": "c18ac45d-30cc-4f31-b4f9-0427e17ed347",
            "linkIds": [
              262,
              264
            ],
            "name": "height",
            "pos": [
              8655.985538346582,
              -1196.709184061327
            ],
            "type": "INT"
          },
          {
            "id": "ca8ec836-0f82-4c34-b77e-33e4fa417ac6",
            "linkIds": [
              265,
              266
            ],
            "name": "method",
            "pos": [
              8655.985538346582,
              -1176.709184061327
            ],
            "type": "COMBO"
          }
        ],
        "links": [
          {
            "id": 256,
            "origin_id": 183,
            "origin_slot": 0,
            "target_id": 182,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 257,
            "origin_id": 182,
            "origin_slot": 0,
            "target_id": 184,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 250,
            "origin_id": -10,
            "origin_slot": 0,
            "target_id": 181,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 255,
            "origin_id": -10,
            "origin_slot": 1,
            "target_id": 183,
            "target_slot": 0,
            "type": "MASK"
          },
          {
            "id": 251,
            "origin_id": 181,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 252,
            "origin_id": 181,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 253,
            "origin_id": 181,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 254,
            "origin_id": 181,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 258,
            "origin_id": 184,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 1,
            "type": "MASK"
          },
          {
            "id": 259,
            "origin_id": 184,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 1,
            "type": "MASK"
          },
          {
            "id": 260,
            "origin_id": 184,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 1,
            "type": "MASK"
          },
          {
            "id": 261,
            "origin_id": -10,
            "origin_slot": 2,
            "target_id": 181,
            "target_slot": 1,
            "type": "INT"
          },
          {
            "id": 262,
            "origin_id": -10,
            "origin_slot": 3,
            "target_id": 181,
            "target_slot": 2,
            "type": "INT"
          },
          {
            "id": 263,
            "origin_id": -10,
            "origin_slot": 2,
            "target_id": 182,
            "target_slot": 1,
            "type": "INT"
          },
          {
            "id": 264,
            "origin_id": -10,
            "origin_slot": 3,
            "target_id": 182,
            "target_slot": 2,
            "type": "INT"
          },
          {
            "id": 265,
            "origin_id": -10,
            "origin_slot": 4,
            "target_id": 182,
            "target_slot": 3,
            "type": "COMBO"
          },
          {
            "id": 266,
            "origin_id": -10,
            "origin_slot": 4,
            "target_id": 181,
            "target_slot": 3,
            "type": "COMBO"
          }
        ],
        "name": "Resize Image",
        "nodes": [
          {
            "flags": {},
            "id": 184,
            "inputs": [
              {
                "link": 257,
                "localized_name": "image",
                "name": "image",
                "type": "IMAGE"
              }
            ],
            "mode": 0,
            "order": 3,
            "outputs": [
              {
                "links": [
                  258,
                  259,
                  260
                ],
                "localized_name": "MASK",
                "name": "MASK",
                "type": "MASK"
              }
            ],
            "pos": [
              9243.192660289293,
              -1200.5179078739154
            ],
            "properties": {
              "Node name for S&R": "ImageToMask"
            },
            "size": [
              270,
              58
            ],
            "type": "ImageToMask",
            "widgets_values": [
              "red"
            ]
          },
          {
            "flags": {},
            "id": 182,
            "inputs": [
              {
                "link": 256,
                "localized_name": "image",
                "name": "image",
                "type": "IMAGE"
              },
              {
                "link": 263,
                "localized_name": "width",
                "name": "width",
                "type": "INT",
                "widget": {
                  "name": "width"
                }
              },
              {
                "link": 264,
                "localized_name": "height",
                "name": "height",
                "type": "INT",
                "widget": {
                  "name": "height"
                }
              },
              {
                "link": 265,
                "localized_name": "method",
                "name": "method",
                "type": "COMBO",
                "widget": {
                  "name": "method"
                }
              }
            ],
            "mode": 0,
            "order": 1,
            "outputs": [
              {
                "links": [
                  257
                ],
                "localized_name": "IMAGE",
                "name": "IMAGE",
                "type": "IMAGE"
              },
              {
                "links": null,
                "localized_name": "width",
                "name": "width",
                "type": "INT"
              },
              {
                "links": null,
                "localized_name": "height",
                "name": "height",
                "type": "INT"
              }
            ],
            "pos": [
              8952.393920913195,
              -1201.2660931961534
            ],
            "properties": {
              "Node name for S&R": "ImageResize+"
            },
            "size": [
              270,
              217.99999999999997
            ],
            "type": "ImageResize+",
            "widgets_values": [
              1024,
              1024,
              "lanczos",
              "keep proportion",
              "always",
              0
            ]
          },
          {
            "flags": {},
            "id": 181,
            "inputs": [
              {
                "link": 250,
                "localized_name": "image",
                "name": "image",
                "type": "IMAGE"
              },
              {
                "link": 261,
                "localized_name": "width",
                "name": "width",
                "type": "INT",
                "widget": {
                  "name": "width"
                }
              },
              {
                "link": 262,
                "localized_name": "height",
                "name": "height",
                "type": "INT",
                "widget": {
                  "name": "height"
                }
              },
              {
                "link": 266,
                "localized_name": "method",
                "name": "method",
                "type": "COMBO",
                "widget": {
                  "name": "method"
                }
              }
            ],
            "mode": 0,
            "order": 0,
            "outputs": [
              {
                "links": [
                  251,
                  252,
                  253,
                  254
                ],
                "localized_name": "IMAGE",
                "name": "IMAGE",
                "type": "IMAGE"
              },
              {
                "links": null,
                "localized_name": "width",
                "name": "width",
                "type": "INT"
              },
              {
                "links": null,
                "localized_name": "height",
                "name": "height",
                "type": "INT"
              }
            ],
            "pos": [
              8951.581050492361,
              -1460.1522749265007
            ],
            "properties": {
              "Node name for S&R": "ImageResize+"
            },
            "size": [
              270,
              217.99999999999997
            ],
            "type": "ImageResize+",
            "widgets_values": [
              1024,
              1024,
              "lanczos",
              "keep proportion",
              "always",
              0
            ]
          },
          {
            "flags": {},
            "id": 183,
            "inputs": [
              {
                "link": 255,
                "localized_name": "mask",
                "name": "mask",
                "type": "MASK"
              }
            ],
            "mode": 0,
            "order": 2,
            "outputs": [
              {
                "links": [
                  256
                ],
                "localized_name": "IMAGE",
                "name": "IMAGE",
                "type": "IMAGE"
              }
            ],
            "pos": [
              8700,
              -1190
            ],
            "properties": {
              "Node name for S&R": "MaskToImage"
            },
            "size": [
              210,
              26
            ],
            "type": "MaskToImage",
            "widgets_values": []
          }
        ],
        "outputNode": {
          "bounding": [
            9573.192660289293,
            -1276.709184061327,
            120,
            80
          ],
          "id": -20
        },
        "outputs": [
          {
            "id": "dde771bb-77cb-4300-a3a5-535932f4eff9",
            "linkIds": [
              251,
              252,
              253,
              254
            ],
            "localized_name": "IMAGE",
            "name": "IMAGE",
            "pos": [
              9593.192660289293,
              -1256.709184061327
            ],
            "type": "IMAGE"
          },
          {
            "id": "d2e8ad8f-a263-44bf-b228-22e2012bf6d9",
            "linkIds": [
              258,
              259,
              260
            ],
            "localized_name": "MASK",
            "name": "MASK",
            "pos": [
              9593.192660289293,
              -1236.709184061327
            ],
            "type": "MASK"
          }
        ],
        "revision": 0,
        "state": {
          "lastGroupId": 14,
          "lastLinkId": 266,
          "lastNodeId": 184,
          "lastRerouteId": 0
        },
        "version": 1,
        "widgets": []
      }
    ]
  },
  "extra": {
    "VHS_KeepIntermediate": true,
    "VHS_MetadataImage": true,
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "ds": {
      "offset": [
        -8655.062917719497,
        1749.1132348082585
      ],
      "scale": 0.37885893368578794
    },
    "frontendVersion": "1.38.12",
    "workflowRendererVersion": "LG"
  },
  "groups": [
    {
      "bounding": [
        10158.669728314464,
        -617.0000383711965,
        300,
        520
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 23,
      "title": "Prompt"
    },
    {
      "bounding": [
        9818.669728314464,
        -887.0000383711965,
        300,
        790
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 24,
      "title": "Load models"
    },
    {
      "bounding": [
        10908.669728314462,
        -887.0000383711965,
        330,
        790
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 25,
      "title": "Sampling"
    },
    {
      "bounding": [
        11278.669728314464,
        -887.0000383711965,
        1140,
        790
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 26,
      "title": "Decode & Save the Image"
    },
    {
      "bounding": [
        9478.669728314464,
        -887.0000383711965,
        300,
        790
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 27,
      "title": "Load Images"
    },
    {
      "bounding": [
        10498.669728314464,
        -617.0000383711965,
        370,
        520
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 28,
      "title": "Controlnet Preprocessor"
    },
    {
      "bounding": [
        10498.669728314464,
        -887.0000383711965,
        370,
        250
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 29,
      "title": "Controlnet"
    },
    {
      "bounding": [
        10158.669728314464,
        -887.0000383711965,
        300,
        250
      ],
      "color": "#3f789e",
      "flags": {},
      "font_size": 24,
      "id": 30,
      "title": "Inpaint Conditioning"
    }
  ],
  "id": "73611c02-cdf1-4ae8-a41a-d9c057e201ed",
  "last_link_id": 169,
  "last_node_id": 123,
  "links": [
    [
      136,
      112,
      0,
      94,
      0,
      "LATENT"
    ],
    [
      137,
      93,
      0,
      94,
      1,
      "VAE"
    ],
    [
      138,
      99,
      0,
      95,
      0,
      "CONDITIONING"
    ],
    [
      139,
      98,
      0,
      96,
      0,
      "MODEL"
    ],
    [
      142,
      109,
      0,
      98,
      0,
      "MODEL"
    ],
    [
      143,
      92,
      0,
      99,
      0,
      "CLIP"
    ],
    [
      144,
      94,
      0,
      100,
      0,
      "IMAGE"
    ],
    [
      146,
      108,
      0,
      104,
      0,
      "IMAGE"
    ],
    [
      147,
      99,
      0,
      105,
      0,
      "CONDITIONING"
    ],
    [
      148,
      95,
      0,
      105,
      1,
      "CONDITIONING"
    ],
    [
      149,
      93,
      0,
      105,
      2,
      "VAE"
    ],
    [
      150,
      108,
      0,
      105,
      3,
      "IMAGE"
    ],
    [
      151,
      108,
      1,
      105,
      4,
      "MASK"
    ],
    [
      152,
      108,
      1,
      106,
      0,
      "MASK"
    ],
    [
      153,
      107,
      0,
      108,
      0,
      "IMAGE"
    ],
    [
      154,
      107,
      1,
      108,
      1,
      "MASK"
    ],
    [
      155,
      101,
      0,
      109,
      0,
      "MODEL"
    ],
    [
      156,
      103,
      0,
      109,
      1,
      "MODEL_PATCH"
    ],
    [
      157,
      93,
      0,
      109,
      2,
      "VAE"
    ],
    [
      158,
      104,
      0,
      109,
      3,
      "IMAGE"
    ],
    [
      159,
      108,
      0,
      109,
      4,
      "IMAGE"
    ],
    [
      160,
      108,
      1,
      109,
      5,
      "MASK"
    ],
    [
      161,
      104,
      0,
      110,
      0,
      "IMAGE"
    ],
    [
      162,
      96,
      0,
      112,
      0,
      "MODEL"
    ],
    [
      163,
      105,
      0,
      112,
      1,
      "CONDITIONING"
    ],
    [
      164,
      105,
      1,
      112,
      2,
      "CONDITIONING"
    ],
    [
      165,
      105,
      2,
      112,
      3,
      "LATENT"
    ],
    [
      167,
      107,
      0,
      122,
      0,
      "IMAGE"
    ],
    [
      168,
      94,
      0,
      122,
      1,
      "IMAGE"
    ],
    [
      169,
      122,
      0,
      123,
      0,
      "IMAGE"
    ]
  ],
  "nodes": [
    {
      "flags": {},
      "id": 92,
      "inputs": [],
      "mode": 0,
      "order": 0,
      "outputs": [
        {
          "links": [
            143
          ],
          "name": "CLIP",
          "type": "CLIP"
        }
      ],
      "pos": [
        9830.999355273872,
        -676.00017396611
      ],
      "properties": {
        "Node name for S&R": "CLIPLoader",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "models": [
          {
            "directory": "text_encoders",
            "name": "qwen_3_4b.safetensors",
            "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/text_encoders/qwen_3_4b.safetensors"
          }
        ],
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.73"
      },
      "size": [
        270,
        98
      ],
      "type": "CLIPLoader",
      "widgets_values": [
        "qwen_3_4b.safetensors",
        "lumina2",
        "default"
      ]
    },
    {
      "flags": {},
      "id": 93,
      "inputs": [],
      "mode": 0,
      "order": 1,
      "outputs": [
        {
          "links": [
            137,
            149,
            157
          ],
          "name": "VAE",
          "type": "VAE"
        }
      ],
      "pos": [
        9830.999355273872,
        -526.0000799492643
      ],
      "properties": {
        "Node name for S&R": "VAELoader",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "models": [
          {
            "directory": "vae",
            "name": "ae.safetensors",
            "url": "https://huggingface.co/Comfy-Org/z_image_turbo/resolve/main/split_files/vae/ae.safetensors"
          }
        ],
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.73"
      },
      "size": [
        270,
        50
      ],
      "type": "VAELoader",
      "widgets_values": [
        "ae.safetensors"
      ]
    },
    {
      "flags": {},
      "id": 96,
      "inputs": [
        {
          "link": 139,
          "name": "model",
          "type": "MODEL"
        }
      ],
      "mode": 0,
      "order": 23,
      "outputs": [
        {
          "links": [
            162
          ],
          "name": "MODEL",
          "type": "MODEL"
        }
      ],
      "pos": [
        10920.352801650339,
        -697.7560762223355
      ],
      "properties": {
        "Node name for S&R": "DifferentialDiffusion"
      },
      "size": [
        310,
        50
      ],
      "type": "DifferentialDiffusion",
      "widgets_values": [
        1
      ]
    },
    {
      "flags": {},
      "id": 98,
      "inputs": [
        {
          "link": 142,
          "name": "model",
          "type": "MODEL"
        }
      ],
      "mode": 0,
      "order": 22,
      "outputs": [
        {
          "links": [
            139
          ],
          "name": "MODEL",
          "slot_index": 0,
          "type": "MODEL"
        }
      ],
      "pos": [
        10920.352801650339,
        -807.7559144960173
      ],
      "properties": {
        "Node name for S&R": "ModelSamplingAuraFlow",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.64"
      },
      "size": [
        310,
        50
      ],
      "type": "ModelSamplingAuraFlow",
      "widgets_values": [
        3
      ]
    },
    {
      "flags": {},
      "id": 105,
      "inputs": [
        {
          "link": 147,
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "link": 148,
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "link": 149,
          "name": "vae",
          "type": "VAE"
        },
        {
          "link": 150,
          "name": "pixels",
          "type": "IMAGE"
        },
        {
          "link": 151,
          "name": "mask",
          "type": "MASK"
        }
      ],
      "mode": 0,
      "order": 19,
      "outputs": [
        {
          "links": [
            163
          ],
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "links": [
            164
          ],
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "links": [
            165
          ],
          "name": "latent",
          "type": "LATENT"
        }
      ],
      "pos": [
        10170.352764076119,
        -807.7559144960173
      ],
      "properties": {
        "Node name for S&R": "InpaintModelConditioning"
      },
      "size": [
        270,
        130
      ],
      "type": "InpaintModelConditioning",
      "widgets_values": [
        true
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": true
      },
      "id": 115,
      "inputs": [],
      "mode": 0,
      "order": 2,
      "outputs": [],
      "pos": [
        12160.35121446821,
        -907.7561213439177
      ],
      "properties": {},
      "size": [
        96.8359375,
        0
      ],
      "title": "Hit run 👆",
      "type": "MarkdownNote",
      "widgets_values": [
        ""
      ]
    },
    {
      "flags": {},
      "id": 101,
      "inputs": [],
      "mode": 0,
      "order": 3,
      "outputs": [
        {
          "links": [
            155
          ],
          "name": "MODEL",
          "type": "MODEL"
        }
      ],
      "pos": [
        9830.999355273872,
        -806.0001401113736
      ],
      "properties": {
        "Node name for S&R": "UNETLoader",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "models": [
          {
            "directory": "diffusion_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"
          }
        ],
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.73"
      },
      "size": [
        270,
        74
      ],
      "type": "UNETLoader",
      "widgets_values": [
        "z_image_turbo_bf16.safetensors",
        "default"
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 110,
      "inputs": [
        {
          "link": 161,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 21,
      "outputs": [],
      "pos": [
        10520.999009233346,
        -386.00004986820966
      ],
      "properties": {
        "Node name for S&R": "PreviewImage"
      },
      "size": [
        330,
        246
      ],
      "type": "PreviewImage",
      "widgets_values": []
    },
    {
      "flags": {},
      "id": 109,
      "inputs": [
        {
          "link": 155,
          "name": "model",
          "type": "MODEL"
        },
        {
          "link": 156,
          "name": "model_patch",
          "type": "MODEL_PATCH"
        },
        {
          "link": 157,
          "name": "vae",
          "type": "VAE"
        },
        {
          "link": 158,
          "name": "image",
          "shape": 7,
          "type": "IMAGE"
        },
        {
          "link": 159,
          "name": "inpaint_image",
          "shape": 7,
          "type": "IMAGE"
        },
        {
          "link": 160,
          "name": "mask",
          "shape": 7,
          "type": "MASK"
        }
      ],
      "mode": 0,
      "order": 20,
      "outputs": [
        {
          "links": [
            142
          ],
          "name": "MODEL",
          "type": "MODEL"
        }
      ],
      "pos": [
        10520.999009233346,
        -806.0001401113736
      ],
      "properties": {
        "Node name for S&R": "ZImageFunControlnet"
      },
      "size": [
        320,
        150
      ],
      "type": "ZImageFunControlnet",
      "widgets_values": [
        1
      ]
    },
    {
      "flags": {},
      "id": 104,
      "inputs": [
        {
          "link": 146,
          "name": "image",
          "type": "IMAGE"
        }
      ],
      "mode": 4,
      "order": 17,
      "outputs": [
        {
          "links": [
            158,
            161
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        10520.999009233346,
        -516.0000160134733
      ],
      "properties": {
        "Node name for S&R": "AIO_Preprocessor"
      },
      "size": [
        330,
        74
      ],
      "type": "AIO_Preprocessor",
      "widgets_values": [
        "DepthAnythingV2Preprocessor",
        1024
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 111,
      "inputs": [],
      "mode": 0,
      "order": 4,
      "outputs": [],
      "pos": [
        10500.351846387155,
        -47.75613736851483
      ],
      "properties": {},
      "size": [
        370,
        307.47395833333337
      ],
      "title": "optional",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Controlnet Preprocessor\n\n**Preprocess inputs** if needed: extract features like canny edges or depth from an image to create clean guidance signals for ControlNet.\n\n1. Un/bypass Controlnet Preprocessor nodes(Select nodes then Ctrl-B).\n2. Disconnect inpaint_image & mask from ZImageFunControlnet when.\n3. Hit run\n4. Explore a different prompt 👾\n\n**Controlnet Strength**\n\nstrength: 0.5 – 1.5\n- higher for strict adherence\n- 1.0 default for balanced control)"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 114,
      "inputs": [],
      "mode": 0,
      "order": 5,
      "outputs": [],
      "pos": [
        11280.998678233347,
        -1136.0000874424286
      ],
      "properties": {},
      "size": [
        290,
        165.15625
      ],
      "title": "Workflow Settings",
      "type": "MarkdownNote",
      "widgets_values": [
        "You can test and find the best setting by yourself. The following table is for reference.\n| Parameters  | Basic Diffusion | Inpainting |\n|--------|---------|------------\n| Ksampler: denoise  | 1.0      | 0.5 - 1.0         \nModelSampling: shift    | 3.0     | 3.0 - 10.0        |"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 116,
      "inputs": [],
      "mode": 0,
      "order": 6,
      "outputs": [],
      "pos": [
        9480.999280071235,
        -1126.00013163414
      ],
      "properties": {},
      "size": [
        290,
        233.64583333333337
      ],
      "title": "Step 1 - Load Images & Create Mask",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Load Image\n\n1. Load the Image 🌠\n\n## Create Mask\n\n1. **Right-click** on the Load Image node to open right-click menu\n\n2. Choose Open in Mask Editor\n\n3. Draw mask over the eyes\n\n4. Save Mask\n\n5. **Hit Run**"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 117,
      "inputs": [],
      "mode": 0,
      "order": 7,
      "outputs": [],
      "pos": [
        9160.998964165963,
        -686.0000216468962
      ],
      "properties": {},
      "size": [
        280,
        237.64322916666669
      ],
      "title": "🔍 Core Concept",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Inpainting\n\nInpainting lets you edit specific image parts by regenerating them via a mask and prompt, while keeping the rest intact.\nIt predicts denoised pixels only in masked areas, blending with surrounding context.\n\n## ControlNet\n\nControlNet adds structural guides like edges or poses to direct generation alongside the prompt.\nIt conditions denoising to match provided hints."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 121,
      "inputs": [],
      "mode": 0,
      "order": 8,
      "outputs": [],
      "pos": [
        9160.998964165963,
        -856.0000272803192
      ],
      "properties": {},
      "size": [
        280,
        52
      ],
      "title": "ℹ️ Info",
      "type": "MarkdownNote",
      "widgets_values": [
        "This is an **Inpainting** & **Controlnet** workflow for advanced guidance in diffusion models using Z Image Turbo."
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 106,
      "inputs": [
        {
          "link": 152,
          "name": "mask",
          "type": "MASK"
        }
      ],
      "mode": 0,
      "order": 18,
      "outputs": [],
      "pos": [
        9490.998911497016,
        -366.00003012413003
      ],
      "properties": {
        "Node name for S&R": "MaskPreview"
      },
      "size": [
        270,
        246
      ],
      "type": "MaskPreview",
      "widgets_values": []
    },
    {
      "flags": {
        "collapsed": true
      },
      "id": 108,
      "inputs": [
        {
          "link": 153,
          "name": "image",
          "type": "IMAGE"
        },
        {
          "link": 154,
          "name": "mask",
          "type": "MASK"
        }
      ],
      "mode": 0,
      "order": 15,
      "outputs": [
        {
          "links": [
            146,
            150,
            159
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": [
            151,
            152,
            160
          ],
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        9500.999407942818,
        -426.0000893563687
      ],
      "properties": {
        "proxyWidgets": [
          [
            "-1",
            "width"
          ],
          [
            "-1",
            "height"
          ],
          [
            "-1",
            "method"
          ]
        ]
      },
      "size": [
        112.861328125,
        0
      ],
      "type": "b2b04275-4dea-49ba-a3fd-ce0b2f1e39dc",
      "widgets_values": [
        1024,
        1024,
        "keep proportion"
      ]
    },
    {
      "flags": {},
      "id": 103,
      "inputs": [],
      "mode": 0,
      "order": 9,
      "outputs": [
        {
          "links": [
            156
          ],
          "name": "MODEL_PATCH",
          "type": "MODEL_PATCH"
        }
      ],
      "pos": [
        9830.999355273872,
        -416.0000254205777
      ],
      "properties": {
        "Node name for S&R": "ModelPatchLoader",
        "models": [
          {
            "directory": "model_patches",
            "name": "Z-Image-Turbo-Fun-Controlnet-Union-2.1.safetensors",
            "url": "https://huggingface.co/alibaba-pai/Z-Image-Turbo-Fun-Controlnet-Union-2.0/resolve/main/Z-Image-Turbo-Fun-Controlnet-Union-2.1.safetensors"
          }
        ]
      },
      "size": [
        270,
        50
      ],
      "type": "ModelPatchLoader",
      "widgets_values": [
        "Z-Image-Turbo-Fun-Controlnet-Union-2.1.safetensors"
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 120,
      "inputs": [],
      "mode": 0,
      "order": 10,
      "outputs": [],
      "pos": [
        10160.353132650338,
        -1047.7561514249724
      ],
      "properties": {},
      "size": [
        300,
        140
      ],
      "title": "Step 2 - Inpaint Conditioning",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Inpaint Model Conditioning\n\n**Condition the model for targeted edits:** combine positive/negative prompts with the masked latent image and VAE to focus denoising on selected areas."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 119,
      "inputs": [],
      "mode": 0,
      "order": 11,
      "outputs": [],
      "pos": [
        10500.351846387155,
        -1047.7561514249724
      ],
      "properties": {},
      "size": [
        370,
        120
      ],
      "title": "Step 3 - Controlnet 🕹️",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Controlnet\n\n**Apply structural controls:** load a ControlNet model (e.g. Z-Image-Turbo-Fun-Controlnet-Union.safetensors) and integrate it into the conditioning to guide shapes during generation."
      ]
    },
    {
      "bgcolor": "#000",
      "color": "#222",
      "flags": {
        "collapsed": false
      },
      "id": 113,
      "inputs": [],
      "mode": 0,
      "order": 12,
      "outputs": [],
      "pos": [
        10910.999340179147,
        -1226.0001222270355
      ],
      "properties": {},
      "size": [
        330,
        290
      ],
      "title": "Step 4 - Sampling 🖼️",
      "type": "MarkdownNote",
      "widgets_values": [
        "## Differential Diffusion - The star of inpainting 🌟\n\nDifferential diffusion boosts diffusion-based image editing with per-pixel \"strength\" maps for smooth, gradual, and spatially varying changes — no model retraining required.\n\n## KSampler - The heart of inference\n\n**Inpainting Strength**\n\nDenoise: 0.5 – 1.0\n\n- lower for subtle changes\n- full for complete redraws"
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 107,
      "inputs": [],
      "mode": 0,
      "order": 13,
      "outputs": [
        {
          "links": [
            153,
            167
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        },
        {
          "links": [
            154
          ],
          "name": "MASK",
          "type": "MASK"
        }
      ],
      "pos": [
        9490.998911497016,
        -786.0000122397917
      ],
      "properties": {
        "Node name for S&R": "LoadImage",
        "image": "52ead0565329bdb6154ba1ac2db4e5bb3603341976a59f80ca1638854c83573c.png [input]"
      },
      "size": [
        282.78645833333337,
        314
      ],
      "type": "LoadImage",
      "widgets_values": [
        "gsc_creator_2_2_input.png",
        "image"
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 94,
      "inputs": [
        {
          "link": 136,
          "name": "samples",
          "type": "LATENT"
        },
        {
          "link": 137,
          "name": "vae",
          "type": "VAE"
        }
      ],
      "mode": 0,
      "order": 25,
      "outputs": [
        {
          "links": [
            144,
            168
          ],
          "name": "IMAGE",
          "slot_index": 0,
          "type": "IMAGE"
        }
      ],
      "pos": [
        11300.351771130318,
        -807.7559144960173
      ],
      "properties": {
        "Node name for S&R": "VAEDecode",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.64"
      },
      "size": [
        200,
        46
      ],
      "type": "VAEDecode",
      "widgets_values": []
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 100,
      "inputs": [
        {
          "link": 144,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 0,
      "order": 26,
      "outputs": [],
      "pos": [
        11310,
        -710
      ],
      "properties": {},
      "size": [
        550,
        420
      ],
      "type": "SaveImage",
      "widgets_values": [
        "Z-Image-Turbo"
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 112,
      "inputs": [
        {
          "link": 162,
          "name": "model",
          "type": "MODEL"
        },
        {
          "link": 163,
          "name": "positive",
          "type": "CONDITIONING"
        },
        {
          "link": 164,
          "name": "negative",
          "type": "CONDITIONING"
        },
        {
          "link": 165,
          "name": "latent_image",
          "type": "LATENT"
        }
      ],
      "mode": 0,
      "order": 24,
      "outputs": [
        {
          "links": [
            136
          ],
          "name": "LATENT",
          "slot_index": 0,
          "type": "LATENT"
        }
      ],
      "pos": [
        10920.352801650339,
        -597.7560856294401
      ],
      "properties": {
        "Node name for S&R": "KSampler",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.64"
      },
      "size": [
        310,
        486
      ],
      "type": "KSampler",
      "widgets_values": [
        467616719697168,
        "randomize",
        9,
        1,
        "res_multistep",
        "simple",
        1
      ]
    },
    {
      "flags": {
        "collapsed": true
      },
      "id": 122,
      "inputs": [
        {
          "link": 167,
          "name": "image1",
          "type": "IMAGE"
        },
        {
          "link": 168,
          "name": "image2",
          "shape": 7,
          "type": "IMAGE"
        }
      ],
      "mode": 0,
      "order": 27,
      "outputs": [
        {
          "links": [
            169
          ],
          "name": "IMAGE",
          "type": "IMAGE"
        }
      ],
      "pos": [
        11920,
        -790
      ],
      "properties": {
        "Node name for S&R": "ImageStitch"
      },
      "size": [
        270,
        150
      ],
      "type": "ImageStitch",
      "widgets_values": [
        "down",
        true,
        0,
        "white"
      ]
    },
    {
      "flags": {},
      "id": 123,
      "inputs": [
        {
          "link": 169,
          "name": "images",
          "type": "IMAGE"
        }
      ],
      "mode": 0,
      "order": 28,
      "outputs": [],
      "pos": [
        11920,
        -730
      ],
      "properties": {
        "Node name for S&R": "PreviewImage"
      },
      "size": [
        460,
        520
      ],
      "type": "PreviewImage",
      "widgets_values": []
    },
    {
      "bgcolor": "#353",
      "color": "#232",
      "flags": {},
      "id": 99,
      "inputs": [
        {
          "link": 143,
          "name": "clip",
          "type": "CLIP"
        }
      ],
      "mode": 0,
      "order": 14,
      "outputs": [
        {
          "links": [
            138,
            147
          ],
          "name": "CONDITIONING",
          "type": "CONDITIONING"
        }
      ],
      "pos": [
        10170.99893403071,
        -536.0000357575528
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.73"
      },
      "size": [
        280,
        230
      ],
      "type": "CLIPTextEncode",
      "widgets_values": [
        "sunglasses."
      ]
    },
    {
      "flags": {
        "collapsed": false
      },
      "id": 95,
      "inputs": [
        {
          "link": 138,
          "name": "conditioning",
          "type": "CONDITIONING"
        }
      ],
      "mode": 0,
      "order": 16,
      "outputs": [
        {
          "links": [
            148
          ],
          "name": "CONDITIONING",
          "type": "CONDITIONING"
        }
      ],
      "pos": [
        10211.000054793893,
        -176.0000047466276
      ],
      "properties": {
        "Node name for S&R": "ConditioningZeroOut",
        "cnr_id": "comfy-core",
        "enableTabs": false,
        "hasSecondTab": false,
        "secondTabOffset": 80,
        "secondTabText": "Send Back",
        "secondTabWidth": 65,
        "tabWidth": 65,
        "tabXOffset": 10,
        "ver": "0.3.73"
      },
      "size": [
        230,
        40
      ],
      "type": "ConditioningZeroOut",
      "widgets_values": []
    }
  ],
  "revision": 0,
  "version": 0.4
}