TTP_Tile_image_size
Pick tile dimensions by grid factor, not raw pixels
- image
- tile_width
- tile_height
Small utility node, and it solves a small but real annoyance: TTP_Image_Tile_Batch wants a tile_width and tile_height in raw pixels, but you usually don't think in pixels - you think "I want a 3x3 grid" or "cut this into 6 pieces." This node does that translation for you.
How it works. Feed it your image plus width_factor and height_factor (both 1–10, default 3 each), and it computes the tile width/height that divides the image into that many equal parts. The README's own example is the clearest explanation: a width factor of 2 and a height factor of 3 divides the image into 6 equal tiles (2 columns × 3 rows). There's also an overlap_rate input (0–0.95, default 0.1) that isn't covered in the README's node table - from the name and range, it's a fraction that pads each computed tile beyond a pure even split, giving you some overlap between neighboring tiles for cleaner blending downstream. If you're not sure what it's doing to your numbers, drop the output tile_width/tile_height into a couple of debug/preview nodes and watch how they change as you nudge overlap_rate - it's cheap to experiment with since this node does no image processing itself.
Inputs that matter: width_factor and height_factor are the whole point - set them to however many columns and rows you want, and let the node do the division. Everything else is a supporting player.
Outputs: tile_width and tile_height, both plain integers, meant to be wired straight into TTP_Image_Tile_Batch's tile_width/tile_height inputs.
Why bother with this instead of just typing pixel numbers into TTP_Image_Tile_Batch directly. Two reasons. First, it's resolution-independent - if you swap in a source image with different dimensions, a "3x3 grid" request still gives you 9 tiles instead of a wrong tile count because your hardcoded 1024px tiles no longer divide the new image evenly. Second, it maps directly onto how people actually plan a tiled upscale: "how many tiles can my GPU chew through per batch" is a grid-count question, not a pixel-size one.
Install. ComfyUI Manager, search "Comfyui_TTP_Toolset", or cd ComfyUI/custom_nodes && git clone https://github.com/TTPlanetPig/Comfyui_TTP_Toolset, restart. This is a pure arithmetic node - no models, no dependencies beyond the pack itself.
Common issues. The main gotcha is one of expectations, not bugs: this node computes tile size, it doesn't cut anything. If your final assembled image looks wrong, the problem is almost always downstream - either you forgot to actually pipe tile_width/tile_height into TTP_Image_Tile_Batch, or (more likely if you're chasing a specific final resolution) you assumed width_factor/height_factor would give you an exact target size and it doesn't - it gives you a grid count, and the resulting tile pixel dimensions come out however the division (plus overlap_rate) lands. If you need an exact tile pixel size, it's simpler to skip this node entirely and set tile_width/tile_height on TTP_Image_Tile_Batch directly. Use this one when you're thinking in grid terms, not pixel terms.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width_factor | INT | 31–10 | — |
| height_factor | INT | 31–10 | — |
| overlap_rate | FLOAT | 0.100–0.95 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| tile_width | INT | — |
| tile_height | INT | — |