{
  "id": "pbr-tileable-and-maps",
  "revision": 0,
  "last_node_id": 130,
  "last_link_id": 78,
  "nodes": [
    {
      "id": 130,
      "type": "ImageDirIterator",
      "pos": [
        40,
        620
      ],
      "size": [
        300,
        286
      ],
      "flags": {},
      "order": 0,
      "mode": 4,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "shape": 6,
          "type": "IMAGE",
          "links": []
        },
        {
          "name": "MASK",
          "shape": 6,
          "type": "MASK",
          "links": []
        },
        {
          "name": "STRING",
          "shape": 6,
          "type": "STRING",
          "links": null
        },
        {
          "name": "INT",
          "type": "INT",
          "links": null
        }
      ],
      "title": "BATCH (bypassed) - see note",
      "properties": {
        "cnr_id": "comfyui_cspnodes",
        "ver": "1.0.0",
        "Node name for S&R": "ImageDirIterator"
      },
      "widgets_values": [
        "",
        "**/*.png, **/*.jpg",
        0,
        "name",
        "ascending",
        1,
        false,
        false
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 2,
      "type": "ImageScale",
      "pos": [
        40,
        420
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 22,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 1
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            2
          ]
        }
      ],
      "title": "2. Target Resolution",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        2048,
        2048,
        "center"
      ],
      "color": "#3f789e",
      "bgcolor": "#2a4a5e"
    },
    {
      "id": 10,
      "type": "LayerUtility: ImageShift",
      "pos": [
        420,
        60
      ],
      "size": [
        300,
        218
      ],
      "flags": {},
      "order": 24,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 2
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            3,
            27
          ]
        },
        {
          "name": "mask",
          "type": "MASK",
          "links": []
        },
        {
          "name": "border_mask",
          "type": "MASK",
          "links": null
        }
      ],
      "title": "Offset by half edge",
      "properties": {
        "cnr_id": "comfyui_layerstyle",
        "ver": "1.0.90",
        "Node name for S&R": "LayerUtility: ImageShift"
      },
      "widgets_values": [
        1024,
        1024,
        true,
        "#000000",
        24,
        16
      ]
    },
    {
      "id": 11,
      "type": "ImageScale",
      "pos": [
        420,
        300
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 26,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 3
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            16
          ]
        }
      ],
      "title": "Downscale to work resolution",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        1024,
        1024,
        "disabled"
      ]
    },
    {
      "id": 100,
      "type": "SolidMask",
      "pos": [
        420,
        460
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            4
          ]
        }
      ],
      "title": "Mask base (black)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SolidMask"
      },
      "widgets_values": [
        0,
        2048,
        2048
      ]
    },
    {
      "id": 101,
      "type": "SolidMask",
      "pos": [
        420,
        620
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            5
          ]
        }
      ],
      "title": "Vertical bar",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SolidMask"
      },
      "widgets_values": [
        1,
        160,
        2048
      ]
    },
    {
      "id": 102,
      "type": "SolidMask",
      "pos": [
        420,
        780
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            7
          ]
        }
      ],
      "title": "Horizontal bar",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SolidMask"
      },
      "widgets_values": [
        1,
        2048,
        160
      ]
    },
    {
      "id": 105,
      "type": "MaskToImage",
      "pos": [
        760,
        840
      ],
      "size": [
        300,
        60
      ],
      "flags": {},
      "order": 25,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 8
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            9,
            25
          ]
        }
      ],
      "title": "Cross -> image",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "MaskToImage"
      },
      "widgets_values": []
    },
    {
      "id": 13,
      "type": "ImageScale",
      "pos": [
        420,
        940
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 27,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 9
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            10
          ]
        }
      ],
      "title": "Cross to work resolution",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "nearest-exact",
        1024,
        1024,
        "disabled"
      ]
    },
    {
      "id": 14,
      "type": "ImageToMask",
      "pos": [
        420,
        1100
      ],
      "size": [
        300,
        80
      ],
      "flags": {},
      "order": 29,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 10
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            17
          ]
        }
      ],
      "title": "-> inpaint mask",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageToMask"
      },
      "widgets_values": [
        "red"
      ]
    },
    {
      "id": 15,
      "type": "CheckpointLoaderSimple",
      "pos": [
        420,
        830
      ],
      "size": [
        300,
        110
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "MODEL",
          "type": "MODEL",
          "links": [
            18
          ]
        },
        {
          "name": "CLIP",
          "type": "CLIP",
          "links": [
            11,
            12
          ]
        },
        {
          "name": "VAE",
          "type": "VAE",
          "links": [
            15,
            23
          ]
        }
      ],
      "title": "SDXL for the seam",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "CheckpointLoaderSimple"
      },
      "widgets_values": [
        "sd_xl_base_1.0.safetensors"
      ],
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 16,
      "type": "CLIPTextEncode",
      "pos": [
        420,
        970
      ],
      "size": [
        300,
        110
      ],
      "flags": {},
      "order": 19,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 11
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            13
          ]
        }
      ],
      "title": "Prompt +",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "seamless surface texture, continuous material, uniform lighting, sharp detail"
      ]
    },
    {
      "id": 17,
      "type": "CLIPTextEncode",
      "pos": [
        420,
        1110
      ],
      "size": [
        300,
        110
      ],
      "flags": {},
      "order": 20,
      "mode": 0,
      "inputs": [
        {
          "name": "clip",
          "type": "CLIP",
          "link": 12
        }
      ],
      "outputs": [
        {
          "name": "CONDITIONING",
          "type": "CONDITIONING",
          "links": [
            14
          ]
        }
      ],
      "title": "Prompt -",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "CLIPTextEncode"
      },
      "widgets_values": [
        "seam, line, edge, border, blur, text, watermark, object, person"
      ]
    },
    {
      "id": 22,
      "type": "ImageBlur",
      "pos": [
        1100,
        60
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 28,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 25
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            26
          ]
        }
      ],
      "title": "Feather seam mask",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlur"
      },
      "widgets_values": [
        24,
        10
      ]
    },
    {
      "id": 23,
      "type": "ImageToMask",
      "pos": [
        1100,
        230
      ],
      "size": [
        300,
        80
      ],
      "flags": {},
      "order": 30,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 26
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            29
          ]
        }
      ],
      "title": "-> soft mask",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageToMask"
      },
      "widgets_values": [
        "red"
      ]
    },
    {
      "id": 24,
      "type": "ImageCompositeMasked",
      "pos": [
        1100,
        350
      ],
      "size": [
        300,
        160
      ],
      "flags": {},
      "order": 35,
      "mode": 0,
      "inputs": [
        {
          "name": "destination",
          "type": "IMAGE",
          "link": 27
        },
        {
          "name": "source",
          "type": "IMAGE",
          "link": 28
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": 29
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            30,
            31,
            32,
            36,
            44,
            47,
            51,
            72
          ]
        }
      ],
      "title": "Combine sharp + repaired",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageCompositeMasked"
      },
      "widgets_values": [
        0,
        0,
        false
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 30,
      "type": "PreviewImage",
      "pos": [
        1500,
        60
      ],
      "size": [
        340,
        360
      ],
      "flags": {},
      "order": 36,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 30
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "title": "3. Check the tile",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "PreviewImage"
      },
      "widgets_values": [],
      "color": "#a1662f",
      "bgcolor": "#5a3a1a"
    },
    {
      "id": 31,
      "type": "ImageStitch",
      "pos": [
        1500,
        450
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 37,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 31
        },
        {
          "name": "image2",
          "shape": 7,
          "type": "IMAGE",
          "link": 32
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            33,
            34
          ]
        }
      ],
      "title": "2x side by side",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageStitch"
      },
      "widgets_values": [
        "right",
        false,
        0,
        "white"
      ]
    },
    {
      "id": 32,
      "type": "ImageStitch",
      "pos": [
        1500,
        620
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 41,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 33
        },
        {
          "name": "image2",
          "shape": 7,
          "type": "IMAGE",
          "link": 34
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            35
          ]
        }
      ],
      "title": "2x stacked",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageStitch"
      },
      "widgets_values": [
        "down",
        false,
        0,
        "white"
      ]
    },
    {
      "id": 33,
      "type": "PreviewImage",
      "pos": [
        1500,
        790
      ],
      "size": [
        340,
        360
      ],
      "flags": {},
      "order": 44,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 35
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "title": "4. Tiling test 2x2",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "PreviewImage"
      },
      "widgets_values": [],
      "color": "#a1662f",
      "bgcolor": "#5a3a1a"
    },
    {
      "id": 40,
      "type": "ImageScale",
      "pos": [
        1900,
        60
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 38,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 36
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            38
          ]
        }
      ],
      "title": "Downscale for Marigold",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        768,
        768,
        "disabled"
      ]
    },
    {
      "id": 41,
      "type": "MarigoldModelLoader",
      "pos": [
        1900,
        220
      ],
      "size": [
        300,
        80
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "marigold_model",
          "type": "MARIGOLDMODEL",
          "links": [
            37
          ]
        }
      ],
      "title": "Marigold IID Appearance",
      "properties": {
        "cnr_id": "comfyui-marigold",
        "ver": "1.0.0",
        "Node name for S&R": "MarigoldModelLoader"
      },
      "widgets_values": [
        "prs-eth/marigold-iid-appearance-v1-1"
      ],
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 42,
      "type": "MarigoldDepthEstimation_v2",
      "pos": [
        1900,
        340
      ],
      "size": [
        300,
        250
      ],
      "flags": {},
      "order": 42,
      "mode": 0,
      "inputs": [
        {
          "name": "marigold_model",
          "type": "MARIGOLDMODEL",
          "link": 37
        },
        {
          "name": "image",
          "type": "IMAGE",
          "link": 38
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            39,
            40
          ]
        }
      ],
      "title": "Estimate Albedo + Material",
      "properties": {
        "cnr_id": "comfyui-marigold",
        "ver": "1.0.0",
        "Node name for S&R": "MarigoldDepthEstimation_v2"
      },
      "widgets_values": [
        123,
        "fixed",
        10,
        1,
        768,
        "DDIMScheduler",
        false,
        false
      ]
    },
    {
      "id": 43,
      "type": "ImageFromBatch",
      "pos": [
        1900,
        620
      ],
      "size": [
        300,
        100
      ],
      "flags": {},
      "order": 45,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 39
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            43
          ]
        }
      ],
      "title": "Batch 0 = Albedo",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageFromBatch"
      },
      "widgets_values": [
        0,
        1
      ]
    },
    {
      "id": 44,
      "type": "ImageFromBatch",
      "pos": [
        1900,
        750
      ],
      "size": [
        300,
        100
      ],
      "flags": {},
      "order": 46,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 40
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            41
          ]
        }
      ],
      "title": "Batch 1 = Material",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageFromBatch"
      },
      "widgets_values": [
        1,
        1
      ]
    },
    {
      "id": 45,
      "type": "ImageToMask",
      "pos": [
        1900,
        880
      ],
      "size": [
        300,
        80
      ],
      "flags": {},
      "order": 49,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 41
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            42
          ]
        }
      ],
      "title": "Red channel = Roughness",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageToMask"
      },
      "widgets_values": [
        "red"
      ]
    },
    {
      "id": 46,
      "type": "MaskToImage",
      "pos": [
        1900,
        990
      ],
      "size": [
        300,
        60
      ],
      "flags": {},
      "order": 52,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 42
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            50
          ]
        }
      ],
      "title": "Roughness (coarse)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "MaskToImage"
      },
      "widgets_values": []
    },
    {
      "id": 50,
      "type": "ImageScale",
      "pos": [
        2280,
        60
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 48,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 43
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            45
          ]
        }
      ],
      "title": "Upscale Albedo to target",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        2048,
        2048,
        "disabled"
      ]
    },
    {
      "id": 51,
      "type": "ColorMatch",
      "pos": [
        2280,
        220
      ],
      "size": [
        300,
        170
      ],
      "flags": {},
      "order": 51,
      "mode": 0,
      "inputs": [
        {
          "name": "image_ref",
          "type": "IMAGE",
          "link": 44
        },
        {
          "name": "image_target",
          "type": "IMAGE",
          "link": 45
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            46
          ]
        }
      ],
      "title": "Match colour to photo",
      "properties": {
        "cnr_id": "comfyui-kjnodes",
        "ver": "1.1.0",
        "Node name for S&R": "ColorMatch"
      },
      "widgets_values": [
        "mkl",
        0.75,
        true
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 52,
      "type": "ImageBlend",
      "pos": [
        2280,
        420
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 54,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 46
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 47
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            48,
            49
          ]
        }
      ],
      "title": "Detail from photo",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.4,
        "overlay"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 53,
      "type": "ImageBlend",
      "pos": [
        2280,
        600
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 57,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 48
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 49
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            67
          ]
        }
      ],
      "title": "Darken",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.25,
        "multiply"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 54,
      "type": "ImageScale",
      "pos": [
        2280,
        780
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 55,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 50
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            63,
            64
          ]
        }
      ],
      "title": "Upscale Roughness",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        2048,
        2048,
        "disabled"
      ]
    },
    {
      "id": 56,
      "type": "ImageToMask",
      "pos": [
        2280,
        1100
      ],
      "size": [
        300,
        80
      ],
      "flags": {},
      "order": 39,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 51
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            52
          ]
        }
      ],
      "title": "Height from full-res luminance",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageToMask"
      },
      "widgets_values": [
        "green"
      ]
    },
    {
      "id": 57,
      "type": "MaskToImage",
      "pos": [
        2280,
        1210
      ],
      "size": [
        300,
        60
      ],
      "flags": {},
      "order": 43,
      "mode": 0,
      "inputs": [
        {
          "name": "mask",
          "type": "MASK",
          "link": 52
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            53,
            57
          ]
        }
      ],
      "title": "Height",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "MaskToImage"
      },
      "widgets_values": []
    },
    {
      "id": 58,
      "type": "EmptyImage",
      "pos": [
        2280,
        1300
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            69,
            77
          ]
        }
      ],
      "title": "Metallic constant BLACK",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "EmptyImage"
      },
      "widgets_values": [
        2048,
        2048,
        1,
        0
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 59,
      "type": "EmptyImage",
      "pos": [
        2280,
        1470
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 7,
      "mode": 4,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Metallic constant WHITE (bypassed)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "EmptyImage"
      },
      "widgets_values": [
        2048,
        2048,
        1,
        16777215
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 120,
      "type": "ImageScale",
      "pos": [
        2280,
        2000
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 47,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 53
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            54
          ]
        }
      ],
      "title": "Height -> 256 px",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        256,
        256,
        "disabled"
      ]
    },
    {
      "id": 121,
      "type": "ImageBlur",
      "pos": [
        2280,
        2160
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 50,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 54
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            55
          ]
        }
      ],
      "title": "Blur = low frequency",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlur"
      },
      "widgets_values": [
        31,
        10
      ]
    },
    {
      "id": 122,
      "type": "ImageScale",
      "pos": [
        2280,
        2320
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 53,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 55
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            56
          ]
        }
      ],
      "title": "Back to target",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        2048,
        2048,
        "disabled"
      ]
    },
    {
      "id": 123,
      "type": "ImageInvert",
      "pos": [
        2280,
        2480
      ],
      "size": [
        300,
        60
      ],
      "flags": {},
      "order": 56,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 56
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            58
          ]
        }
      ],
      "title": "Invert low frequency",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageInvert"
      },
      "widgets_values": []
    },
    {
      "id": 124,
      "type": "ImageBlend",
      "pos": [
        2280,
        2570
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 59,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 57
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 58
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            59,
            60
          ]
        }
      ],
      "title": "High-pass  (bypass = raw height)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.5,
        "normal"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 125,
      "type": "ImageBlend",
      "pos": [
        2280,
        2750
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 62,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 59
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 60
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            61,
            62,
            66,
            71
          ]
        }
      ],
      "title": "High-pass contrast",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.55,
        "overlay"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 126,
      "type": "DepthToNormalMap",
      "pos": [
        2280,
        2930
      ],
      "size": [
        300,
        200
      ],
      "flags": {},
      "order": 63,
      "mode": 0,
      "inputs": [
        {
          "name": "depth_maps",
          "type": "IMAGE",
          "link": 61
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            73
          ]
        }
      ],
      "title": "Normal DX (flip_y)",
      "properties": {
        "cnr_id": "comfyui_cspnodes",
        "ver": "1.0.0",
        "Node name for S&R": "DepthToNormalMap"
      },
      "widgets_values": [
        0.6,
        true,
        true,
        1
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 127,
      "type": "ImageBlend",
      "pos": [
        2280,
        3150
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 65,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 65
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 66
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            74,
            75
          ]
        }
      ],
      "title": "AO from cavity",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.5,
        "multiply"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 110,
      "type": "DepthToNormalMap",
      "pos": [
        2280,
        940
      ],
      "size": [
        300,
        200
      ],
      "flags": {},
      "order": 64,
      "mode": 0,
      "inputs": [
        {
          "name": "depth_maps",
          "type": "IMAGE",
          "link": 62
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            70
          ]
        }
      ],
      "title": "Normal from Height (Sobel)",
      "properties": {
        "cnr_id": "comfyui_cspnodes",
        "ver": "1.0.0",
        "Node name for S&R": "DepthToNormalMap"
      },
      "widgets_values": [
        0.6,
        true,
        false,
        1
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 111,
      "type": "ImageBlend",
      "pos": [
        2280,
        1810
      ],
      "size": [
        300,
        150
      ],
      "flags": {},
      "order": 58,
      "mode": 0,
      "inputs": [
        {
          "name": "image1",
          "type": "IMAGE",
          "link": 63
        },
        {
          "name": "image2",
          "type": "IMAGE",
          "link": 64
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            68,
            76
          ]
        }
      ],
      "title": "Roughness contrast",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageBlend"
      },
      "widgets_values": [
        0.35,
        "overlay"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 60,
      "type": "EmptyImage",
      "pos": [
        2280,
        1640
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            65
          ]
        }
      ],
      "title": "AO white (for ORM)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "EmptyImage"
      },
      "widgets_values": [
        2048,
        2048,
        1,
        16777215
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 70,
      "type": "SaveImage",
      "pos": [
        2660,
        60
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 60,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 67
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Base Color",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/basecolor"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 71,
      "type": "SaveImage",
      "pos": [
        2660,
        400
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 61,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 68
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Roughness",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/roughness"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 72,
      "type": "SaveImage",
      "pos": [
        2660,
        740
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 21,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 69
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Metallic",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/metallic"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 73,
      "type": "SaveImage",
      "pos": [
        2660,
        1080
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 68,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 70
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Normal (OpenGL)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/normal_gl"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 74,
      "type": "SaveImage",
      "pos": [
        2660,
        1420
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 66,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 71
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Height",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/height"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 75,
      "type": "SaveImage",
      "pos": [
        2660,
        1760
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 40,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 72
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Tileable Image",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/tileable"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 128,
      "type": "SaveImage",
      "pos": [
        2660,
        2100
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 67,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 73
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save Normal (DirectX)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/normal_dx"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 129,
      "type": "SaveImage",
      "pos": [
        2660,
        2440
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 69,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 74
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save AO",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/ao"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 76,
      "type": "LayerUtility: ImageChannelMerge",
      "pos": [
        3020,
        60
      ],
      "size": [
        320,
        160
      ],
      "flags": {},
      "order": 70,
      "mode": 0,
      "inputs": [
        {
          "name": "channel_1",
          "type": "IMAGE",
          "link": 75
        },
        {
          "name": "channel_2",
          "type": "IMAGE",
          "link": 76
        },
        {
          "name": "channel_3",
          "type": "IMAGE",
          "link": 77
        },
        {
          "name": "channel_4",
          "shape": 7,
          "type": "IMAGE",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "links": [
            78
          ]
        }
      ],
      "title": "Pack ORM  R=AO G=Rough B=Metal",
      "properties": {
        "cnr_id": "comfyui_layerstyle",
        "ver": "1.0.90",
        "Node name for S&R": "LayerUtility: ImageChannelMerge"
      },
      "widgets_values": [
        "RGBA"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 77,
      "type": "SaveImage",
      "pos": [
        3020,
        250
      ],
      "size": [
        320,
        300
      ],
      "flags": {},
      "order": 71,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 78
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "Save ORM (Unreal)",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "pbr/material_ORM"
      ],
      "color": "#666",
      "bgcolor": "#444"
    },
    {
      "id": 92,
      "type": "MarkdownNote",
      "pos": [
        -620,
        1260
      ],
      "size": [
        540,
        620
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Resolution - read this",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# Resolution\n\nDefault is **2048 x 2048**.\n\n## Why a power of two\nGame engines build mipmap chains and block compression around powers of\ntwo. 2048 works but produces no clean mip chain and streams badly.\nStick to **1024 / 2048 / 4096**.\n\nFor most indie work 2048 is the right call - 4096 quadruples memory for\ndetail nobody sees at gameplay distance.\n\n## Changing it\nSeveral values must match:\n\n| Field | 2048 | 4096 |\n|---|---|---|\n| 2. Target Resolution | 2048 | 4096 |\n| Offset by half edge (shift_x/y) | 1024 | 2048 |\n| Mask base w/h | 2048 | 4096 |\n| Vertical bar height | 2048 | 4096 |\n| Horizontal bar width | 2048 | 4096 |\n| Add vertical bar `x` | 944 | 1968 |\n| Add horizontal bar `y` | 944 | 1968 |\n| Back to target resolution | 2048 | 4096 |\n| Upscale Albedo / Roughness | 2048 | 4096 |\n| High-pass Back to target | 2048 | 4096 |\n| EmptyImage x3 (Metallic, AO) | 2048 | 4096 |\n\nFormula for the two MaskComposite offsets:\n`(resolution - bar width) / 2`\n\nIf the offset is wrong the seam does not sit in the centre and tiling\nbreaks.\n\nDo not exceed the resolution of your source photo. Above that you are\ninventing pixels that were never there."
      ],
      "color": "#6e2a2a",
      "bgcolor": "#4a1c1c"
    },
    {
      "id": 93,
      "type": "MarkdownNote",
      "pos": [
        -620,
        1800
      ],
      "size": [
        540,
        560
      ],
      "flags": {},
      "order": 10,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Models / Licenses",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# Models\n\n| Model | Folder | License |\n|---|---|---|\n| marigold-iid-appearance-v1-1 | models/diffusers | Open RAIL++-M |\n| sd_xl_base_1.0 | models/checkpoints | CreativeML Open RAIL++-M |\n\nThe Marigold models download automatically on first run.\n\n## Custom nodes\n| Package | License |\n|---|---|\n| ComfyUI-Marigold (kijai) | Apache 2.0 |\n| ComfyUI-KJNodes (kijai) | GPL-3.0 |\n| ComfyUI_LayerStyle (chflame163) | MIT |\n| ComfyUI_cspnodes (cerspense) | Apache 2.0 |\n\nOutputs: Base Color, Roughness, Metallic, Height, Normal GL, Normal DX,\nAO, ORM and the tileable source image.\n\nNo non-commercial model is used. This workflow: MIT, laserstudios.\n\n**Note:** `ColorMatch` is marked deprecated in KJNodes and no longer\nappears in node search. It still loads. Replacement: `ColorMatchV2`."
      ],
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 94,
      "type": "MarkdownNote",
      "pos": [
        3400,
        60
      ],
      "size": [
        540,
        620
      ],
      "flags": {},
      "order": 11,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "In Blender / Unreal",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# Downstream\n\n## Colour spaces\n**Base Color** = sRGB - **everything else** = Non-Color / Raw / Linear\n\n## The normal map is computed, not estimated\nIt is derived from the height map with a Sobel gradient at full\nresolution - no model, no 768 px ceiling. Marigold Normals was removed:\nit estimates **scene** normals, and a flat surface shot head-on returns\na flat lavender field, which is correct but useless for texture work.\n\n`normal_intensity` is the strength knob. Default **0.60** - at 2048 px\nthere is already a lot of detail, so lower values usually read better.\nRaise it for shallow surfaces, lower it if the result looks embossed.\n\n`flip_y` turns OpenGL into DirectX if you ever need it here rather than\nin `unreal_prep`.\n\n## Unreal\n- The normal must be flipped to **DirectX** -> workflow `unreal_prep`\n- ORM is already packed here: uncheck `sRGB`, compression `Masks`\n\n## Height as real displacement\nNeeds subdivision on the object. Keep the strength low (0.01-0.05)."
      ],
      "color": "#243b6e",
      "bgcolor": "#1a2a4a"
    },
    {
      "id": 96,
      "type": "MarkdownNote",
      "pos": [
        2640,
        2900
      ],
      "size": [
        560,
        620
      ],
      "flags": {},
      "order": 12,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Height, Normal and AO",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# The height chain\n\nHeight comes from the **luminance** of the tileable image, then runs\nthrough a **high-pass** filter.\n\n## Why the high-pass\nRaw luminance confuses colour with elevation: a white pebble becomes a\nhill, a dark one a pit, even though both sit at the same level. The\nhigh-pass strips the large-scale brightness variation and leaves only\nlocal relief.\n\nBypass the node **High-pass** (Ctrl+B) to compare - image1 passes\nstraight through, so you get the raw height back.\n\n`blend_factor` on **High-pass contrast** is the strength knob for how\npronounced the relief reads. Default 0.55.\n\n## Normal maps\nBoth are generated from the high-passed height with a Sobel gradient at\nfull resolution - no model, no 768 px ceiling.\n\n- `normal_gl` - **OpenGL**, green up. Blender, Cinema 4D, Maya, Godot\n- `normal_dx` - **DirectX**, green flipped. Unreal, Unity\n\n`normal_intensity` (default 0.60) is the depth knob. Raise it for\nshallow surfaces. `depth_scale` goes up to 2.0 and helps when the height\nmap has a narrow value range.\n\n## AO\nDerived from the cavity of the high-passed height, biased towards white.\nIt is a **cavity approximation**, not true ambient occlusion - it darkens\ncrevices, it does not compute light transport.\n\nMost renderers do their own AO. Use this one for mobile, VR, or baked\nlighting, and leave it out otherwise. `blend_factor` sets the strength;\n0.0 gives a plain white map."
      ],
      "color": "#243b6e",
      "bgcolor": "#1a2a4a"
    },
    {
      "id": 103,
      "type": "MaskComposite",
      "pos": [
        754.8590909090914,
        470.2499999999998
      ],
      "size": [
        300,
        160
      ],
      "flags": {},
      "order": 18,
      "mode": 0,
      "inputs": [
        {
          "name": "destination",
          "type": "MASK",
          "link": 4
        },
        {
          "name": "source",
          "type": "MASK",
          "link": 5
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            6
          ]
        }
      ],
      "title": "Add vertical bar",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "MaskComposite"
      },
      "widgets_values": [
        944,
        0,
        "add"
      ]
    },
    {
      "id": 104,
      "type": "MaskComposite",
      "pos": [
        759.438627272728,
        637.8598909090906
      ],
      "size": [
        300,
        160
      ],
      "flags": {},
      "order": 23,
      "mode": 0,
      "inputs": [
        {
          "name": "destination",
          "type": "MASK",
          "link": 6
        },
        {
          "name": "source",
          "type": "MASK",
          "link": 7
        }
      ],
      "outputs": [
        {
          "name": "MASK",
          "type": "MASK",
          "links": [
            8
          ]
        }
      ],
      "title": "Add horizontal bar -> cross",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "MaskComposite"
      },
      "widgets_values": [
        0,
        944,
        "add"
      ],
      "color": "#2a6e3f",
      "bgcolor": "#1c4a2a"
    },
    {
      "id": 18,
      "type": "InpaintModelConditioning",
      "pos": [
        762.2200363636362,
        961.4247545454542
      ],
      "size": [
        300,
        180
      ],
      "flags": {},
      "order": 31,
      "mode": 0,
      "inputs": [
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 13
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 14
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 15
        },
        {
          "name": "pixels",
          "type": "IMAGE",
          "link": 16
        },
        {
          "name": "mask",
          "type": "MASK",
          "link": 17
        }
      ],
      "outputs": [
        {
          "name": "positive",
          "type": "CONDITIONING",
          "links": [
            19
          ]
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "links": [
            20
          ]
        },
        {
          "name": "latent",
          "type": "LATENT",
          "links": [
            21
          ]
        }
      ],
      "title": "Inpaint Conditioning",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "InpaintModelConditioning"
      },
      "widgets_values": [
        true
      ]
    },
    {
      "id": 19,
      "type": "KSampler",
      "pos": [
        751.2153999999998,
        1194.9458999999997
      ],
      "size": [
        300,
        262
      ],
      "flags": {},
      "order": 32,
      "mode": 0,
      "inputs": [
        {
          "name": "model",
          "type": "MODEL",
          "link": 18
        },
        {
          "name": "positive",
          "type": "CONDITIONING",
          "link": 19
        },
        {
          "name": "negative",
          "type": "CONDITIONING",
          "link": 20
        },
        {
          "name": "latent_image",
          "type": "LATENT",
          "link": 21
        }
      ],
      "outputs": [
        {
          "name": "LATENT",
          "type": "LATENT",
          "links": [
            22
          ]
        }
      ],
      "title": "Sample the seam",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "KSampler"
      },
      "widgets_values": [
        123,
        "fixed",
        25,
        6,
        "dpmpp_2m",
        "karras",
        0.7
      ]
    },
    {
      "id": 20,
      "type": "VAEDecode",
      "pos": [
        755.6077,
        1511.0509999999986
      ],
      "size": [
        300,
        60
      ],
      "flags": {},
      "order": 33,
      "mode": 0,
      "inputs": [
        {
          "name": "samples",
          "type": "LATENT",
          "link": 22
        },
        {
          "name": "vae",
          "type": "VAE",
          "link": 23
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            24
          ]
        }
      ],
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "VAEDecode"
      },
      "widgets_values": []
    },
    {
      "id": 21,
      "type": "ImageScale",
      "pos": [
        760.0000000000001,
        1637.6535000000001
      ],
      "size": [
        300,
        130
      ],
      "flags": {},
      "order": 34,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 24
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            28
          ]
        }
      ],
      "title": "Back to target resolution",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "ImageScale"
      },
      "widgets_values": [
        "lanczos",
        2048,
        2048,
        "disabled"
      ]
    },
    {
      "id": 95,
      "type": "MarkdownNote",
      "pos": [
        402.4308000000001,
        1906.4381000000005
      ],
      "size": [
        520,
        520
      ],
      "flags": {},
      "order": 13,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Why a hand-built mask",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# The seam mask\n\nThe mask is built from `SolidMask` + `MaskComposite`: a black field with\ntwo white bars forming a cross in the exact centre of the image.\n\n**Why not the `border_mask` output of ImageShift?** With `cyclic = true`\nnothing is left blank, so that output returns a full white mask - which\ntells the sampler to repaint the entire surface. That is exactly what\ngoes wrong if you wire it up.\n\n## The one knob that matters\n`width` on **Vertical bar** and `height` on **Horizontal bar** set how\nwide the repaired band is. 160 px at 2048 is about 8 percent of the\nimage.\n\n- Too narrow: the seam still shows\n- Too wide: you throw away photo detail for no reason\n\nIf you change it, the two `MaskComposite` offsets must follow:\n`(resolution - bar width) / 2`.\n\n## Denoise\nSet to **0.70**, not 1.0. At full denoise the sampler invents freely and\nmisses the material. Below 0.5 the seam usually survives."
      ],
      "color": "#6e2a2a",
      "bgcolor": "#4a1c1c"
    },
    {
      "id": 91,
      "type": "MarkdownNote",
      "pos": [
        -620,
        620
      ],
      "size": [
        540,
        620
      ],
      "flags": {},
      "order": 14,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Convert to subgraphs",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# Four groups, four steps\n\nThe four coloured groups are cut so that each one becomes exactly one\nsubgraph.\n\n1. Select the nodes (rubber-band select, not the group title bar)\n2. Right click -> **Convert to Subgraph**\n3. Select the subgraph -> **Edit Subgraph Widgets**\n4. Set the widgets listed below to visible, hide the rest\n\nConvert **back to front**: [D], then [C], [B], [A].\n\n## What belongs on top\n\n**[A] Tile**\n- `denoise` and `steps` on the sampler\n- `seed`\n- `value` / `width` on the two bar masks (seam band width)\n\n**[C] Detail**\n- `strength` on Match colour to photo\n- `blend_factor` on Detail from photo (sharpness)\n- `blend_factor` on Darken (brightness)\n\n**[D] Output**\n- the `filename_prefix` fields\n\nEverything else stays inside.\n\n**Why not pre-packed?** The subgraph format changed several times\nbetween frontend versions. Hand-written it loads wrong on some of them.\nConverting in the UI always matches your build."
      ],
      "color": "#243",
      "bgcolor": "#020"
    },
    {
      "id": 90,
      "type": "MarkdownNote",
      "pos": [
        -620,
        40
      ],
      "size": [
        540,
        560
      ],
      "flags": {},
      "order": 15,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Read first - structure",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# One workflow, four building blocks\n\n```\n1. Load photo\n2. Target resolution\n   |\n[A] Tile        offset + seam repair\n   |\n3. 4. Preview   check here before moving on\n   |\n[B] Marigold    albedo / roughness / normal at 768\n   |\n[C] Detail      frequency split, sharpness restored\n   |\n[D] Output      9 maps + ORM\n```\n\n**Why the AI stages run small:** Marigold works at 768, SDXL at 1024.\nThat is fixed. The output sharpness therefore does **not** come through a\nmodel - it comes straight from the photo. The models only supply the\ncoarse layer.\n\nThe seam is the one exception: there is no original left there, so only\nthat narrow band gets replaced."
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 97,
      "type": "MarkdownNote",
      "pos": [
        -49.047619047619044,
        1083.3333333333333
      ],
      "size": [
        424.0432800000001,
        672.7357
      ],
      "flags": {},
      "order": 16,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Batch processing",
      "properties": {
        "Node name for S&R": "MarkdownNote"
      },
      "widgets_values": [
        "# Batch processing\n\nThe node **BATCH** in the input group is bypassed by default. It turns\nthe workflow from one-photo-at-a-time into a folder run.\n\n## Switching it on\n1. Select the node, press **Ctrl+B** to un-bypass\n2. Enter the folder in `directory_path` (absolute path)\n3. Drag its `IMAGE` output onto `2. Target Resolution` - this replaces\n   the link coming from **1. Load Photo**\n4. Set `batch_size` to how many photos per run\n\n## How the index works\n`image_index` picks which photo. To walk through a folder, right click\nthe widget, set it to **increment**, then queue as many runs as you have\nphotos.\n\n`sort_by` and `sort_order` decide the order. `glob_patterns` filters\nwhich files are picked up.\n\n## Watch out\nEvery photo is forced to the target resolution with `crop = center`.\nNon-square photos lose their edges. Crop deliberately beforehand if that\nmatters.\n\nEach run overwrites nothing - the `filename_prefix` counter keeps\ncounting up. But the maps of photo 3 and photo 4 land in the same folder\nwith sequential numbers, so keep track of which set belongs together.\nThe `STRING` output carries the source filenames if you want to route\nthem somewhere."
      ],
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 1,
      "type": "LoadImage",
      "pos": [
        40,
        60
      ],
      "size": [
        300,
        320
      ],
      "flags": {},
      "order": 17,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            1
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": []
        }
      ],
      "title": "1. Load Photo",
      "properties": {
        "cnr_id": "comfy-core",
        "ver": "0.28.0",
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "boden2.png",
        "image"
      ],
      "color": "#3f789e",
      "bgcolor": "#2a4a5e"
    }
  ],
  "links": [
    [
      1,
      1,
      0,
      2,
      0,
      "IMAGE"
    ],
    [
      2,
      2,
      0,
      10,
      0,
      "IMAGE"
    ],
    [
      3,
      10,
      0,
      11,
      0,
      "IMAGE"
    ],
    [
      4,
      100,
      0,
      103,
      0,
      "MASK"
    ],
    [
      5,
      101,
      0,
      103,
      1,
      "MASK"
    ],
    [
      6,
      103,
      0,
      104,
      0,
      "MASK"
    ],
    [
      7,
      102,
      0,
      104,
      1,
      "MASK"
    ],
    [
      8,
      104,
      0,
      105,
      0,
      "MASK"
    ],
    [
      9,
      105,
      0,
      13,
      0,
      "IMAGE"
    ],
    [
      10,
      13,
      0,
      14,
      0,
      "IMAGE"
    ],
    [
      11,
      15,
      1,
      16,
      0,
      "CLIP"
    ],
    [
      12,
      15,
      1,
      17,
      0,
      "CLIP"
    ],
    [
      13,
      16,
      0,
      18,
      0,
      "CONDITIONING"
    ],
    [
      14,
      17,
      0,
      18,
      1,
      "CONDITIONING"
    ],
    [
      15,
      15,
      2,
      18,
      2,
      "VAE"
    ],
    [
      16,
      11,
      0,
      18,
      3,
      "IMAGE"
    ],
    [
      17,
      14,
      0,
      18,
      4,
      "MASK"
    ],
    [
      18,
      15,
      0,
      19,
      0,
      "MODEL"
    ],
    [
      19,
      18,
      0,
      19,
      1,
      "CONDITIONING"
    ],
    [
      20,
      18,
      1,
      19,
      2,
      "CONDITIONING"
    ],
    [
      21,
      18,
      2,
      19,
      3,
      "LATENT"
    ],
    [
      22,
      19,
      0,
      20,
      0,
      "LATENT"
    ],
    [
      23,
      15,
      2,
      20,
      1,
      "VAE"
    ],
    [
      24,
      20,
      0,
      21,
      0,
      "IMAGE"
    ],
    [
      25,
      105,
      0,
      22,
      0,
      "IMAGE"
    ],
    [
      26,
      22,
      0,
      23,
      0,
      "IMAGE"
    ],
    [
      27,
      10,
      0,
      24,
      0,
      "IMAGE"
    ],
    [
      28,
      21,
      0,
      24,
      1,
      "IMAGE"
    ],
    [
      29,
      23,
      0,
      24,
      2,
      "MASK"
    ],
    [
      30,
      24,
      0,
      30,
      0,
      "IMAGE"
    ],
    [
      31,
      24,
      0,
      31,
      0,
      "IMAGE"
    ],
    [
      32,
      24,
      0,
      31,
      1,
      "IMAGE"
    ],
    [
      33,
      31,
      0,
      32,
      0,
      "IMAGE"
    ],
    [
      34,
      31,
      0,
      32,
      1,
      "IMAGE"
    ],
    [
      35,
      32,
      0,
      33,
      0,
      "IMAGE"
    ],
    [
      36,
      24,
      0,
      40,
      0,
      "IMAGE"
    ],
    [
      37,
      41,
      0,
      42,
      0,
      "MARIGOLDMODEL"
    ],
    [
      38,
      40,
      0,
      42,
      1,
      "IMAGE"
    ],
    [
      39,
      42,
      0,
      43,
      0,
      "IMAGE"
    ],
    [
      40,
      42,
      0,
      44,
      0,
      "IMAGE"
    ],
    [
      41,
      44,
      0,
      45,
      0,
      "IMAGE"
    ],
    [
      42,
      45,
      0,
      46,
      0,
      "MASK"
    ],
    [
      43,
      43,
      0,
      50,
      0,
      "IMAGE"
    ],
    [
      44,
      24,
      0,
      51,
      0,
      "IMAGE"
    ],
    [
      45,
      50,
      0,
      51,
      1,
      "IMAGE"
    ],
    [
      46,
      51,
      0,
      52,
      0,
      "IMAGE"
    ],
    [
      47,
      24,
      0,
      52,
      1,
      "IMAGE"
    ],
    [
      48,
      52,
      0,
      53,
      0,
      "IMAGE"
    ],
    [
      49,
      52,
      0,
      53,
      1,
      "IMAGE"
    ],
    [
      50,
      46,
      0,
      54,
      0,
      "IMAGE"
    ],
    [
      51,
      24,
      0,
      56,
      0,
      "IMAGE"
    ],
    [
      52,
      56,
      0,
      57,
      0,
      "MASK"
    ],
    [
      53,
      57,
      0,
      120,
      0,
      "IMAGE"
    ],
    [
      54,
      120,
      0,
      121,
      0,
      "IMAGE"
    ],
    [
      55,
      121,
      0,
      122,
      0,
      "IMAGE"
    ],
    [
      56,
      122,
      0,
      123,
      0,
      "IMAGE"
    ],
    [
      57,
      57,
      0,
      124,
      0,
      "IMAGE"
    ],
    [
      58,
      123,
      0,
      124,
      1,
      "IMAGE"
    ],
    [
      59,
      124,
      0,
      125,
      0,
      "IMAGE"
    ],
    [
      60,
      124,
      0,
      125,
      1,
      "IMAGE"
    ],
    [
      61,
      125,
      0,
      126,
      0,
      "IMAGE"
    ],
    [
      62,
      125,
      0,
      110,
      0,
      "IMAGE"
    ],
    [
      63,
      54,
      0,
      111,
      0,
      "IMAGE"
    ],
    [
      64,
      54,
      0,
      111,
      1,
      "IMAGE"
    ],
    [
      65,
      60,
      0,
      127,
      0,
      "IMAGE"
    ],
    [
      66,
      125,
      0,
      127,
      1,
      "IMAGE"
    ],
    [
      67,
      53,
      0,
      70,
      0,
      "IMAGE"
    ],
    [
      68,
      111,
      0,
      71,
      0,
      "IMAGE"
    ],
    [
      69,
      58,
      0,
      72,
      0,
      "IMAGE"
    ],
    [
      70,
      110,
      0,
      73,
      0,
      "IMAGE"
    ],
    [
      71,
      125,
      0,
      74,
      0,
      "IMAGE"
    ],
    [
      72,
      24,
      0,
      75,
      0,
      "IMAGE"
    ],
    [
      73,
      126,
      0,
      128,
      0,
      "IMAGE"
    ],
    [
      74,
      127,
      0,
      129,
      0,
      "IMAGE"
    ],
    [
      75,
      127,
      0,
      76,
      0,
      "IMAGE"
    ],
    [
      76,
      111,
      0,
      76,
      1,
      "IMAGE"
    ],
    [
      77,
      58,
      0,
      76,
      2,
      "IMAGE"
    ],
    [
      78,
      76,
      0,
      77,
      0,
      "IMAGE"
    ]
  ],
  "groups": [
    {
      "id": 1,
      "title": "1. 2. Input (keep visible)",
      "bounding": [
        20,
        -10,
        340,
        960
      ],
      "color": "#3f789e",
      "flags": {}
    },
    {
      "id": 2,
      "title": "[A] SG_Tile  ->  convert to subgraph",
      "bounding": [
        400,
        -10,
        1019.2097799999999,
        1810.5212999999999
      ],
      "color": "#88A",
      "flags": {}
    },
    {
      "id": 3,
      "title": "3. 4. Preview (keep visible)",
      "bounding": [
        1480,
        -10,
        380,
        1180
      ],
      "color": "#a1662f",
      "flags": {}
    },
    {
      "id": 4,
      "title": "[B] SG_Marigold  ->  convert to subgraph",
      "bounding": [
        1880,
        -10,
        340,
        1120
      ],
      "color": "#8154a6",
      "flags": {}
    },
    {
      "id": 5,
      "title": "[C] SG_Detail  ->  convert to subgraph",
      "bounding": [
        2260,
        -10,
        340,
        3350
      ],
      "color": "#2a6e3f",
      "flags": {}
    },
    {
      "id": 6,
      "title": "[D] SG_Output  ->  convert to subgraph",
      "bounding": [
        2640,
        -10,
        720,
        2800
      ],
      "color": "#666",
      "flags": {}
    }
  ],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.35049389948139237,
      "offset": [
        1269.516406714887,
        766.1317300205109
      ]
    },
    "frontendVersion": "1.45.21",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}