{
  "id": "65921f96-39e0-48c0-90f0-48a3907755e3",
  "revision": 0,
  "last_node_id": 31,
  "last_link_id": 24,
  "nodes": [
    {
      "id": 21,
      "type": "SaveImage",
      "pos": [
        913.024172616747,
        8.987101490822187
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 18
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "title": "basecolor",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_basecolor"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_basecolor"
      }
    },
    {
      "id": 22,
      "type": "SaveImage",
      "pos": [
        69.7270991066008,
        8.987101490822187
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 19
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "title": "normal",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_normal"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_normal"
      }
    },
    {
      "id": 23,
      "type": "SaveImage",
      "pos": [
        491.3756358616739,
        8.987101490822187
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 17
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": null
        }
      ],
      "title": "texture",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_texture"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_texture"
      }
    },
    {
      "id": 24,
      "type": "SaveImage",
      "pos": [
        913.024172616747,
        508.9863459864372
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 20
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "roughness",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_roughness"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_roughness"
      }
    },
    {
      "id": 25,
      "type": "SaveImage",
      "pos": [
        69.7270991066008,
        508.9863459864372
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 21
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "metalness",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_metalness"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_metalness"
      }
    },
    {
      "id": 26,
      "type": "SaveImage",
      "pos": [
        491.3756358616739,
        508.9863459864372
      ],
      "size": [
        373.6485367550731,
        421.999244495615
      ],
      "flags": {},
      "order": 8,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 22
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "title": "height",
      "properties": {
        "Node name for S&R": "SaveImage"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_height"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_height"
      }
    },
    {
      "id": 27,
      "type": "SaveText",
      "pos": [
        1344.4437364341845,
        10.211257943315161
      ],
      "size": [
        402.051097237096,
        411.75603311460543
      ],
      "flags": {},
      "order": 9,
      "mode": 0,
      "inputs": [
        {
          "name": "text",
          "type": "STRING",
          "link": 23
        }
      ],
      "outputs": [
        {
          "name": "text",
          "type": "STRING",
          "links": null
        }
      ],
      "title": "expanded prompt",
      "properties": {
        "Node name for S&R": "SaveText"
      },
      "widgets_values": [
        "patina/%year%%month%%day%-%hour%%minute%_expanded_prompt",
        "txt"
      ],
      "widgets_values_named": {
        "filename_prefix": "patina/%year%%month%%day%-%hour%%minute%_expanded_prompt",
        "format": "txt"
      }
    },
    {
      "id": 29,
      "type": "MarkdownNote",
      "pos": [
        -1679.9011953297181,
        5.5507614931625895
      ],
      "size": [
        587.2726037200163,
        782.0166239750356
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "# Patina Material\n\n**Photo -> complete, seamlessly tiling PBR material.** The source image sets the pattern; Patina redraws it as a\ntiling material and returns basecolor / normal / roughness / metalness / height maps from the same latent, so the whole\nset lines up pixel for pixel. Partner (API) node: it runs on Comfy's servers, needs an account, nothing renders locally.\n\n## Input Asset\n\n- [patina_brick_wall.jpg](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/patina_brick_wall.jpg)\n\n## How to use it\n\n- **Load Image** holds the surface photo. Anything with a regular structure works: brick, stone, wood, plaster, fabric, tile.\n- `prompt` describes the material you want back, not the scene. Name the pattern and the finish, and add\n  \"flat even lighting, no perspective\" - that is what makes the result tile.\n- `strength` (advanced, 0.6 here) sets how far it moves away from the photo: low keeps the original texture, high\n  rewrites more of it.\n- The optional **mask** input inpaints a region (white = regenerate, black = keep). A mask without an image raises an error.\n- Want a texture from text alone, with no source photo? Use the Patina Material text-to-material template instead.\n  Want the maps of a photo without making it tile? The Patina PBR Maps node is the direct converter.\n\n## Outputs - wire in this slot order\n\n`0 texture` . `1 basecolor` . `2 normal` . `3 roughness` . `4 metalness` . `5 height` . `6 expanded_prompt`\n\nEvery map can be switched off, but at least one has to stay on. Fewer maps = a cheaper, faster run.\n\n## Tips that actually matter\n\n- `image_size`: presets 1024², 512², 4:3, 3:4, 16:9, 9:16, or `custom` (512-2048, step 16).\n- `num_inference_steps` tops out at 8 - there is nothing to gain above that.\n- `tile_size` is in latent space: 128 is about 1024 px, 64 about 512 px. `tiling_mode` = both / horizontal / vertical.\n- `prompt_expansion` is **off by default on purpose**: the LLM rewrite reframes the prompt as a photo and tends to wash\n  out the metalness map.\n- `upscale_factor` 2 or 4 upscales the **maps only** (SeedVR) - the base texture is never upscaled.\n- Structured materials work best. Free-form marble, flat gradients and anything relying on readable text come back as\n  plausible-looking nonsense.\n\n## This workflow\n\nBrick wall photo, basecolor and normal maps on. Every save node writes to `patina/<yyyymmdd>-<hhmm>_<map>`, so one run's\nfiles sit next to each other in the output folder and runs from different days never mix."
      ],
      "widgets_values_named": {
        "text": "# Patina Material\n\n**Photo -> complete, seamlessly tiling PBR material.** The source image sets the pattern; Patina redraws it as a\ntiling material and returns basecolor / normal / roughness / metalness / height maps from the same latent, so the whole\nset lines up pixel for pixel. Partner (API) node: it runs on Comfy's servers, needs an account, nothing renders locally.\n\n## Input Asset\n\n- [patina_brick_wall.jpg](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/patina_brick_wall.jpg)\n\n## How to use it\n\n- **Load Image** holds the surface photo. Anything with a regular structure works: brick, stone, wood, plaster, fabric, tile.\n- `prompt` describes the material you want back, not the scene. Name the pattern and the finish, and add\n  \"flat even lighting, no perspective\" - that is what makes the result tile.\n- `strength` (advanced, 0.6 here) sets how far it moves away from the photo: low keeps the original texture, high\n  rewrites more of it.\n- The optional **mask** input inpaints a region (white = regenerate, black = keep). A mask without an image raises an error.\n- Want a texture from text alone, with no source photo? Use the Patina Material text-to-material template instead.\n  Want the maps of a photo without making it tile? The Patina PBR Maps node is the direct converter.\n\n## Outputs - wire in this slot order\n\n`0 texture` . `1 basecolor` . `2 normal` . `3 roughness` . `4 metalness` . `5 height` . `6 expanded_prompt`\n\nEvery map can be switched off, but at least one has to stay on. Fewer maps = a cheaper, faster run.\n\n## Tips that actually matter\n\n- `image_size`: presets 1024², 512², 4:3, 3:4, 16:9, 9:16, or `custom` (512-2048, step 16).\n- `num_inference_steps` tops out at 8 - there is nothing to gain above that.\n- `tile_size` is in latent space: 128 is about 1024 px, 64 about 512 px. `tiling_mode` = both / horizontal / vertical.\n- `prompt_expansion` is **off by default on purpose**: the LLM rewrite reframes the prompt as a photo and tends to wash\n  out the metalness map.\n- `upscale_factor` 2 or 4 upscales the **maps only** (SeedVR) - the base texture is never upscaled.\n- Structured materials work best. Free-form marble, flat gradients and anything relying on readable text come back as\n  plausible-looking nonsense.\n\n## This workflow\n\nBrick wall photo, basecolor and normal maps on. Every save node writes to `patina/<yyyymmdd>-<hhmm>_<map>`, so one run's\nfiles sit next to each other in the output folder and runs from different days never mix."
      },
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 30,
      "type": "LoadImage",
      "pos": [
        -1042.6017450647105,
        8.91382408372887
      ],
      "size": [
        510.0382546262741,
        600.3382496768281
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            24
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "patina_brick_wall.jpg",
        "image"
      ],
      "widgets_values_named": {
        "image": "patina_brick_wall.jpg",
        "upload": "image"
      }
    },
    {
      "id": 31,
      "type": "PatinaMaterialNode",
      "pos": [
        -456.5165783433979,
        11.06321397085425
      ],
      "size": [
        400,
        592
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "shape": 7,
          "type": "IMAGE",
          "link": 24
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "texture",
          "type": "IMAGE",
          "links": [
            17
          ]
        },
        {
          "name": "basecolor",
          "type": "IMAGE",
          "links": [
            18
          ]
        },
        {
          "name": "normal",
          "type": "IMAGE",
          "links": [
            19
          ]
        },
        {
          "name": "roughness",
          "type": "IMAGE",
          "links": [
            20
          ]
        },
        {
          "name": "metalness",
          "type": "IMAGE",
          "links": [
            21
          ]
        },
        {
          "name": "height",
          "type": "IMAGE",
          "links": [
            22
          ]
        },
        {
          "name": "expanded_prompt",
          "type": "STRING",
          "links": [
            23
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "PatinaMaterialNode"
      },
      "widgets_values": [
        "seamless tiling grey-brown brick wall, keep the running bond and pale lime mortar joints of the source photo, weathered stone faces with fine grain, flat even lighting, no perspective",
        "1:1 (1024x1024)",
        true,
        true,
        true,
        true,
        true,
        0,
        42,
        "randomize",
        "both",
        8,
        128,
        64,
        0.6,
        false,
        false
      ],
      "widgets_values_named": {
        "prompt": "seamless tiling grey-brown brick wall, keep the running bond and pale lime mortar joints of the source photo, weathered stone faces with fine grain, flat even lighting, no perspective",
        "image_size": "1:1 (1024x1024)",
        "basecolor": true,
        "normal": true,
        "roughness": true,
        "metalness": true,
        "height": true,
        "upscale_factor": 0,
        "seed": 42,
        "control_after_generate": "randomize",
        "tiling_mode": "both",
        "num_inference_steps": 8,
        "tile_size": 128,
        "tile_stride": 64,
        "strength": 0.6,
        "prompt_expansion": false,
        "safety_checker": false
      },
      "color": "#432",
      "bgcolor": "#653"
    }
  ],
  "links": [
    [
      17,
      31,
      0,
      23,
      0,
      "IMAGE"
    ],
    [
      18,
      31,
      1,
      21,
      0,
      "IMAGE"
    ],
    [
      19,
      31,
      2,
      22,
      0,
      "IMAGE"
    ],
    [
      20,
      31,
      3,
      24,
      0,
      "IMAGE"
    ],
    [
      21,
      31,
      4,
      25,
      0,
      "IMAGE"
    ],
    [
      22,
      31,
      5,
      26,
      0,
      "IMAGE"
    ],
    [
      23,
      31,
      6,
      27,
      0,
      "STRING"
    ],
    [
      24,
      30,
      0,
      31,
      0,
      "IMAGE"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.538108313002308,
      "offset": [
        2019.9525392174532,
        661.0856369893509
      ]
    },
    "frontendVersion": "1.57.4"
  },
  "version": 0.4
}