Nodes/ComfyUI-HttpRequestNodes/Blob To Batch Image Node
ComfyUI Node

Blob To Batch Image Node

Decode a multi-page TIFF from an API straight into an image batch

By ahkimkoo·Created 3 months ago·Updated 3 months ago· 1
Blob To Batch Image Node
  • bytes
  • images

The Blob To Batch Image Node is Blob To Image Node with a batch obsession: it decodes binary image bytes into a full ComfyUI IMAGE tensor, and unlike its sibling it handles multi-page TIFFs - each page becomes a frame in the batch. Feed it bytes from an API that returns a TIFF stack (document scanners, some OCR and image-processing services) and every page lands in the graph as one batch tensor instead of just the first.

It's part of ComfyUI-HttpRequestNodes, the fork of felixszeto's ComfyUI-RequestNodes. When would you actually hit a multi-page TIFF from an HTTP call? Document-processing APIs are the honest answer - a "convert this PDF's pages to images" endpoint often returns a multi-page TIFF, and this node turns that straight into a batch you can feed frame-by-frame through the rest of your workflow.

How it works

One input, bytes (BYTES), one output, images (IMAGE). The source is worth knowing because it's cleverly tolerant: PIL opens the bytes, then the code steps through the image's pages one at a time (img.seek(i) until it hits EOF), converts each page to RGB (with the same white-background flattening for RGBA as the sibling node), and stacks them into one numpy batch before returning the tensor.

The output shape is [N, H, W, 3] where N is the page count - so a four-page TIFF gives you a four-frame batch, ready for a frame-splitting node or a batch-aware processor. For a single-frame PNG or JPEG it behaves exactly like Blob To Image, just with the batch machinery in place.

Two notes. The same BytesIO input gotcha as its sibling applies: it wants raw bytes, not a BytesIO object - so reach for any or response_bytes outputs from the request nodes, not file. And keep in mind multi-page TIFFs don't have to be same-sized pages; if the API returns mixed dimensions, downstream batch nodes may complain about the shape mismatch. That's a server problem, not a node problem.

Install

ComfyUI Manager → search ComfyUI-HttpRequestNodes → Install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/ahkimkoo/ComfyUI-HttpRequestNodes
pip install soundfile imageio imageio-ffmpeg

Category: RequestNode/Utils. PIL-only. No models, no keys - pure decoding.

CategoryRequestNode/Utils

Inputs (1)

NameTypeDefaultDescription
bytesBYTES

Outputs (1)

NameTypeDescription
imagesIMAGE