Nodes/ComfyUI Impact Pack/Make Tile SEGS
ComfyUI Node Runs on cloud

Make Tile SEGS

Turn an image into tiles for a detailer-driven upscale

By ltdrdata·Created 3 years ago·Updated 4 months ago· 3,242
Make Tile SEGS
  • images
  • filter_in_segs_opt
  • filter_out_segs_opt
  • SEGS
bbox_size512
crop_factor3.00
min_overlap5
filter_segs_dilation20
mask_irregularity0.00
irregular_mask_mode

Here's a clever reuse of machinery. Impact Pack's detailer loop - crop a region, resample it at full resolution, paste it back - is exactly what you want for tiled upscaling too, except instead of cropping detected regions you crop a regular grid of tiles. Make Tile SEGS builds that grid. It slices an image into overlapping tiles and packages them as a SEGS object, so the same Detailer (SEGS) node that fixes faces can now add detail to every tile of a big image. The README lists it as "[experimental]... Create SEGS in the form of tiles from an image to facilitate experiments for Tiled Upscale using the Detailer," and its node category is literally __for_testing - so treat it as capable but a little rough.

Why tile at all? Because generating or refining a large image in one pass either blows your VRAM or duplicates anatomy. Tiling is the structural workaround: process manageable chunks, then reassemble. Pairing it with the detailer means each tile gets a genuine resampling pass rather than a dumb upscale.

How it works

The node walks the image and emits a tile per grid cell, each as a SEG with its own crop box and mask, overlapping its neighbors so the seams have room to blend. Feed the result to a Detailer (SEGS) and every tile gets refined; paste the results back and you've got a higher-detail version of the whole frame.

One real caveat worth carrying over from the upscaling playbook: tiled refinement without a ControlNet Tile condition tends to drift - each tile invents its own detail and you get patchwork. If you care about faithfulness, wire a tile ControlNet into the detailing stage. Make Tile SEGS builds the tiles; keeping them coherent is still on you.

The inputs that matter

  • images - the image to tile. Required.
  • bbox_size (default 512) - the tile size. This is your main dial; match it to what your model likes to generate at.
  • crop_factor (default 3) - how much context around each tile gets pulled into the crop.
  • min_overlap (default 5) - pixels of overlap between tiles, so seams blend rather than butt.
  • mask_irregularity and irregular_mask_mode - optionally give the tile masks ragged edges (Reuse fast, Reuse quality, All random fast, All random quality) instead of hard rectangles, which hides the grid better.

Two optional inputs, filter_in_segs_opt and filter_out_segs_opt, let you restrict where tiles are made. Per the README, tiles are masked by overlap with filter_in_segs_opt and by excluding filter_out_segs_opt, and "tiles with an empty mask will not be created" - so you can tile only a subject and skip the background. Output is a SEGS of tiles.

How to install it

ComfyUI Manager: search ComfyUI Impact Pack, install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Impact-Pack, install requirements into ComfyUI's Python (pip install -r requirements.txt, or ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt on Windows portable), restart. No auto-install since v7.6. A small SAM model downloads to ComfyUI/models/sams on first run.

Common issues

Patchwork or drifting tiles. The number-one tiled-upscale failure: with no ControlNet Tile feeding each tile the source image as a condition, tiles diverge into inconsistent detail. Add the tile condition to your detailer stage, or accept softer results.

Visible grid seams. Raise min_overlap and turn on mask_irregularity so tile edges aren't clean rectangles. The detailer's own feather at paste time helps too.

It's experimental - expect quirks. The __for_testing category isn't decoration. It works, but it's a lab tool for tiled-upscale experiments, not a polished one-click upscaler. For a hands-off route, the pack's Iterative Upscale nodes are the more finished path.

CategoryImpactPack/__for_testing

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
bbox_sizeINT51264–4096
crop_factorFLOAT3.001–10
min_overlapINT50–512
filter_segs_dilationINT20-255–255
mask_irregularityFLOAT0.000–1
irregular_mask_modeCOMBO4 options: Reuse fast, Reuse quality, All random fast, All random quality
filter_in_segs_optoptSEGS
filter_out_segs_optoptSEGS

Outputs (1)

NameTypeDescription
SEGSSEGS