Extract Mask Tile
Extract Mask Tile
- mask
- layout
- tile
Tiled processing is how you upscale or diffuse an image that won't fit in VRAM: you cut it into pieces, run each piece through the sampler, and stitch them back together. Extract Mask Tile is the mask half of that split - it pulls a single tile out of a full-size mask so the mask stays aligned with the image tile you're working on. If you're doing tiled inpainting or a masked tiled upscale, you need the mask cut the same way the image is, and this is the node that does it.
What makes Acly's tile nodes different from the usual tiled-upscale packs is that they're deliberately not a fixed pipeline. Most tiling nodes give you one baked-in flow: split, sample, merge, done. This pack just gives you the primitives - split an image, split a mask, merge them back - and lets you build whatever you want between the split and the merge. Different prompts per tile, different ControlNet per tile, regions per tile: all fair game, because you control the middle. Extract Mask Tile is one of those primitives, the sibling of Extract Image Tile.
The mechanism leans on a shared layout. You first define your tiling with a Create Tile Layout node - that sets the minimum tile size, the padding (overlap between neighbors), and the blending width. That layout object then feeds every extract and merge node so they all agree on the grid. Extract Mask Tile takes the layout plus an index and returns the mask cropped to that one tile, padding included.
The inputs that matter:
- mask (MASK) - the full-size mask you want to slice.
- layout (TileLayout) - wire this from Create Tile Layout. It's the shared definition of the grid; the same layout goes to your image-tile and merge nodes.
- index (INT, default 0, min 0) - which tile you want. Indices run from 0 up to the number of tiles, and they're column-major - tile 1 is usually below tile 0, not to the right of it. That ordering trips people up constantly, so keep it in mind when you're mapping tiles to a loop.
The single output is tile (MASK) - the mask for that one tile, ready to pair with the matching image tile (same index, same layout) for whatever you sample next.
Installation comes with the pack. Either grab "ComfyUI Nodes for External Tooling" in ComfyUI Manager, or cd custom_nodes && git clone https://github.com/Acly/comfyui-tooling-nodes.git from your ComfyUI folder and restart. No extra dependencies, no model downloads - it's pure image geometry.
The gotchas are all about consistency. Every extract and merge node in one tiling pass must share the same TileLayout instance and the same index scheme, or your tiles won't line up on reassembly and you'll get visible seams or misaligned masks. The column-major indexing is the usual culprit - if your tiles come out shuffled, you've almost certainly assumed row-major somewhere. And remember this node only extracts; the smooth blending that hides seams happens at merge time, driven by the padding and blending values you set back in Create Tile Layout. If your final mask has hard edges between tiles, the fix is upstream in the layout, not here.
Realistically, this is a node you reach for when you're scripting or building a custom tiled workflow, not something you drop into a casual graph. If you just want a standard tiled upscale with no per-tile customization, a fixed-pipeline tiler is less setup. But if you need masked, per-tile control - different treatment for different parts of a big image - the flexibility this pack trades for that extra wiring is exactly the point.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| mask | MASK | — | |
| layout | TileLayout | — | |
| index | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| tile | MASK | — |