ComfyUI  >  Nodes  >  ComfyUI-FrameFX >  Mask Sequence Helper

ComfyUI Node: Mask Sequence Helper

Class Name

MaskSequenceHelper

Category
advanced
Author
mgfxer (Account age: 32 days)
Extension
ComfyUI-FrameFX
Latest Updated
7/20/2024
Github Stars
0.0K

How to Install ComfyUI-FrameFX

Install this extension via the ComfyUI Manager by searching for  ComfyUI-FrameFX
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-FrameFX 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Mask Sequence Helper Description

Automate mask sequence creation and manipulation for smooth animation transitions and holds.

Mask Sequence Helper:

The MaskSequenceHelper node is designed to facilitate the creation and manipulation of mask sequences for animation workflows. This node is particularly useful for generating timelines and mask definitions that can be used to create smooth transitions and holds between different frames in an animation. By leveraging this node, you can automate the process of repeating images, adding transitions, and padding frames, which significantly streamlines the animation creation process. The primary goal of the MaskSequenceHelper is to provide a robust and flexible tool for managing complex mask sequences, making it easier to achieve professional-quality animations with minimal manual effort.

Mask Sequence Helper Input Parameters:

image_stream

The image_stream parameter is a required input that accepts a stream of images. This stream serves as the source material for generating the mask sequences. The images in the stream will be repeated and manipulated according to the specified hold and transition lengths to create the desired animation effect.

num_images

The num_images parameter specifies the number of images to be used in the sequence. It is an integer value with a default of 4 and a minimum of 1. This parameter determines how many images from the image_stream will be included in the animation cycle.

hold_length

The hold_length parameter defines the duration for which each image will be held before transitioning to the next image. It is an integer value with a default of 5 and a minimum of 1. A longer hold length will result in each image being displayed for a more extended period, creating a slower-paced animation.

transition_length

The transition_length parameter specifies the duration of the transition between consecutive images. It is an integer value with a default of 20 and a minimum of 1. This parameter controls the smoothness of the transition, with longer transition lengths resulting in more gradual changes between images.

padding_frames

The padding_frames parameter allows you to add extra frames at the end of the sequence. It is an integer value with a default of 0 and a minimum of 0. Padding frames can be useful for extending the duration of the final image in the sequence, ensuring a smooth loop or providing additional time for the last frame to be displayed.

Mask Sequence Helper Output Parameters:

first_timeline

The first_timeline output is a tensor containing the first sequence of images generated based on the input parameters. This timeline includes the repeated images, holds, and transitions as specified, providing a complete sequence for the first part of the animation.

second_timeline

The second_timeline output is a tensor containing the second sequence of images. This timeline is similar to the first but is offset to create a complementary sequence, which can be used for more complex animation effects or dual-layer animations.

first_text_output

The first_text_output is a string that contains the mask definitions for the first timeline. This text output provides a detailed description of the frame-by-frame mask values, which can be used for further processing or debugging.

second_text_output

The second_text_output is a string that contains the mask definitions for the second timeline. Like the first text output, this string provides a detailed description of the mask values for each frame in the second timeline.

total_frames

The total_frames output is an integer representing the total number of frames in the generated sequence. This value includes all the holds, transitions, and padding frames, providing a complete count of the frames in the animation.

Mask Sequence Helper Usage Tips:

  • To create a smooth and professional-looking animation, experiment with different hold_length and transition_length values to find the optimal balance between image holds and transitions.
  • Use the padding_frames parameter to extend the duration of the final image in the sequence, ensuring a smooth loop or providing additional time for the last frame to be displayed.
  • Review the first_text_output and second_text_output strings to understand the frame-by-frame mask values, which can be useful for debugging or further processing.

Mask Sequence Helper Common Errors and Solutions:

"IndexError: index out of range in self"

  • Explanation: This error occurs when the num_images parameter exceeds the number of images available in the image_stream.
  • Solution: Ensure that the num_images parameter does not exceed the number of images provided in the image_stream.

"ValueError: negative dimensions are not allowed"

  • Explanation: This error occurs when the hold_length or transition_length parameters are set to negative values.
  • Solution: Ensure that both hold_length and transition_length parameters are set to positive integer values.

"TypeError: expected Tensor as element 0 in argument 0, but got list"

  • Explanation: This error occurs when the input image_stream is not provided as a tensor.
  • Solution: Ensure that the image_stream input is a tensor containing the images to be used in the sequence.

Mask Sequence Helper Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-FrameFX
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.