{
  "id": "19291425-9102-405f-969a-4281ebcb00c2",
  "revision": 0,
  "last_node_id": 11,
  "last_link_id": 17,
  "nodes": [
    {
      "id": 2,
      "type": "LoadImage",
      "pos": [
        100,
        -300
      ],
      "size": [
        520,
        890
      ],
      "flags": {},
      "order": 0,
      "mode": 0,
      "inputs": [],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            5,
            7,
            10
          ]
        },
        {
          "name": "MASK",
          "type": "MASK",
          "links": null
        }
      ],
      "properties": {
        "Node name for S&R": "LoadImage"
      },
      "widgets_values": [
        "woman_with_flower_swim_shot.png",
        "image"
      ],
      "widgets_values_named": {
        "image": "woman_with_flower_swim_shot.png",
        "upload": "image"
      }
    },
    {
      "id": 3,
      "type": "CreateBoundingBoxes",
      "pos": [
        760,
        -300
      ],
      "size": [
        520,
        919.7109182567319
      ],
      "flags": {},
      "order": 2,
      "mode": 0,
      "inputs": [
        {
          "name": "background",
          "shape": 7,
          "type": "IMAGE",
          "link": 5
        },
        {
          "name": "bboxes",
          "shape": 7,
          "type": "BOUNDING_BOX,ARRAY,STRING",
          "link": null
        }
      ],
      "outputs": [
        {
          "name": "preview",
          "type": "IMAGE",
          "links": null
        },
        {
          "name": "bboxes",
          "type": "BOUNDING_BOX",
          "links": null
        },
        {
          "name": "elements",
          "type": "ARRAY",
          "links": [
            11,
            13
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "CreateBoundingBoxes"
      },
      "widgets_values": [
        896,
        1152,
        [
          {
            "x": 192,
            "y": 704,
            "width": 588,
            "height": 340,
            "metadata": {
              "type": "obj",
              "text": "",
              "desc": "Turn the flowers into goldfish swimming in the water",
              "palette": []
            }
          }
        ],
        []
      ],
      "widgets_values_named": {
        "width": 896,
        "height": 1152,
        "editor_state": [
          {
            "x": 192,
            "y": 704,
            "width": 588,
            "height": 340,
            "metadata": {
              "type": "obj",
              "text": "",
              "desc": "Turn the flowers into goldfish swimming in the water",
              "palette": []
            }
          }
        ],
        "last_incoming": []
      }
    },
    {
      "id": 6,
      "type": "SaveImageAdvanced",
      "pos": [
        2610,
        -300
      ],
      "size": [
        620,
        790
      ],
      "flags": {},
      "order": 6,
      "mode": 0,
      "inputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "link": 12
        }
      ],
      "outputs": [
        {
          "name": "images",
          "type": "IMAGE",
          "links": [
            8
          ]
        }
      ],
      "properties": {},
      "widgets_values": [
        "api_bfl_flux3_1_image_bboxes",
        "png",
        "8-bit",
        "sRGB",
        "auto"
      ],
      "widgets_values_named": {
        "filename_prefix": "api_bfl_flux3_1_image_bboxes",
        "format": "png",
        "format.bit_depth": "8-bit",
        "format.input_color_space": "sRGB",
        "format.channels": "auto"
      }
    },
    {
      "id": 7,
      "type": "ImageCompare",
      "pos": [
        3370,
        -300
      ],
      "size": [
        750,
        790
      ],
      "flags": {},
      "order": 7,
      "mode": 0,
      "inputs": [
        {
          "name": "image_a",
          "shape": 7,
          "type": "IMAGE",
          "link": 7
        },
        {
          "name": "image_b",
          "shape": 7,
          "type": "IMAGE",
          "link": 8
        }
      ],
      "outputs": [],
      "properties": {
        "Node name for S&R": "ImageCompare"
      },
      "widgets_values": [],
      "widgets_values_named": {}
    },
    {
      "id": 8,
      "type": "MarkdownNote",
      "pos": [
        -420,
        -300
      ],
      "size": [
        460,
        1010
      ],
      "flags": {},
      "order": 1,
      "mode": 0,
      "inputs": [],
      "outputs": [],
      "properties": {},
      "widgets_values": [
        "## Input Asset\n\n- [woman_with_flower_swim_shot.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/woman_with_flower_swim_shot.png)\n\n**FLUX 3.1 Image - editing inside boxes**\n\nDraw a box, describe what happens inside it, and the rest of the photo stays. Boxes are how you point at one object instead of the whole frame.\n\n**How to use it**\n1. `Load Image` starts with the sample swimmer shot - swap in your own photo.\n2. In `Create Bounding Boxes`, left-click and drag over the area to change, then write the change into that box's `desc`. Background boxes first, foreground last, one box per element.\n3. `FLUX 3 Image Layout Prompt` adds that table after its own text, and that text is the caption, so state the rule there: change only what the boxes describe, keep everything else as it is.\n4. Set the canvas width and height in `Create Bounding Boxes` to the aspect ratio of your output: the 0-1000 grid stretches with the frame, so a mismatched canvas puts boxes in the wrong place.\n5. `match image 1` on aspect ratio and resolution keeps your framing and size, so boxes land where you drew them.\n\n**Notes**\n- Boxes guide placement, they do not clip. A box that is almost empty gets expanded to about 10% of the frame, so give new elements a real box.\n- To add, replace, remove or restyle several things, draw several boxes.\n- `mask` is the hard version: white may change, black stays exactly as it is.\n- Anything you do not box and do not mention can still be repainted, so name your anchors."
      ],
      "widgets_values_named": {
        "text": "## Input Asset\n\n- [woman_with_flower_swim_shot.png](https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/input/woman_with_flower_swim_shot.png)\n\n**FLUX 3.1 Image - editing inside boxes**\n\nDraw a box, describe what happens inside it, and the rest of the photo stays. Boxes are how you point at one object instead of the whole frame.\n\n**How to use it**\n1. `Load Image` starts with the sample swimmer shot - swap in your own photo.\n2. In `Create Bounding Boxes`, left-click and drag over the area to change, then write the change into that box's `desc`. Background boxes first, foreground last, one box per element.\n3. `FLUX 3 Image Layout Prompt` adds that table after its own text, and that text is the caption, so state the rule there: change only what the boxes describe, keep everything else as it is.\n4. Set the canvas width and height in `Create Bounding Boxes` to the aspect ratio of your output: the 0-1000 grid stretches with the frame, so a mismatched canvas puts boxes in the wrong place.\n5. `match image 1` on aspect ratio and resolution keeps your framing and size, so boxes land where you drew them.\n\n**Notes**\n- Boxes guide placement, they do not clip. A box that is almost empty gets expanded to about 10% of the frame, so give new elements a real box.\n- To add, replace, remove or restyle several things, draw several boxes.\n- `mask` is the hard version: white may change, black stays exactly as it is.\n- Anything you do not box and do not mention can still be repainted, so name your anchors."
      },
      "color": "#222",
      "bgcolor": "#000"
    },
    {
      "id": 9,
      "type": "PreviewAny",
      "pos": [
        1420,
        80
      ],
      "size": [
        500,
        410
      ],
      "flags": {},
      "order": 4,
      "mode": 0,
      "inputs": [
        {
          "name": "source",
          "type": "*",
          "link": 16
        }
      ],
      "outputs": [
        {
          "name": "STRING",
          "type": "STRING",
          "links": [
            17
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "PreviewAny"
      },
      "widgets_values": [],
      "widgets_values_named": {}
    },
    {
      "id": 10,
      "type": "Flux31ImageNode",
      "pos": [
        2070,
        -300
      ],
      "size": [
        400,
        340
      ],
      "flags": {},
      "order": 5,
      "mode": 0,
      "inputs": [
        {
          "name": "prompt",
          "type": "STRING",
          "widget": {
            "name": "prompt"
          },
          "link": 17
        },
        {
          "name": "images.image_1",
          "shape": 7,
          "type": "IMAGE",
          "link": 10
        },
        {
          "name": "images.image_2",
          "shape": 7,
          "type": "IMAGE",
          "link": null
        },
        {
          "name": "mask",
          "shape": 7,
          "type": "MASK",
          "link": null
        },
        {
          "name": "bounding_boxes",
          "shape": 7,
          "type": "ARRAY",
          "link": 11
        }
      ],
      "outputs": [
        {
          "name": "IMAGE",
          "type": "IMAGE",
          "links": [
            12
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "Flux31ImageNode"
      },
      "widgets_values": [
        "",
        "quality",
        "match image 1",
        "match image 1",
        "auto",
        51445034,
        "randomize",
        4
      ],
      "widgets_values_named": {
        "prompt": "",
        "mode": "quality",
        "aspect_ratio": "match image 1",
        "resolution": "match image 1",
        "grounding": "auto",
        "seed": 51445034,
        "control_after_generate": "randomize",
        "safety_tolerance": 4
      },
      "color": "#432",
      "bgcolor": "#653"
    },
    {
      "id": 11,
      "type": "Flux3LayoutPrompt",
      "pos": [
        1420,
        -300
      ],
      "size": [
        510,
        320
      ],
      "flags": {},
      "order": 3,
      "mode": 0,
      "inputs": [
        {
          "name": "element",
          "type": "ARRAY",
          "link": 13
        }
      ],
      "outputs": [
        {
          "name": "prompt",
          "type": "STRING",
          "links": [
            16
          ]
        }
      ],
      "properties": {
        "Node name for S&R": "Flux3LayoutPrompt"
      },
      "widgets_values": [
        "In image 1, change only what the boxed elements describe and keep everything else exactly as it is."
      ],
      "widgets_values_named": {
        "prompt": "In image 1, change only what the boxed elements describe and keep everything else exactly as it is."
      },
      "color": "#322",
      "bgcolor": "#533"
    }
  ],
  "links": [
    [
      16,
      11,
      0,
      9,
      0,
      "STRING"
    ],
    [
      12,
      10,
      0,
      6,
      0,
      "IMAGE"
    ],
    [
      17,
      9,
      0,
      10,
      0,
      "STRING"
    ],
    [
      10,
      2,
      0,
      10,
      1,
      "IMAGE"
    ],
    [
      5,
      2,
      0,
      3,
      0,
      "IMAGE"
    ],
    [
      7,
      2,
      0,
      7,
      0,
      "IMAGE"
    ],
    [
      8,
      6,
      0,
      7,
      1,
      "IMAGE"
    ],
    [
      11,
      3,
      2,
      10,
      4,
      "ARRAY"
    ],
    [
      13,
      3,
      2,
      11,
      0,
      "ARRAY"
    ]
  ],
  "groups": [
    {
      "id": 1,
      "title": "Step 1 - load your image here",
      "bounding": [
        50,
        -370,
        620,
        1010
      ],
      "color": "#3f789e",
      "flags": {}
    },
    {
      "id": 2,
      "title": "Step 2 - drag a box, then describe the change in its desc field",
      "bounding": [
        710,
        -370,
        620,
        1039.710918256732
      ],
      "color": "#A88",
      "flags": {}
    },
    {
      "id": 3,
      "title": "Step 3 - caption rule (the layout table is appended to it)",
      "bounding": [
        1370,
        -370,
        610,
        910
      ],
      "color": "#3f789e",
      "flags": {}
    },
    {
      "id": 4,
      "title": "Step 4 - edit image 1 with FLUX 3.1 Image",
      "bounding": [
        2020,
        -370,
        500,
        460
      ],
      "color": "#444",
      "flags": {}
    }
  ],
  "config": {},
  "extra": {
    "ds": {
      "scale": 0.23939204936916353,
      "offset": [
        1966.9499640894392,
        1521.9406362670227
      ]
    },
    "frontendVersion": "1.60.3",
    "VHS_latentpreview": false,
    "VHS_latentpreviewrate": 0,
    "VHS_MetadataImage": true,
    "VHS_KeepIntermediate": true
  },
  "version": 0.4
}