← See All Custom Node Packs

ComfyUI-Advanced-ControlNet

972

Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

LatentKeyframeGroup

Documentation for LatentKeyframeGroup Node

Overview

The LatentKeyframeGroup node in the ComfyUI-Advanced-ControlNet repository facilitates the creation of multiple latent keyframes through the specification of individual indices or ranges. It is a part of the broader suite of nodes that enable advanced scheduling and manipulation of ControlNet strengths and effects across different timesteps and latents.

Functionality

The LatentKeyframeGroup node is designed to simplify the process of creating latent keyframes by allowing users to define strengths for specific latents using either singular indices or python-style index ranges. This feature is particularly useful when dealing with batches of latents and when different strengths need to be assigned to grouped latents efficiently.

Inputs

  • prev_latent_kf (optional): This input can be used to chain multiple latent keyframe nodes together. Latent keyframes connected through this input can collectively form a schedule. If there are overlapping indices between the current node and any previous latent keyframes, the values from the previous keyframes will take precedence.

  • latent_optional (optional): This input is used when negative indices are required. It represents the latents expected to be used during sampling and will convert negative indices into valid real values automatically.

  • index_strengths: A string input that allows users to specify a list of indices or python-style ranges of indices with corresponding strengths. This input can include negative indices if the latent_optional input is provided. Different indices must be separated by commas, and strengths assigned using an = sign. For example, to assign a strength of 0.9 to index 0 and strength 0.25 to the fourth-last latent, you might use: 0=0.9,-4=0.25.

  • print_keyframes (optional): A boolean input that, when set to True, outputs the generated latent keyframes for debugging or verification purposes.

Outputs

  • LATENT_KF: This output provides the created latent keyframes, which can be linked to other nodes or used as inputs to other latent keyframe-related nodes in the workflow.

Usage in ComfyUI Workflows

The LatentKeyframeGroup node is pivotal when managing the application of different strengths across various latents in a batch. It is particularly relevant in scenarios where fine control over individual latent adjustments is required.

Typical Use-Cases:

  1. Batch Processing: In workflows involving multiple latents, defining strengths for specific indices or ranges of latents can be done efficiently using this node.

  2. Advanced Animation: When creating animations or image sequences using control nets, dynamically adjusting the influence on specific latents using varied strengths is beneficial for achieving the desired visual effects.

  3. Customized ControlNet Applications: When different portions of an image or animation sequence require varying levels of controlnet influence, this node allows for precise adjustments.

Special Features and Considerations

  • Negative Indices Handling: The node uniquely handles negative indices by converting them into valid indices when used in conjunction with the latent_optional input. This feature supports a backward indexing strategy similar to Python lists.

  • Flexible Specification: Users can specify both individual indices and ranges, offering a powerful way to apply strengths across batches in a concise manner.

  • Chaining Capabilities: The prev_latent_kf input allows for chaining, providing flexibility to integrate multiple latent keyframe groups and tailor their application across timelines as necessary.

By incorporating the LatentKeyframeGroup node in workflow strategies, users can achieve refined control over latent strengths, resulting in enhanced manipulation and performance of ControlNet capabilities in ComfyUI applications.