ComfyUI > Nodes > KJNodes for ComfyUI > Scale Batch Prompt Schedule

ComfyUI Node: Scale Batch Prompt Schedule

Class Name

ScaleBatchPromptSchedule

Category
KJNodes
Author
kijai (Account age: 2192days)
Extension
KJNodes for ComfyUI
Latest Updated
2024-06-25
Github Stars
0.35K

How to Install KJNodes for ComfyUI

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

Scale Batch Prompt Schedule Description

Adjust batch schedule frame count to match new duration, ensuring consistent timing and sequence proportions in animations.

Scale Batch Prompt Schedule:

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.

Scale Batch Prompt Schedule Input Parameters:

input_str

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.

old_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.

new_frame_count

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.

Scale Batch Prompt Schedule Output Parameters:

STRING

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.

Scale Batch Prompt Schedule Usage Tips:

  • Ensure that the input_str is correctly formatted with frame numbers and corresponding values to avoid parsing errors.
  • Use the old_frame_count and new_frame_count parameters to accurately reflect the original and desired frame counts for proper scaling.
  • Double-check the output string to ensure that the new frame numbers and values align with your expectations for the new frame count.

Scale Batch Prompt Schedule Common Errors and Solutions:

Invalid input string format

  • Explanation: The input_str is not formatted correctly, causing parsing errors.
  • Solution: Ensure that the input_str follows the correct format, such as 0:(0.0),\n7:(1.0),\n15:(0.0)\n.

Frame count out of range

  • Explanation: The 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.

Mismatched frame counts

  • Explanation: The old_frame_count does not match the actual number of frames in the input_str.
  • Solution: Verify that the old_frame_count accurately reflects the number of frames represented in the input_str.

Scale Batch Prompt Schedule Related Nodes

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