ComfyUI > Nodes > Chaosaiart-Nodes > ๐Ÿ”ถ Switch on Frame

ComfyUI Node: ๐Ÿ”ถ Switch on Frame

Class Name

chaosaiart_Frame_Switch

Category
๐Ÿ”ถChaosaiart/switch
Author
chaosaiart (Account age: 355days)
Extension
Chaosaiart-Nodes
Latest Updated
2024-05-27
Github Stars
0.05K

How to Install Chaosaiart-Nodes

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

๐Ÿ”ถ Switch on Frame Description

Facilitates dynamic source switching based on frame number for AI artists to control transitions in animations.

๐Ÿ”ถ Switch on Frame:

The chaosaiart_Frame_Switch node is designed to facilitate dynamic switching between two different sources based on the current frame number in an animation or sequence. This node is particularly useful for AI artists who need to change the input source at a specific frame during the rendering process. By setting a switch frame, you can control when the transition between the two sources occurs, allowing for more complex and varied animations. This node helps in creating seamless transitions and can be used to introduce different elements or effects at precise moments in your animation timeline.

๐Ÿ”ถ Switch on Frame Input Parameters:

activ_frame

The activ_frame parameter represents the current frame number in the animation sequence. This parameter is crucial as it determines whether the node should output the source before or after the switch frame. The value of activ_frame is dynamically updated as the animation progresses, ensuring that the correct source is selected at the right time.

source_before_frame

The source_before_frame parameter specifies the input source that will be used before the switch frame is reached. This can be any type of input, such as an image, a video frame, or any other data type that the node can process. The node will output this source until the activ_frame reaches the Switch_frame value.

source_after_frame

The source_after_frame parameter defines the input source that will be used after the switch frame is reached. Similar to source_before_frame, this can be any type of input. Once the activ_frame surpasses the Switch_frame value, the node will switch to this source for the remainder of the animation.

Switch_frame

The Switch_frame parameter is an integer that sets the specific frame number at which the node will switch from source_before_frame to source_after_frame. The default value is 30, with a minimum value of 1 and a maximum value of 18446744073709551615. This parameter allows you to precisely control the timing of the source switch in your animation.

๐Ÿ”ถ Switch on Frame Output Parameters:

SOURCE

The SOURCE output parameter provides the selected input source based on the current frame number (activ_frame). If the activ_frame is less than the Switch_frame, the output will be source_before_frame. If the activ_frame is greater than or equal to the Switch_frame, the output will be source_after_frame. This dynamic output ensures that the correct source is used at the appropriate time in the animation sequence.

๐Ÿ”ถ Switch on Frame Usage Tips:

  • To create smooth transitions in your animations, carefully choose the Switch_frame value to align with key moments in your sequence.
  • Use source_before_frame and source_after_frame to introduce different visual elements or effects at specific points in your animation, enhancing the overall visual experience.
  • Experiment with different Switch_frame values to find the optimal timing for your source switch, ensuring a seamless and natural transition.

๐Ÿ”ถ Switch on Frame Common Errors and Solutions:

"Invalid frame number"

  • Explanation: This error occurs if the activ_frame value is not within the valid range.
  • Solution: Ensure that the activ_frame value is a positive integer and within the expected range of your animation sequence.

"Source type mismatch"

  • Explanation: This error happens when the types of source_before_frame and source_after_frame are incompatible.
  • Solution: Verify that both source_before_frame and source_after_frame are of the same type or compatible types that the node can process.

"Switch_frame out of bounds"

  • Explanation: This error is triggered if the Switch_frame value is set outside the valid range.
  • Solution: Adjust the Switch_frame value to be within the range of 1 to 18446744073709551615, ensuring it falls within the duration of your animation sequence.

๐Ÿ”ถ Switch on Frame Related Nodes

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