KJNodes/experimentalgenerated

Fast Preview(FastPreview)

This node technically processes by converting the input image tensor into a PIL image object and then encoding it in memory.

Fast Preview

image
format
JPEG
max_size
768
KJNodes

The Fast Preview node technically works by converting the input image tensor into a PIL image object and then performing encoding processing in memory.

The Fast Preview node is an experimental tool designed for quickly previewing generated images within a ComfyUI workflow. Its core functionality is to bypass the conventional disk-saving steps and directly display the image on the user interface, thereby providing faster visual feedback. Using a binary websocket, it avoids the overhead of Base64/JSON encoding, making previews even snappier.

Node Functionality

Technically, this node works by converting the input image tensor into a PIL image object and then performing encoding processing in memory. It supports two mainstream image formats: JPEG and PNG. Instead of converting the encoded image data into a Base64 string, it sends the raw binary data via a binary websocket, implementing a "file-less" instant preview mechanism that avoids base64/JSON overhead.

Node Parameter Description - Fast Preview

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
imageIMAGEYes--Receives the image input to be previewed, of type IMAGE.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
formatCOMBOYesJPEG"JPEG", "PNG"JPEG or PNG.
max_sizeINTYes768128 – 4096 (Step: 64)Sets the maximum dimension (width or height) of the preview image; the image will be resized proportionally if it exceeds this value.

Usage Scenarios

In image generation or processing workflows, you can connect this node after any node that outputs an image (of type IMAGE). For example, connecting this node at the end of a Stable Diffusion text-to-image pipeline allows you to immediately view the generation result without waiting for the image to be saved to the hard disk, facilitating rapid iteration and adjustment of generation parameters.

Notes

As this is an experimental node, its stability and compatibility may not match that of standard preview nodes. It is primarily intended for scenarios requiring quick viewing of intermediate or final results and is not suitable as a replacement for persistent image storage.

The Fast Preview node is from the ComfyUI-KJNodes node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…