ComfyUI-Advanced-ControlNet
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
Available Nodes
TimestepKeyframe
Timestep Keyframe Node Documentation
Overview
The Timestep Keyframe node is an integral part of the ComfyUI-Advanced-ControlNet framework, designed to facilitate advanced scheduling of ControlNet effects across sampling steps during image generation. This node enables users to create specific time-based schedules for applying ControlNet characteristics, ensuring that certain effects take hold at specified moments in the generation process, based on a set percentage of completion. By using Timestep Keyframes, users can define when and how the ControlNet's influence is executed, augmenting flexibility and precision in dynamic image generation workflows.
Inputs
The Timestep Keyframe node accepts several inputs to define its behavior:
-
prev_timestep_kf (optional): Allows chaining of multiple Timestep Keyframes. This creates a cohesive schedule where each keyframe is automatically organized by its start percentage. Keyframes defined here with the same start percentage as the current keyframe will be overridden by the current settings.
-
cn_weights (optional): ControlNet weights to apply while the keyframe is active. These must be compatible with the loaded ControlNet. If
inherit_missingis set to True and no weights are provided, the node inherits the last set of weights used in prior keyframes. This input will be ignored if a weights_override is used at the Apply Advanced ControlNet node level. -
latent_keyframe (optional): Specific strengths for individual latents. Similar to
cn_weights, these are inherited ifinherit_missingis active and no latent keyframes are provided. An override at the Apply Advanced ControlNet node will take precedence over this input. -
mask_optional (optional): Attention masks define where and how strongly ControlNet should be applied to the image. Masks can be singular for all latents or different for each latent, and will be inherited if
inherit_missingis set. This input combines withmask_optionalfrom the Apply Advanced ControlNet node, rather than being overridden. -
start_percent (widget input): The percentage of sampling steps at which the keyframe begins to exert its effect. It is considered the pivotal identifier (key) for the schedule.
-
strength (widget input): Determines how strongly the ControlNet affects the image during this keyframe. A value of 0.0 nullifies effects and speeds up processing by reducing unnecessary computation.
-
null_latent_kf_strength (widget input): The strength assigned to any unaccounted latents in
latent_keyframes. It is inactive if there are no batch indices in the latent keyframes. -
inherit_missing (widget input): A boolean toggle that, if True, denotes whether the node should reuse settings from previous keyframes for optional inputs that are unavailable or unchanged.
-
guarantee_steps (widget input): Defines the minimum number of steps that this keyframe must be applied to, regardless of other keyframes ahead in the sequence. Even if a subsequent keyframe would be selected based on sampling percentage, this setting ensures the current keyframe’s inputs are used for at least the specified number of steps.
Outputs
- TIMESTEP_KF: Outputs the defined keyframe, which can then be linked to another Timestep Keyframe or connected to inputs expecting a Timestep Keyframe.
Usage in ComfyUI Workflows
Within ComfyUI workflows, the Timestep Keyframe node is typically utilized to engineer sophisticated temporal control over how and when ControlNets influence the output. By chaining multiple Timestep Keyframes:
-
Scheduled Effects: Users can meticulously schedule when certain ControlNet effects engage across the duration of the sampling process. This is particularly helpful for animations or for maintaining consistent influence over a sequence of generated images.
-
Dynamic Adjustment: Adjusting the start percentages and strength of the ControlNet allows users to dynamically alter the evolution of the image — from subtle transitions to pronounced changes.
-
Complex Composition: Integrated with other keyframe types (e.g., Latent Keyframe), it enables distinct control over different parts of the latent space, providing nuanced texture and attention management.
Considerations
-
Keyframe Order: The node autonomously sorts keyframes according to
start_percent, ensuring an effective ordering even when chaining multiple keyframes. -
Optional Input Handling: The
inherit_missingfeature allows for seamless transitions and reuse of previous settings, reducing the need to redefine common parameters repeatedly across successive keyframes. -
Performance: Setting the
strengthto zero optimizes performance as resource-intensive calculations are bypassed during those specific steps, accelerating the sampling process.
The Timestep Keyframe node, therefore, provides a foundational component for achieving detailed, step-specific control in advanced image synthesis within the ComfyUI-Advanced-ControlNet environment.