Visit ComfyUI Online for ready-to-use ComfyUI environment
Adjust batch schedule frame count to match new duration, ensuring consistent timing and sequence proportions in animations.
The ScaleBatchPromptSchedule
node is designed to adjust a batch schedule from Fizz' nodes BatchPromptSchedule to fit a different frame count. This is particularly useful when you need to scale the timing of prompts or events in an animation or sequence to match a new duration or frame count. By recalculating the frame numbers based on the new frame count, this node ensures that the timing and sequence of prompts remain consistent and proportional, even when the total number of frames changes. This can be especially beneficial for AI artists working with animations or sequences where maintaining the relative timing of events is crucial.
This parameter takes a string that represents the original batch schedule. The string should be formatted as a series of frame numbers and corresponding values, for example, 0:(0.0),\n7:(1.0),\n15:(0.0)\n
. This input defines the initial timing and values of the prompts or events in the original frame count.
This integer parameter specifies the number of frames in the original batch schedule. It is used to calculate the scaling factor for adjusting the frame numbers. The minimum value is 1, the maximum value is 4096, and the default value is 1.
This integer parameter defines the number of frames in the new batch schedule. The node uses this value to scale the original frame numbers to fit the new frame count. The minimum value is 1, the maximum value is 4096, and the default value is 1.
The output is a string that represents the scaled batch schedule. It contains the new frame numbers and corresponding values, formatted similarly to the input string. This output ensures that the timing and sequence of prompts are adjusted to fit the new frame count while maintaining their relative positions.
input_str
is correctly formatted with frame numbers and corresponding values to avoid parsing errors.old_frame_count
and new_frame_count
parameters to accurately reflect the original and desired frame counts for proper scaling.input_str
is not formatted correctly, causing parsing errors.input_str
follows the correct format, such as 0:(0.0),\n7:(1.0),\n15:(0.0)\n
.old_frame_count
or new_frame_count
is set outside the allowed range of 1 to 4096. - Solution: Adjust the old_frame_count
and new_frame_count
to be within the range of 1 to 4096.old_frame_count
does not match the actual number of frames in the input_str
.old_frame_count
accurately reflects the number of frames represented in the input_str
.© Copyright 2024 RunComfy. All Rights Reserved.