> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# 边界框（PrimitiveBoundingBox）

<div class="node-meta"><code>PrimitiveBoundingBox</code><span>utilities/primitive</span><span>角色：包围盒</span></div>

PrimitiveBoundingBox 节点创建一个由其位置和大小定义的简单矩形区域。它接收左上角的 X 和 Y 坐标，以及宽度和高度值，并输出一个可供工作流中其他节点使用的边界框数据结构。

## 参数

| 参数       | 类型  | 默认 / 范围    | 说明                                           |
| -------- | --- | ---------- | -------------------------------------------- |
| `x`      | INT | 0 \~ 16384 | 边界框左上角的 X 坐标（默认：0）。                          |
| `y`      | INT | 0 \~ 16384 | 边界框左上角的 Y 坐标（默认：0）。                          |
| `width`  | INT | 1 \~ 16384 | 像素。必须为 8 的倍数（SD1.5 512、SDXL 1024、Flux 1024）。 |
| `height` | INT | 1 \~ 16384 | 像素。必须为 8 的倍数，非正方形建议保持总像素与原模型训练分辨率一致。         |

## 输出

| 输出           | 类型           | 说明  |
| ------------ | ------------ | --- |
| BOUNDING_BOX | BOUNDING_BOX | 包围盒 |

## 怎么接

- **上游**：—（手动填坐标）
- **下游**：CropByBBoxes / DrawBBoxes / BBox 列表
- **接线**：输出包围盒，接 CropByBBoxes / DrawBBoxes / 局部处理节点，用来把「某块区域」参数化。

## 使用案例

从 `x`（0）、`y`（0）、`width`（512） 开始填就能跑起来。输出通常接 `CropByBBoxes`。注意：宽高必须是 8 的倍数；SDXL 建议总像素约 1024²，Flux 建议 1MP 左右。

## 端口与连线示意

![PrimitiveBoundingBox 端口与连线示意](/svg/PrimitiveBoundingBox.svg)

## 实战提示

- 宽高必须是 8 的倍数；SDXL 建议总像素约 1024²，Flux 建议 1MP 左右。

## 同类节点

[布尔值](/nodes/10/PrimitiveBoolean.md) · [浮点数](/nodes/10/PrimitiveFloat.md) · [整数](/nodes/10/PrimitiveInt.md) · [字符串](/nodes/10/PrimitiveString.md) · [字符串（多行）](/nodes/10/PrimitiveStringMultiline.md)
