{
  "id": "fb5b92b3-fd02-4753-8d96-4f8848898ee8",
  "revision": 0,
  "last_node_id": 16,
  "last_link_id": 32,
  "nodes": [
    {
      "id": 2,
      "type": "LoadImage",
      "pos": [
        -2900,
        4860
      ],
      "size": [
        360,
        470
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            31
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": []
        }
      ],
      "properties": {
        "Node name for S&R": "LoadImage",
        "image": "clipspace-painted-masked-1787233871783.png [input]"
      },
      "widgets_values": [
        "red_sports_car_night.png",
        "image"
      ]
    },
    {
      "id": 4,
      "type": "SaveImageAdvanced",
      "pos": [
        -2040,
        4860
      ],
      "size": [
        550,
        377.875
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 32
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": []
        }
      ],
      "properties": {},
      "widgets_values": [
        "Bria_Expand_Image",
        "png",
        "8-bit",
        "sRGB"
      ]
    },
    {
      "id": 13,
      "type": "MarkdownNote",
      "pos": [
        -3380,
        4860
      ],
      "size": [
        440,
        899.640625
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "title": "Note: Bria Expand Image",
      "properties": {},
      "widgets_values": [
        "# Bria Expand Image Template\n\nUse this template to **expand an image beyond its original borders** with Bria's Expand API (outpainting). The original image stays untouched; the surrounding area is generated to match its lighting, perspective and texture.\n\n## Input Assets\n\n- [red_sports_car_night.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/red_sports_car_night.png)\n\n## How to use\n\n1. **Load an image**: Upload your image in `LoadImage` and connect it to `BriaExpandImage`.\n2. **Choose an expansion mode** in the `expand_mode` dropdown:\n   - **Preset aspect ratio**: Pick one of `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`. The image is centered and the edges are expanded to fit that ratio.\n   - **Custom ratio**: Pick `custom_ratio` and set `ratio_width` / `ratio_height` (e.g. 21 and 9 for 21:9). Bria accepts width-to-height ratios between 0.5 and 3.0, so anything taller than 1:2 needs the manual mode.\n   - **Manual**: Pick `manual` and place the original image on a canvas with `canvas_width` / `canvas_height` (max 5000 × 5000), `image_width` / `image_height`, and `image_x` / `image_y` (the image's top-left corner; can be negative to crop).\n3. **Prompt (optional)**: Two behaviors:\n   - **Leave it empty**: Bria automatically generates a prompt from the input image and expands to match its scene and style. This works well for simple expansions.\n   - **Write your own**: Guide the expansion direction explicitly, e.g. \"the street continuing to the right\", \"add a streetlamp\", \"no other cars\". English only; special characters are not supported.\n4. **Optional**: `negative_prompt` to avoid unwanted content, `seed` to reproduce a result, `moderation` to enable content moderation.\n5. **Save**: connect the image output to `SaveImage`.\n\n## Notes\n\n- The `prompt` output on the node shows the prompt actually used: your input, or the one auto-generated by Bria when the field is empty.\n- If the target aspect ratio equals the image's current ratio (e.g. a 1:1 image set to `1:1`), no changes are made and the image is returned as-is.\n- Canvas area is limited to 5,000 × 5,000 pixels. Keep the main subject above **15% of the total canvas area** for best results.\n- `preserve_alpha` keeps transparency (the API inherits alpha from the nearest original pixels). Expansion is rejected (422) if any image edge has fully transparent pixels."
      ],
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 16,
      "type": "BriaExpandImage",
      "pos": [
        -2490,
        4860
      ],
      "size": [
        400,
        361.890625
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "image",
          "type": "IMAGE",
          "link": 31
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            32
          ]
        },
        {
          "name": "prompt",
          "type": "STRING",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "BriaExpandImage"
      },
      "widgets_values": [
        "16:9",
        "The night city street continuing seamlessly beyond the original frame, matching the existing scene: blurred colorful city lights in blue, orange and yellow, wet asphalt road with reflections of the neon lights, modern building silhouettes in the background, the same motion-blurred aesthetic and cool blue-grey color grading, empty street with no other cars, realistic night photography style",
        "",
        1270036642,
        "randomize",
        "false"
      ],
      "color": "#432",
      "bgcolor": "#653"
    }
  ],
  "links": [
    [
      31,
      2,
      0,
      16,
      0,
      "IMAGE"
    ],
    [
      32,
      16,
      0,
      4,
      0,
      "IMAGE"
    ]
  ],
  "groups": [],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.8180279679683498,
      "offset": [
        3683.018988118275,
        -4404.051980771512
      ]
    },
    "frontendVersion": "1.48.7",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}