ClownGuide_Style_TileSize
Tile scattersort for tighter reference adherence
- guides
- guides
Another single-purpose helper for the style guides, and its own description tells you the job: it sets a tile size for some style guide types such as scattersort, and it can improve adherence to the input image. If your scattersort style transfer is capturing the overall feel of a reference but missing its local texture, tiling is how you tighten that up.
The idea is straightforward once you know what scattersort does. Scattersort - the author's own style mode - transfers style by matching and rearranging feature statistics from a reference. Do that over the whole image at once and you get the reference's global character. Do it in tiles, and each patch of your generation matches the corresponding patch of the reference more closely, so local detail and structure carry over better. TileSize is the node that switches scattersort from "whole image" to "tiled."
How it works
It's a modifier in the guide chain, like the EdgeWidth helper. You pass it an existing GUIDES bundle, it stamps on a tile geometry - height, width, and an overlap padding - and passes the GUIDES along. Downstream, a scattersort-style guide uses that geometry to process the reference in overlapping tiles instead of as one block. Smaller tiles mean tighter local adherence but more literal copying; larger tiles mean a looser, more global style. The padding keeps tile boundaries from turning into a grid of seams.
The inputs and output that matter
height/width(INT, default128each, step 16) - the tile size in latent units. This is the real control: smaller tiles hug the reference harder, larger tiles stay loose. Keep both multiples of 16.padding(INT, default64) - overlap between tiles, to blend their edges. If you see a tile grid in the output, raise this.guides(GUIDES, optional) - the incoming guide chain to modify.
Output is one guides (GUIDES) bundle, continuing to the next guide node or the sampler.
How to install it
ComfyUI Manager: search RES4LYF, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ClownsharkBatwing/RES4LYF/, pip install -r requirements.txt in your venv (portable ComfyUI: embedded python's pip), restart, hard-refresh with F5. Nested sampler menu: rgthree-comfy with "Auto Nest Subdirectories" on.
Common issues
Same placement rule as the other style helpers: it only affects guides that use tiling - scattersort and relatives - and has to share the GUIDES chain with one. Chain it next to a guide that doesn't tile and nothing happens.
The real tradeoff is adherence versus originality. Push the tiles small and adherence goes up, but so does the risk that you're not transferring style anymore - you're copying the reference patch by patch, and the output starts to look like a rearrangement of the source rather than your prompt in the source's style. If the result feels like plagiarism of the reference, your tiles are too small; go larger. Watch VRAM and time too: more, smaller tiles means more work per step, so a tiny tile size on a big image can slow sampling noticeably. Start at the defaults, change tile size in meaningful jumps, and keep the seed fixed so you can actually attribute the change to the tiling and not to seed variance.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| height | INT | 12816–10000 | — |
| width | INT | 12816–10000 | — |
| padding | INT | 640–10000 | — |
| guidesopt | GUIDES | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| guides | GUIDES | — |