Nodes/ComfyUI-ArchAi3d-Qwen/πŸ”— SEGS To Bundle
ComfyUI Node

πŸ”— SEGS To Bundle

Bridge Impact Pack's tiles into the Smart Tile system

By amir84ferdosΒ·Created 11 months agoΒ·Updated 5 months agoΒ· 70
πŸ”— SEGS To Bundle
  • segs
  • image
  • bundle
β—„mask_blur8β–Ί

ComfyUI has a tiling problem that's really an ecosystem problem: Impact Pack's Make Tile SEGS produces tiles in the SEGS format, and the ArchAi3d pack's Smart Tile system consumes a SMART_TILE_BUNDLE dict. Two perfectly good tiling systems that can't talk to each other. ArchAi3D_SEGS_To_Bundle is the bridge node, and its own header describes it better than I could: "Convert Impact Pack's Make Tile SEGS output to SMART_TILE_BUNDLE."

If you've used Impact Pack's tiling and want to route it into the Smart Tile Prompter, this is the adapter. And the smart part is that it does the fiddly conversion math for you: it reads the bounding boxes of the incoming SEGS, auto-detects the grid dimensions (tiles_x, tiles_y), the tile size, and the overlap padding between adjacent tiles. You don't tell it your layout - it works it out from the geometry.

The inputs that matter

  • segs - SEGS from Impact Pack's Make Tile SEGS. Required, and it says so right in the tooltip.
  • image - the original image the SEGS were cut from. Required; it becomes the bundle's scaled_image.
  • mask_blur - optional, default 8. This one stays manual because it's a downstream preference, not a geometry fact: match it to your SEGS Mask Blur setting so the blur value stays consistent through the chain.

Output: a single bundle of type SMART_TILE_BUNDLE - the handoff format the Smart Tile nodes expect.

How it works

It unpacks the SEGS (h, w), [seg...] structure, collects every unique x1/y1 bbox coordinate to infer the grid, measures tile size from the first segment's bbox and padding from the overlap between neighbors, then builds the bundle dict (tile_width, tile_height, tiles_x, tiles_y, tile_padding, crop_factor, mask_blur, latent_divisor). Degenerate input (zero segments) gets a safe 1Γ—1 bundle rather than a crash - a small robustness touch worth noting.

Installing it

Part of ComfyUI-ArchAi3d-Qwen (author: Amir Ferdos / ArchAi3d):

# ComfyUI Manager: search "ArchAi3d Qwen"
cd ComfyUI/custom_nodes
git clone https://github.com/amir84ferdos/ComfyUI-ArchAi3d-Qwen.git
cd ComfyUI-ArchAi3d-Qwen
pip install -r requirements.txt

Restart. Requires Impact Pack to be installed too - the SEGS on the input side come from it. No models, no heavy deps.

Common issues

  • Grid inference can guess wrong. Auto-detection assumes regular tile layouts from bbox positions. If your tiles are irregular, the inferred tiles_x/tiles_y/padding may be off - check the console output and, when needed, generate tiles with a regular layout.
  • mask_blur mismatch. The bundle carries mask_blur downstream; if it disagrees with what SEGS Mask Blur is applying, downstream nodes get contradictory numbers. Keep them matched.
  • Empty SEGS. Zero segments yields a 1Γ—1 bundle with padding 0 - a graceful degradation, but a sign your tile generation upstream produced nothing worth tiling.

It's a plumbing node - zero glamour, entirely bridge logic - and that's precisely why it exists. If you mix Impact Pack tiling with the Smart Tile system, it's the handshake that makes the two stop fighting.

CategoryArchAi3d/Mask/Segmentation

Inputs (3)

NameTypeDefaultDescription
segsSEGSSEGS from Impact Pack's Make Tile SEGS
imageIMAGEThe image that SEGS were created from
mask_bluroptINT80–64Mask blur for downstream nodes (match your SEGS Mask Blur setting)

Outputs (1)

NameTypeDescription
bundleSMART_TILE_BUNDLEβ€”