图像分区 · 读取分块计划项
The unglamorous node that reads one tile out of a plan, and it's worth knowing
- plan
- ownership_mask
- x
- y
- width
- height
- component_id
- tile_index
- metadata_json
RegionEditTilePlanItem is a one-job node: pull a single tile out of a REGION_TILE_PLAN and hand you its mask, its geometry, and its metadata. It's the least glamorous node in the tiling chain - no pixels are changed, no magic happens - but it's exactly the kind of plumbing node that saves you from rebuilding a plan for the "I just want to inspect one tile" case, and it's the right tool whenever you're doing per-tile work by hand instead of batching.
The inputs are just two: plan (a REGION_TILE_PLAN, straight from RegionEditTilePlanner) and index (default 0). Set the index, and the node fetches that tile from the plan. The output is a complete description of it:
ownership_mask- the mask of which pixels this tile owns (disjoint by design, so no two tiles' ownership overlaps)x,y,width,height- its position in the full imagecomponent_id- which separate target component in the mask this tile belongs to (the planner splits your target mask into connected components)tile_index- its index within that componentmetadata_json- the rest of the tile's metadata as a JSON string
If you ask for an index outside the plan's range, it raises an IndexError ("Tile index X is outside 0..N-1") rather than returning garbage - the pack's usual loud-over-silent philosophy.
So when do you reach for it? Three cases. First, inspection: wire the plan in, step the index through 0, 1, 2 and read each tile's coordinates, to understand what the planner decided before you commit to a generation run. Second, single-tile editing: if you only want to re-edit one tile of a plan (say tile 3 came out wrong and you don't want to redo all five), this node hands you that one tile's mask and geometry to drive a single crop-and-edit chain, then you can merge just that tile back with RegionEditTileMerge or the strict composite. Third, understanding plans: if you're debugging why a merge looks wrong, dumping each tile's ownership_mask and coordinates via this node tells you instantly whether the planner gave tiles sensible boundaries.
It pairs naturally with RegionEditStrictCoordinateComposite, which wants exactly these x/y/width/height values - wiring them straight from this node is the honest way to guarantee the geometry matches the plan.
Install: ComfyUI Manager → search Region Edit Toolkit (registry ID native-region-tile-planner-merge), or git clone https://github.com/Liu-Bot24/ComfyUI-Region-Edit-Toolkit.git into custom_nodes, pip-install requirements.txt into ComfyUI's actual Python, restart. No dependencies beyond the pack's own (numpy, Pillow, scipy).
Honest take: if you're batch-processing, you'll use RegionEditTileBatchPrepare and never touch this node. If you're a human doing careful edits one tile at a time, this is quietly one of the most useful nodes in the tile chain - it's the difference between reading tile geometry off the plan's JSON and having it as actual wires. The pack is new and quiet, so there's no community lore, but this node is simple enough that the source's error message - an out-of-range index is a named error, not a silent wrong tile - tells you everything you need to know.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| plan | REGION_TILE_PLAN | — | |
| index | INT | 00–100000 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| ownership_mask | MASK | — |
| x | INT | — |
| y | INT | — |
| width | INT | — |
| height | INT | — |
| component_id | INT | — |
| tile_index | INT | — |
| metadata_json | STRING | — |