Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-PainterNodes > PainterImageFromBatch

ComfyUI Node: PainterImageFromBatch

Class Name

PainterImageFromBatch

Category
image/batch
Author
princepainter (Account age: 1255days)
Extension
ComfyUI-PainterNodes
Latest Updated
2026-07-14
Github Stars
0.14K

How to Install ComfyUI-PainterNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-PainterNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-PainterNodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PainterImageFromBatch Description

Extract contiguous frames from image batches with flexible selection options, supporting forward/backward indexing and automatic boundary handling.

PainterImageFromBatch:

The PainterImageFromBatch node is designed to extract a sequence of contiguous frames from a batch of images, offering flexibility in how you select the starting point and the number of frames to extract. This node is particularly useful for artists and creators who work with image sequences and need to manipulate or analyze specific portions of a batch. It supports both forward and backward indexing, allowing you to start from the beginning or the end of the batch, and includes automatic boundary handling to ensure that the extracted frames are within valid limits. This functionality is essential for tasks that require precise frame selection, such as creating animations or analyzing changes over time in a sequence of images.

PainterImageFromBatch Input Parameters:

image

This parameter represents the batch of images from which frames will be extracted. It is the primary input and should be a tensor containing multiple images stacked together. The batch size, or the number of images in the batch, determines the range of frames you can extract.

start_from

This parameter determines the direction from which the frame extraction begins. It can be set to either "beginning" or "end". When set to "beginning", the extraction starts from the start of the batch, whereas "end" begins the extraction from the last frame of the batch. This flexibility allows you to easily access frames from either end of the batch.

start_frame

This integer parameter specifies the index of the first frame to extract. In "beginning" mode, a value of 0 corresponds to the first frame, while in "end" mode, a value of -1 corresponds to the last frame. The parameter supports negative indexing, which allows you to count backwards from the end of the batch. The valid range is from -4095 to 4095, with a default value of 0.

frame_count

This parameter defines the number of frames to extract from the batch, starting from the start_frame. It is an integer value with a minimum of 1 and a maximum of 4096, and the default is set to 1. This parameter allows you to control the length of the sequence you wish to extract, making it possible to work with both short and long sequences.

PainterImageFromBatch Output Parameters:

IMAGE

The output is a tensor containing the extracted sequence of frames from the input batch. This output is crucial for further processing or analysis, as it provides the specific frames you need from the batch. The extracted frames maintain the original dimensions and properties of the input images, ensuring consistency in subsequent operations.

PainterImageFromBatch Usage Tips:

  • To extract frames from the start of the batch, set start_from to "beginning" and adjust start_frame and frame_count according to your needs.
  • For accessing frames from the end of the batch, use start_from set to "end" and utilize negative indexing with start_frame to specify the starting point.

PainterImageFromBatch Common Errors and Solutions:

IndexError: index out of range

  • Explanation: This error occurs when the calculated start or end index for frame extraction exceeds the available range of the batch.
  • Solution: Ensure that your start_frame and frame_count values are within the valid range of the batch size. Adjust these parameters to avoid exceeding the batch limits.

ValueError: frame_count must be positive

  • Explanation: This error is raised when frame_count is set to a non-positive value, which is not allowed.
  • Solution: Set frame_count to a positive integer value, ensuring it is at least 1 to extract frames successfully.

PainterImageFromBatch Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-PainterNodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

PainterImageFromBatch