Runtime44 Tiled Mask Sampler
Masked sampling on huge images without the VRAM bill
- model
- positive
- negative
- latent
- mask
- LATENT
Runtime44 Tiled Mask Sampler is the sibling of the pack's Mask Sampler, built for the case the plain version struggles with: big images. Where Mask Sampler runs the whole latent through the sampler and just masks where the noise goes, this one splits the latent into tiles and only samples the tiles that actually touch your mask. Same idea - redraw this region, leave everything else alone - but the memory cost tracks the masked area plus a tile, not the full frame.
That makes it the node you reach for when a 2K or 3K render needs a face or object fixed and a whole-latent masked pass either chokes your VRAM or takes an absurdly long time. It's the masked equivalent of tiled diffusion, and the v1.1.0 changelog notes the author optimized it to skip tiles that don't intersect the mask - so a small mask on a huge image is genuinely cheap.
How it works
The latent is divided into squares of tile_size / 8 (because the latent is an eighth of the pixel resolution). For each tile that intersects the mask:
- The tile's latent crop is sampled with the mask applied as a noise_mask.
- The conditioning is cropped per tile - including ControlNet hints, which are cropped and resized to match the tile. So a Tile/Depth/Lineart ControlNet keeps working correctly across tiles instead of feeding the whole hint into each one.
- The sampled tile is composited back into the full latent.
Tiles entirely outside the mask are skipped outright - that's the speed win and it's real. The output is a single LATENT for the full image.
Inputs that matter
Everything from Mask Sampler carries over - model, positive, negative, latent, mask, seed, steps, cfg, sampler_name, scheduler, denoise, mask_feather, mask_dilation - plus one new one:
- tile_size - the pixel size of each tile (default 512, range 128–8192). The actual latent tile is this divided by 8. 512 is a solid default for SDXL-class work; drop it if you're VRAM-poor, raise it if you want fewer, larger tiles.
The denoise, mask_feather, and mask_dilation semantics are identical to Mask Sampler: denoise 1.0 fully redraws the masked region, feather softens the boundary, dilation grows or shrinks the mask.
The honest gotchas
The tile compositing is a hard paste - there's no feather blending between adjacent tiles in the code, only at the mask edge. If two neighboring tiles both get sampled, their independent results can show a seam where they meet. In practice this shows up mostly when tiles are small or the masked region is huge. Mitigations: keep tile_size reasonably large, and keep the masked region sensible. It's not a bug you'll hit in most workflows, but it's why you might see a subtle grid on very large masked areas.
Also worth knowing: the whole latent is still present - it's just processed in chunks. This is the "tiled" answer to VRAM limits, not a magic resolution unlock.
Installing
Ships in Runtime44 ComfyUI Nodes, under "sampling":
cd ComfyUI/custom_nodes
git clone https://github.com/runtime44/comfyui_r44_nodes
cd comfyui_r44_nodes
python -m pip install -r requirements.txt # or: uv pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager (search "Runtime44"). Like its sibling it needs opencv-python and torchvision for the mask math, so don't skip the pip step. The pack has been dormant since mid-2024 and has essentially no community tutorial base - but if you already understand masked inpainting from the plain Mask Sampler, this is just that plus tiles.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent | LATENT | — | |
| mask | MASK | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 8.00–100 | — |
| sampler_name | COMBO | 34 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +28 | |
| scheduler | COMBO | 9 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +3 | |
| tile_size | INT | 512128–8192 | — |
| denoise | FLOAT | 1.000–1 | — |
| mask_feather | INT | 130–10000 | — |
| mask_dilation | INT | 0-10000–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |