Cherry Pick Frames:
The CherryPickFrames node is a versatile tool designed for AI artists working with image sequences, allowing for flexible selection of frames from a batch of images. This node is particularly useful when you need to extract specific frames from a sequence for further processing or analysis. It supports multiple selection modes, including picking the first or last N frames, selecting frames at specific indices, or choosing every Nth frame. This flexibility enables you to tailor the frame selection process to your specific needs, whether you're creating animations, analyzing video content, or preparing images for machine learning tasks. By providing a straightforward way to cherry-pick frames, this node enhances your workflow efficiency and allows for more precise control over the image data you work with.
Cherry Pick Frames Input Parameters:
images
This parameter represents the batch of images from which frames will be selected. It is crucial as it serves as the source data for the node's operations. The images should be provided in a format compatible with the node, typically as a tensor, allowing the node to process and extract the desired frames.
mode
The mode parameter determines the method used to select frames from the batch. It offers several options: first_n to select the first N frames, last_n to choose the last N frames, specific to pick frames based on specific indices, and every_nth to select every Nth frame. The default mode is first_n, providing a straightforward starting point for frame selection.
num_frames
This parameter specifies the number of frames to extract when using the first_n, last_n, or every_nth modes. It allows you to control the quantity of frames selected, with a minimum value of 1 and a maximum of 16, which is the node's output limit. The default value is 1, ensuring at least one frame is always selected.
frame_indices
Used exclusively in the specific mode, this parameter allows you to define a comma-separated list of indices representing the exact frames you wish to extract. For example, entering 0,5,10 would select the first, sixth, and eleventh frames. The default value is 0, which selects the first frame if no specific indices are provided.
step
The step parameter is relevant when using the every_nth mode, determining the interval between selected frames. For instance, a step value of 2 would select every second frame. This parameter provides additional control over frame selection, with a default value of 1, ensuring consecutive frames are chosen by default.
Cherry Pick Frames Output Parameters:
frame_1
This output represents the first frame selected based on the specified mode and parameters. It is the primary output and is always populated, either with a selected frame or a fallback frame if fewer frames are selected than the maximum outputs.
frame_2
Similar to frame_1, this output holds the second selected frame. If fewer frames are selected than the maximum outputs, it will contain a fallback frame.
frame_3 to frame_16
These outputs follow the same pattern as frame_1 and frame_2, each representing a subsequent frame selected according to the node's parameters. If the number of selected frames is less than 16, the remaining outputs will be filled with fallback frames to ensure consistent output structure.
Cherry Pick Frames Usage Tips:
- Use the
specificmode with theframe_indicesparameter to precisely select frames of interest, especially when working with non-sequential data. - When processing large batches, consider using the
every_nthmode with an appropriate step value to efficiently sample frames without overloading your system. - Adjust the
num_framesparameter to limit the number of frames processed, which can help manage computational resources and focus on the most relevant data.
Cherry Pick Frames Common Errors and Solutions:
Invalid frame_indices format
- Explanation: The
frame_indicesparameter contains non-numeric values or is improperly formatted. - Solution: Ensure that the
frame_indicesstring is a comma-separated list of integers, such as0,5,10.
Index out of range
- Explanation: The specified indices in
frame_indicesexceed the available frames in the batch. - Solution: Verify that all indices are within the range of the batch size and adjust them accordingly.
Unsupported mode
- Explanation: An invalid mode is specified that is not among the supported options.
- Solution: Use one of the valid modes:
first_n,last_n,specific, orevery_nth.
