Stack_ksampler_tile
Tile-Based Hi-Res Refine in One Node
- resample
- lowCpu
- over_image
- output_image
If you've ever built an Ultimate SD Upscale-style refine pass by hand - ESRGAN upscale, split into tiles, resample each tile at low denoise, stitch back together - you know it's four or five nodes for what is conceptually one step. Stack_ksampler_tile is that whole step collapsed into a single node. It's the "secondary sampling repair and refine enlargement" the pack's own README screenshots show off, and it's genuinely the most useful node in the batch if you generate at a modest resolution and want to blow the result up with real added detail instead of just interpolated pixels.
How it works. Two operations happen inside this one node, back to back. First, a classic pixel upscaler (model_name, defaulting to RealESRGAN_x2.pth) scales your image up by upscale_by. Then the upscaled image gets re-sampled in tiles at low denoise_image - 0.25 by default, which sits right in the community's own sweet spot for hi-res fix (0.3-0.5 keeps composition intact while letting the model paint in texture that the ESRGAN pass couldn't invent). tile_size controls how big each tile is during that resample, which is your main VRAM-vs-seam-quality dial: bigger tiles mean fewer seams to hide but more memory per tile.
The inputs that matter. resample is required and is a pipe wired in from elsewhere in the pack - it's carrying the model, clip, and conditioning that the internal sampler actually uses, so this node isn't standalone; it needs an upstream Apt_Preset stack feeding it. seed controls the resample pass's randomness, same as any KSampler. image_output is the handy one: set it to Save or Hide/Save and this node writes the file straight to disk - no separate Save Image node needed, because is_output_node is true here. That's a nice bit of graph-tidying the pack does throughout.
The two optional inputs follow a convention the README documents explicitly for the pack's loaders: an over_ input overrides whatever the node would otherwise use internally. Plug an image into over_image and it takes priority over anything computed upstream. lowCpu takes a config object from the pack's own Stack_VAEDecodeTiled node - wire that in and the VAE decode inside this node also runs tiled, which matters a lot once you're upscaling to 4K-ish territory on anything less than a 24GB card.
Output: a single output_image, ready to chain into another refine pass or just call it done.
Installing it. Clone the pack: cd ComfyUI/custom_nodes && git clone https://github.com/cardenluo/ComfyUI-Apt_Preset, restart ComfyUI, or search "ComfyUI-Apt_Preset" in ComfyUI Manager and let it install for you. On Windows the README also points at install.bat for pulling in the pack's Python dependencies - worth double-clicking that even if you used Manager, since some of the pack's other nodes need extra packages Manager doesn't always catch.
You also need an actual upscale model on disk for model_name - drop an ESRGAN-family .pth (UltraSharp, Remacri, or the default RealESRGAN) into models/upscale_models. This node's enum will show choices: 0 until you have at least one file there.
Where people get stuck. The biggest one is a type mismatch on resample - if you try to wire this node up in isolation without an upstream Apt_Preset sampler stack, it'll refuse to connect, because that input isn't a generic pipe, it's a specific typed object from this pack's own ecosystem. Second: seams at tile boundaries, which almost always means tile_size is too small relative to detail density, or you skipped wiring lowCpu and the VAE decode is happening in one full-frame pass that doesn't agree with the tiled resample geometry. Third, and this trips up a lot of people migrating from stock ComfyUI: forgetting to flip image_output off Preview means nothing ever hits disk - the node will happily run and show you nothing saved.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| resample | RESAMPLE | â | |
| model_name | COMBO | RealESRGAN_x2.pth | 0 options: |
| upscale_by | FLOAT | 2.00.1â10 | â |
| seed | INT | 00â18446744073709550000 | â |
| denoise_image | FLOAT | 0.250â1 | â |
| tile_size | INT | 512256â4096 | â |
| image_output | COMBO | Preview | 4 options: Hide, Preview, Save, Hide/Save |
| lowCpuopt | VAEDecodeTiled | â | |
| over_imageopt | IMAGE | â |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_image | IMAGE | â |