Nodes/Dustin ComfyUI Nodes/Dustin Image Atlas Extract
ComfyUI Node

Dustin Image Atlas Extract

Pull one tile back out by index

By zihualiu1997·Created 4 months ago·Updated 4 months ago· 1
Dustin Image Atlas Extract
  • atlas_image
  • image
atlas_metadata
index0

This node is the refund ticket for Dustin Image Atlas. Where that node packs a batch of images into one stitched canvas plus a JSON coordinate map, this one reverses the trip: feed it the atlas, the metadata, and an index, and it crops out the original tile at that position. It only exists because the atlas node refuses to resize or drop anything - the coordinates in the metadata are exact, so a clean round-trip is the whole point.

How it works

Straightforward, once you see the contract. atlas_image is the stitched canvas, atlas_metadata is the JSON string the atlas node emitted, and index is the tile number you want, starting at 0 - the same order the images arrived in the original batch. The node reads the items list from the metadata, finds the entry whose index matches, and crops atlas_image at that x/y/width/height. What comes out is the original tile, untouched.

The traps

  • The metadata is load-bearing. The atlas node's atlas_metadata output is the coordinate source of truth. If you hand this node metadata from a different atlas - or manually type something wrong - the crop misses. Keep the two outputs paired as a unit.
  • It expects a single atlas image. The code rejects an actual batch on the atlas_image input. A single stitched canvas, batch size 1, is what it's built for.
  • Index out of range is an error, not an empty result. Ask for tile 7 of a 4-tile atlas and it throws "Could not find atlas item with index 7." No blank image, no silent crop of something adjacent. That's actually good behavior for a bookkeeping node - better to fail loudly than hand you the wrong tile.

When you'd use it

Honestly, the atlas → extract pair is a niche workflow. The clean use case is when you've stitched images for some single-image consumer (a batch-friendly API, a visualization, an upscaler that takes one image) and then need specific originals back by position. If you never need to pull tiles out, the atlas node's metadata output is dead weight and you don't need this one either. But if you're building anything where "pack them, process them, unpack them" is the shape of the job, these two nodes are a tidy pair - no external utilities, no guesswork about coordinates.

Install

Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/zihualiu1997/dustin-comfyui-nodes

Restart ComfyUI and search "Dustin" for the pack. ComfyUI Manager users can install "dustin-comfyui-nodes" from the registry instead. Like the atlas node, this one is pure Python standard library on top of torch - nothing extra to install, no model downloads. It's a two-node utility, it works, and that's the honest extent of the story.

CategoryDustin Nodes/Image

Inputs (3)

NameTypeDefaultDescription
atlas_imageIMAGE
atlas_metadataSTRING
indexINT00–1000000

Outputs (1)

NameTypeDescription
imageIMAGE