ComfyUI > Nodes > COMFYUI_PROMPTMODELS > Get Frame by Index

ComfyUI Node: Get Frame by Index

Class Name

GetFrameByIndex

Category
đź§© Utility
Author
cdanielp (Account age: 0days)
Extension
COMFYUI_PROMPTMODELS
Latest Updated
2026-03-17
Github Stars
0.02K

How to Install COMFYUI_PROMPTMODELS

Install this extension via the ComfyUI Manager by searching for COMFYUI_PROMPTMODELS
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter COMFYUI_PROMPTMODELS 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

Get Frame by Index Description

Extracts a specific frame from an image sequence by index, defaulting to nearest valid frame.

Get Frame by Index:

The GetFrameByIndex node is a versatile utility designed to extract a specific frame from a sequence of images based on a given index. This node is particularly useful when working with animations or video sequences where you need to isolate a particular frame for further processing or analysis. By allowing you to specify an index, it provides the flexibility to select any frame within the sequence, whether it's the first, last, or any frame in between. This capability is essential for tasks that require precise frame manipulation, such as creating keyframes for animations or analyzing specific moments in a video. The node ensures that even if the specified index is out of range, it gracefully defaults to the nearest valid frame, thus preventing errors and ensuring smooth operation.

Get Frame by Index Input Parameters:

frames

The frames parameter is a sequence of images from which a specific frame will be extracted. It is essential for the node's operation as it provides the data set from which the desired frame is selected. The input should be a collection of images, typically in a format that maintains the dimensions [1, H, W, C], where H is height, W is width, and C is the number of color channels.

index

The index parameter determines which frame from the sequence will be selected. It is an integer value that can range from -9999 to 9999, with a default value of -1. An index of -1 selects the last frame, 0 selects the first frame, and any other integer selects the corresponding frame in the sequence. If the index is out of the valid range, the node automatically adjusts it to select the nearest valid frame, ensuring robust performance.

Get Frame by Index Output Parameters:

image

The image output parameter is the frame extracted from the input sequence based on the specified index. This output is crucial as it provides the isolated frame for further use, whether for display, analysis, or as input to another process. The output maintains the original dimensions of the frame, ensuring that no data is lost during extraction.

Get Frame by Index Usage Tips:

  • Use the index parameter to quickly access the first or last frame by setting it to 0 or -1, respectively, which can be particularly useful for initializing or finalizing animations.
  • When working with large sequences, ensure that the index is within the valid range to avoid unnecessary adjustments and ensure optimal performance.

Get Frame by Index Common Errors and Solutions:

El input 'frames' está vacío.

  • Explanation: This error occurs when the frames input is empty or not provided, which means there is no data from which to extract a frame.
  • Solution: Ensure that the frames input is a valid sequence of images before executing the node. Check that the data source is correctly connected and contains the expected images.

Index out of range

  • Explanation: This situation arises when the specified index is beyond the bounds of the available frames, either too high or too low.
  • Solution: Adjust the index to be within the range of available frames. The node automatically corrects out-of-range indices, but it's best practice to specify a valid index to avoid unintended results.

Get Frame by Index Related Nodes

Go back to the extension to check out more related nodes.
COMFYUI_PROMPTMODELS
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.

Get Frame by Index