๐ฆ RS Tile Adjustments
Slice big images into tiles without hand-calculating anything
- image
- IMAGES
- POSITIONS
- ORIGINAL_SIZE
- GRID_SIZE
- tile_width
- tile_height
Your image is 4096px wide and your card has 6GB. You want to upscale it, or run a second diffusion pass over it, and the straight path is an instant OOM. The fix is the same one tiled diffusion has used forever: cut the image into overlapping chunks, process each chunk on its own, stitch them back. RS Tile Adjustments is the cut.
It belongs to a three-node family in the RaykoStudio pack - this splitter, RS Tile Assemble to rebuild, and RS Upscale & Resize for the per-tile scaling. The pack is a one-developer project (the author posts update announcements on r/StableDiffusion as Reykoon, usually a demo image and a few words), so there's no corporate documentation to fall back on; the README plus the source are the docs. The good news is the mechanism is simple enough that you don't need much.
How it works
Give it an image and three numbers and it does all the geometry you'd otherwise do on scrap paper. It picks a tile size from the width and height factors, accounts for the overlap you asked for, rounds tiles up to a multiple of 8 (safe for the VAEs you'll likely feed later), then slides a window across the image and crops out a batch. It also records where every tile came from - positions, the original size, and the grid dimensions - because the assemble node needs those to put things back.
The formula, if you care: tile size โ image dimension รท (1 + (factor โ 1) ร (1 โ overlap_rate)), with the edges clamped so the last tile in a row doesn't fall off the image. Tiles that would hang over the edge get shifted back into bounds instead, which is exactly why positions can't be guessed downstream - always carry them through.
The inputs that matter
Three, that's it.
- width_factor_tile and height_factor_tile - grid density. Defaults of 3 ร 3 give you nine tiles. Crank them to 5โ6 for more, smaller chunks, which is what you want when VRAM is genuinely tight or the image is huge. Think of these as "how many columns/rows", not pixel sizes - the node does that math.
- overlap_rate - how much each tile shares with its neighbours, 0 to 0.95. Keep it between 0.1 and 0.2 like the README suggests. Overlap is what gives the assembler room to blend, so 0 means harder seams later - and a low overlap is exactly when RS Tile Assemble wants a smaller feather. Treat the two as a pair.
Everything else is output. IMAGES is your batch of tiles; POSITIONS, ORIGINAL_SIZE and GRID_SIZE are metadata you wire straight into RS Tile Assemble - the LIST and TUPLE types match between the two nodes, no conversion needed. tile_width and tile_height are handy if you want to know what size the sampler will see, or to feed a downstream size node.
Installing
Same as any RaykoStudio node. The pack is on ComfyUI Manager (search "ComfyUI_RaykoStudio"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/Raykosan/ComfyUI_RaykoStudio.git
then restart ComfyUI. No model downloads; the tiler is pure Pillow and torch and runs on CPU fine. The pack's requirements.txt does list pycairo and opencv-python, but those exist for its text-overlay and image-adjustment nodes - this one only needs numpy, Pillow and torch, which any working ComfyUI already has. And if installing the full pack trips over pycairo on Windows, the rest of the pack still loads: each module is imported in its own try/except, so a failing module only hides itself, not the pack.
Where people get burned
First, it tiles only the first image of a batch. The source grabs image[0] and tiles that; feed it a 50-frame batch and you get one frame's worth of tiles. Batch before or after, not through.
Second, if your factors are so small that a tile would cover the whole image, the node quietly returns the image unchanged with a 1ร1 grid - not an error, just nothing happening. If your "tiling" suddenly does nothing, that's probably why.
And keep the tile order stable between here and the assembler. Any node that reorders or drops tiles breaks the positions contract, and RS Tile Assemble will happily paste things in the wrong place without complaining.
Wire it up: Load Image โ RS Tile Adjustments โ per-tile processing โ RS Tile Assemble โ Save. That's the whole tiled-diffusion plumbing in four boxes, and it's the cheapest way to make huge images on a small card.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | โ | |
| width_factor_tile | INT | 31โ10 | โ |
| height_factor_tile | INT | 31โ10 | โ |
| overlap_rate | FLOAT | 0.100โ0.95 | โ |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| IMAGES | IMAGE | โ |
| POSITIONS | LIST | โ |
| ORIGINAL_SIZE | TUPLE | โ |
| GRID_SIZE | TUPLE | โ |
| tile_width | INT | โ |
| tile_height | INT | โ |