KJNodes/experimentalgenerated

Fast Preview Batch(FastPreviewBatch)

Encodes an image batch as an all-I-frame H.264 MP4 thumbnail strip and shows it as an interactive grid. Click a tile to enlarge with prev/next browsing. Avoids materializing N PNGs.

Fast Preview Batch

input
max_thumb_size
512
crf
25
max_grid_frames
1024
KJNodes

Description

Fast Preview Batch enables you to preview an entire batch of images or masks as a single H.264 MP4 thumbnail strip, displayed as an interactive grid in the ComfyUI interface. Each frame is encoded as an I-frame (keyframe), allowing random access — click any tile to enlarge it, then browse forwards/backwards through the batch without materializing hundreds of individual PNG files. This makes iterating on large generation runs significantly faster and less resource-intensive.

The node belongs to the KJNodes/experimental category and is designed as a visual diagnostic tool; it produces no data outputs.

Inputs

InputTypeRequiredDefaultMinMaxStepDescription
inputIMAGE, MASK, or batchThe image or mask batch to preview. Can be a single image, a batch of images, or a mask batch.
max_thumb_sizeINT51251210248Maximum side length (in pixels) for the detail‑view thumbnail (the enlarged view when you click a tile). The grid tiles (strip thumbs) are automatically capped at 256 pixels independently.
crfINT250511Constant Rate Factor for the H.264 encoding. Lower values produce higher visual quality at the cost of larger file sizes; higher values save space but reduce quality. Values below 18 are generally considered visually lossless.
max_grid_framesINT1024140961If the input batch exceeds this number of frames, the node will stride‑sample the batch evenly so that only this many frames appear on the grid. The full batch is still accessible by clicking through enlarged views.

Usage Notes

  • When to use Fast Preview Batch: Use this node in place of saving individual preview images when you need to quickly inspect a large number of generated frames, e.g., during animation workflows, latent batch sampling, or mask sequence verification.
  • File handling: The generated MP4 is stored temporarily and discarded when ComfyUI closes. It is not written to the standard output folder.
  • Memory vs. performance: Because the node uses a single video file with keyframes, it avoids the overhead of writing and reading N separate PNGs. This can dramatically reduce latency when previewing batches of hundreds or thousands of frames.
  • Stride‑sampling logic: When the batch length > max_grid_frames, the grid shows a uniform subset of frames (e.g., every Nth frame). The enlarged view still lets you step through the entire batch.
  • No outputs: The node exists solely for real‑time preview; it does not pass data downstream. Place it at the end of your workflow chain.
  • Experimental status: Being in KJNodes/experimental, this node may see API changes in future releases. Check for updates when upgrading the custom node pack.

Comments

Sign in with GitHub to join the discussion.

Loading comments…
Fast Preview Batch (FastPreviewBatch) - ComfyUI-KJNodes | ComfyUI Wiki