{
  "id": "242a6140-7341-49ca-876b-c01366b39b84",
  "revision": 0,
  "last_node_id": 66,
  "last_link_id": 129,
  "nodes": [
    {
      "id": 8,
      "type": "VAEDecode",
      "pos": [
        1209,
        188
      ],
      "size": [
        210,
        46
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 7
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 34
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "slot_index": 0,
          "links": [
            127
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "VAEDecode"
      },
      "widgets_values": []
    },
    {
      "id": 15,
      "type": "VAELoader",
      "pos": [
        -70,
        490
      ],
      "size": [
        381.0045166015625,
        58
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            34
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "VAELoader"
      },
      "widgets_values": [
        "hunyuan_image_2.1_vae_fp16.safetensors"
      ]
    },
    {
      "id": 13,
      "type": "UNETLoader",
      "pos": [
        10,
        180
      ],
      "size": [
        345.8827819824219,
        82
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            24
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "UNETLoader"
      },
      "widgets_values": [
        "hunyuanimage2.1_bf16.safetensors",
        "default"
      ]
    },
    {
      "id": 6,
      "type": "CLIPTextEncode",
      "pos": [
        415,
        186
      ],
      "size": [
        422.84503173828125,
        164.31304931640625
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 54
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "slot_index": 0,
          "links": [
            4
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "cute anime girl with massive fennec ears and a big fluffy fox tail with long wavy blonde hair between eyes and large blue eyes blonde colored eyelashes chubby wearing oversized clothes summer uniform large black coat long blue maxi skirt muddy clothes happy sitting on the side of the road in a run down dark gritty cyberpunk city with neon and a crumbling skyscraper in the rain at night while dipping her feet in a river of water she is holding a sign that says \"ComfyUI is the best\" and another one that says \"The Future is Comfy\""
      ]
    },
    {
      "id": 7,
      "type": "CLIPTextEncode",
      "pos": [
        413,
        389
      ],
      "size": [
        425.27801513671875,
        180.6060791015625
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 53
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "slot_index": 0,
          "links": [
            6
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "low quality, bad anatomy, extra digits, missing digits, extra limbs, missing limbs"
      ]
    },
    {
      "id": 29,
      "type": "EmptyHunyuanImageLatent",
      "pos": [
        570,
        610
      ],
      "size": [
        273.4507751464844,
        106
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            55
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "EmptyHunyuanImageLatent"
      },
      "widgets_values": [
        2048,
        2048,
        1
      ]
    },
    {
      "id": 3,
      "type": "KSampler",
      "pos": [
        863,
        186
      ],
      "size": [
        315,
        262
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 24
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 4
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 6
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 55
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "slot_index": 0,
          "links": [
            7
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        560947545375702,
        "randomize",
        20,
        3.5,
        "euler",
        "simple",
        1
      ]
    },
    {
      "id": 41,
      "type": "SaveImage",
      "pos": [
        1770,
        190
      ],
      "size": [
        883.3683471679688,
        930.5321044921875
      ],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 129
        }
      ],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "ComfyUI"
      ]
    },
    {
      "id": 56,
      "type": "Note",
      "pos": [
        1436.637451171875,
        28.216772079467773
      ],
      "size": [
        306.5500183105469,
        100.29435729980469
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "This is the refiner, unbypass to use it. Go inside the subgraph to adjust it."
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 57,
      "type": "Note",
      "pos": [
        868.934814453125,
        494.73626708984375
      ],
      "size": [
        308.34088134765625,
        94.9217758178711
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "These are settings for the regular model.\n\nFor the distilled model use 8 steps cfg 1.0"
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 26,
      "type": "DualCLIPLoader",
      "pos": [
        -70,
        310
      ],
      "size": [
        432.8055114746094,
        130
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            53,
            54,
            128
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "DualCLIPLoader"
      },
      "widgets_values": [
        "qwen_2.5_vl_7b.safetensors",
        "byt5_small_glyphxl_fp16.safetensors",
        "hunyuan_image",
        "default"
      ]
    },
    {
      "id": 66,
      "type": "3b1dc3d6-206f-42f5-9f08-138642fead7a",
      "pos": [
        1445.588623046875,
        190.00259399414062
      ],
      "size": [
        270,
        46
      ],
      "flags": {},
      "order": 10,
      "mode": 4,
      "inputs": [
        {
          "name": "pixels",
          "type": "IMAGE",
          "link": 127
        },
        {
          "name": "clip",
          "type": "CLIP",
          "link": 128
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            129
          ]
        }
      ],
      "properties": {},
      "widgets_values": []
    }
  ],
  "links": [
    [
      4,
      6,
      0,
      3,
      1,
      "CONDITIONING"
    ],
    [
      6,
      7,
      0,
      3,
      2,
      "CONDITIONING"
    ],
    [
      7,
      3,
      0,
      8,
      0,
      "LATENT"
    ],
    [
      24,
      13,
      0,
      3,
      0,
      "MODEL"
    ],
    [
      34,
      15,
      0,
      8,
      1,
      "VAE"
    ],
    [
      53,
      26,
      0,
      7,
      0,
      "CLIP"
    ],
    [
      54,
      26,
      0,
      6,
      0,
      "CLIP"
    ],
    [
      55,
      29,
      0,
      3,
      3,
      "LATENT"
    ],
    [
      127,
      8,
      0,
      66,
      0,
      "IMAGE"
    ],
    [
      128,
      26,
      0,
      66,
      1,
      "CLIP"
    ],
    [
      129,
      66,
      0,
      41,
      0,
      "IMAGE"
    ]
  ],
  "groups": [],
  "definitions": {
    "subgraphs": [
      {
        "id": "3b1dc3d6-206f-42f5-9f08-138642fead7a",
        "version": 1,
        "state": {
          "lastGroupId": 0,
          "lastNodeId": 65,
          "lastLinkId": 126,
          "lastRerouteId": 0
        },
        "revision": 0,
        "config": {},
        "name": "Refiner Subgraph",
        "inputNode": {
          "id": -10,
          "bounding": [
            460,
            -322.8434753417969,
            120,
            80
          ]
        },
        "outputNode": {
          "id": -20,
          "bounding": [
            2290,
            -312.8434753417969,
            120,
            60
          ]
        },
        "inputs": [
          {
            "id": "565d563c-b044-4b84-957d-3e6bae4c64ee",
            "name": "pixels",
            "type": "IMAGE",
            "linkIds": [
              119
            ],
            "localized_name": "pixels",
            "pos": {
              "0": 55,
              "1": 20
            }
          },
          {
            "id": "91a49e29-0cd8-4062-bc7f-3d0da652b5fc",
            "name": "clip",
            "type": "CLIP",
            "linkIds": [
              125,
              126
            ],
            "localized_name": "clip",
            "pos": {
              "0": 55,
              "1": 40
            }
          }
        ],
        "outputs": [
          {
            "id": "5da3463d-54b0-4e2a-ae4b-dae4d5873e2c",
            "name": "IMAGE",
            "type": "IMAGE",
            "linkIds": [
              122
            ],
            "localized_name": "IMAGE",
            "pos": {
              "0": 20,
              "1": 20
            }
          }
        ],
        "widgets": [],
        "nodes": [
          {
            "id": 58,
            "type": "VAELoader",
            "pos": [
              800,
              -440
            ],
            "size": [
              270,
              58
            ],
            "flags": {},
            "order": 0,
            "mode": 4,
            "inputs": [],
            "outputs": [
              {
                "localized_name": "VAE",
                "name": "VAE",
                "type": "VAE",
                "links": [
                  111,
                  113
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "VAELoader"
            },
            "widgets_values": [
              "hunyuan_image_refiner_vae_fp16.safetensors"
            ]
          },
          {
            "id": 59,
            "type": "VAEEncode",
            "pos": [
              1130,
              -380
            ],
            "size": [
              140,
              46
            ],
            "flags": {},
            "order": 2,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "pixels",
                "name": "pixels",
                "type": "IMAGE",
                "link": 119
              },
              {
                "localized_name": "vae",
                "name": "vae",
                "type": "VAE",
                "link": 111
              }
            ],
            "outputs": [
              {
                "localized_name": "LATENT",
                "name": "LATENT",
                "type": "LATENT",
                "links": [
                  114
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "VAEEncode"
            },
            "widgets_values": []
          },
          {
            "id": 60,
            "type": "UNETLoader",
            "pos": [
              790,
              -570
            ],
            "size": [
              345.8827819824219,
              82
            ],
            "flags": {},
            "order": 1,
            "mode": 4,
            "inputs": [],
            "outputs": [
              {
                "localized_name": "MODEL",
                "name": "MODEL",
                "type": "MODEL",
                "links": [
                  115
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "UNETLoader"
            },
            "widgets_values": [
              "hunyuanimage2.1_refiner_bf16.safetensors",
              "default"
            ]
          },
          {
            "id": 61,
            "type": "VAEDecode",
            "pos": [
              2020,
              -400
            ],
            "size": [
              210,
              46
            ],
            "flags": {},
            "order": 3,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "samples",
                "name": "samples",
                "type": "LATENT",
                "link": 112
              },
              {
                "localized_name": "vae",
                "name": "vae",
                "type": "VAE",
                "link": 113
              }
            ],
            "outputs": [
              {
                "localized_name": "IMAGE",
                "name": "IMAGE",
                "type": "IMAGE",
                "slot_index": 0,
                "links": [
                  122
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "VAEDecode"
            },
            "widgets_values": []
          },
          {
            "id": 63,
            "type": "KSampler",
            "pos": [
              1610,
              -410
            ],
            "size": [
              315,
              262
            ],
            "flags": {},
            "order": 5,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "model",
                "name": "model",
                "type": "MODEL",
                "link": 115
              },
              {
                "localized_name": "positive",
                "name": "positive",
                "type": "CONDITIONING",
                "link": 116
              },
              {
                "localized_name": "negative",
                "name": "negative",
                "type": "CONDITIONING",
                "link": 117
              },
              {
                "localized_name": "latent_image",
                "name": "latent_image",
                "type": "LATENT",
                "link": 118
              }
            ],
            "outputs": [
              {
                "localized_name": "LATENT",
                "name": "LATENT",
                "type": "LATENT",
                "slot_index": 0,
                "links": [
                  112
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "KSampler"
            },
            "widgets_values": [
              770039891896361,
              "fixed",
              4,
              1,
              "euler",
              "simple",
              1
            ]
          },
          {
            "id": 62,
            "type": "HunyuanRefinerLatent",
            "pos": [
              1340,
              -390
            ],
            "size": [
              212.08203125,
              98
            ],
            "flags": {},
            "order": 4,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "positive",
                "name": "positive",
                "type": "CONDITIONING",
                "link": 123
              },
              {
                "localized_name": "negative",
                "name": "negative",
                "type": "CONDITIONING",
                "link": 124
              },
              {
                "localized_name": "latent",
                "name": "latent",
                "type": "LATENT",
                "link": 114
              }
            ],
            "outputs": [
              {
                "localized_name": "positive",
                "name": "positive",
                "type": "CONDITIONING",
                "links": [
                  116
                ]
              },
              {
                "localized_name": "negative",
                "name": "negative",
                "type": "CONDITIONING",
                "links": [
                  117
                ]
              },
              {
                "localized_name": "latent",
                "name": "latent",
                "type": "LATENT",
                "links": [
                  118
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "HunyuanRefinerLatent"
            },
            "widgets_values": [
              0.1
            ]
          },
          {
            "id": 64,
            "type": "CLIPTextEncode",
            "pos": [
              640,
              -340
            ],
            "size": [
              422.84503173828125,
              164.31304931640625
            ],
            "flags": {},
            "order": 6,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "clip",
                "name": "clip",
                "type": "CLIP",
                "link": 125
              }
            ],
            "outputs": [
              {
                "localized_name": "CONDITIONING",
                "name": "CONDITIONING",
                "type": "CONDITIONING",
                "slot_index": 0,
                "links": [
                  123
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "CLIPTextEncode"
            },
            "widgets_values": [
              "<|start_header_id|>system<|end_header_id|>\n\nDescribe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:\n\n<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nMake the image high quality\n<|eot_id|>"
            ]
          },
          {
            "id": 65,
            "type": "CLIPTextEncode",
            "pos": [
              640,
              -130
            ],
            "size": [
              422.84503173828125,
              164.31304931640625
            ],
            "flags": {},
            "order": 7,
            "mode": 4,
            "inputs": [
              {
                "localized_name": "clip",
                "name": "clip",
                "type": "CLIP",
                "link": 126
              }
            ],
            "outputs": [
              {
                "localized_name": "CONDITIONING",
                "name": "CONDITIONING",
                "type": "CONDITIONING",
                "slot_index": 0,
                "links": [
                  124
                ]
              }
            ],
            "properties": {
              "Node name for S&R": "CLIPTextEncode"
            },
            "widgets_values": [
              "<|start_header_id|>system<|end_header_id|>\n\nDescribe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:\n\n<|eot_id|><|start_header_id|>user<|end_header_id|>\n\n\n<|eot_id|>"
            ]
          }
        ],
        "groups": [],
        "links": [
          {
            "id": 111,
            "origin_id": 58,
            "origin_slot": 0,
            "target_id": 59,
            "target_slot": 1,
            "type": "VAE"
          },
          {
            "id": 112,
            "origin_id": 63,
            "origin_slot": 0,
            "target_id": 61,
            "target_slot": 0,
            "type": "LATENT"
          },
          {
            "id": 113,
            "origin_id": 58,
            "origin_slot": 0,
            "target_id": 61,
            "target_slot": 1,
            "type": "VAE"
          },
          {
            "id": 115,
            "origin_id": 60,
            "origin_slot": 0,
            "target_id": 63,
            "target_slot": 0,
            "type": "MODEL"
          },
          {
            "id": 116,
            "origin_id": 62,
            "origin_slot": 0,
            "target_id": 63,
            "target_slot": 1,
            "type": "CONDITIONING"
          },
          {
            "id": 117,
            "origin_id": 62,
            "origin_slot": 1,
            "target_id": 63,
            "target_slot": 2,
            "type": "CONDITIONING"
          },
          {
            "id": 118,
            "origin_id": 62,
            "origin_slot": 2,
            "target_id": 63,
            "target_slot": 3,
            "type": "LATENT"
          },
          {
            "id": 123,
            "origin_id": 64,
            "origin_slot": 0,
            "target_id": 62,
            "target_slot": 0,
            "type": "CONDITIONING"
          },
          {
            "id": 124,
            "origin_id": 65,
            "origin_slot": 0,
            "target_id": 62,
            "target_slot": 1,
            "type": "CONDITIONING"
          },
          {
            "id": 114,
            "origin_id": 59,
            "origin_slot": 0,
            "target_id": 62,
            "target_slot": 2,
            "type": "LATENT"
          },
          {
            "id": 119,
            "origin_id": -10,
            "origin_slot": 0,
            "target_id": 59,
            "target_slot": 0,
            "type": "IMAGE"
          },
          {
            "id": 125,
            "origin_id": -10,
            "origin_slot": 1,
            "target_id": 64,
            "target_slot": 0,
            "type": "CLIP"
          },
          {
            "id": 126,
            "origin_id": -10,
            "origin_slot": 1,
            "target_id": 65,
            "target_slot": 0,
            "type": "CLIP"
          },
          {
            "id": 122,
            "origin_id": 61,
            "origin_slot": 0,
            "target_id": -20,
            "target_slot": 0,
            "type": "IMAGE"
          }
        ],
        "extra": {}
      }
    ]
  },
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.8390545288824175,
      "offset": [
        127.90015938219781,
        427.1634899345528
      ]
    },
    "frontendVersion": "1.26.11",
    "neuraldrift": {
      "catalogId": "06",
      "source": "https://comfyanonymous.github.io/ComfyUI_examples/hunyuan_image/",
      "sourceAsset": "hunyuan.json",
      "license": "/workflows/licenses/comfy-examples-license.txt",
      "executionTested": false
    }
  },
  "version": 0.4
}
