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

Blob To Image Node

Turn API-returned image bytes into something you can preview and edit

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

The Blob To Image Node is the "bring it back into the graph" node. Your HTTP nodes get raw image bytes back from an API - PNG, JPEG, BMP, or WebP - and this node decodes them into a ComfyUI IMAGE tensor you can preview, upscale, mask, or pass to a sampler. It's the far end of the round trip that starts with Image To Blob Node: send an image out, get an image back, and keep working.

It lives in ComfyUI-HttpRequestNodes, the fork of felixszeto's ComfyUI-RequestNodes. Where the converters package data for departure, this is the arrival hall. The most common source is the Get Request Node's file output (which is raw bytes - a clean fit) or the Binary Post Request Node's response_bytes. The pattern shows up constantly in workflows that call an img2img or edit endpoint and want to chain the result into the rest of the pipeline.

How it works

One input, bytes (BYTES), one output, image (IMAGE) in [batch, height, width, channels]. PIL opens the bytes and the node does a few quiet fixes in the source:

  • RGBA is composited onto a white background - no transparency, which matters if your API returns PNGs with alpha. White, not checkerboard, so the result is what a flattened image looks like.
  • Grayscale and other modes are converted to RGB, so the tensor is always 3-channel.
  • The output is a single frame - [1, H, W, 3].

One genuine gotcha about the input side: this node wraps its input in BytesIO(), which means it wants raw bytes, not a BytesIO object. That's a real difference inside this pack - the Post Request Node and Rest Api Node hand back their file output as a BytesIO object, which will fail here. Use their any output (raw bytes) or a node like Binary Post that returns response_bytes raw, and it just works. No multi-page support - for TIFF stacks, the pack's Blob To Batch Image Node is the one.

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 extra deps beyond ComfyUI core. No models, no keys - this node has never seen a network connection and never will.

CategoryRequestNode/Utils

Inputs (1)

NameTypeDefaultDescription
bytesBYTES

Outputs (1)

NameTypeDescription
imageIMAGE