ComfyUI > Nodes > ComfyUI > Adaptive Projected Guidance

ComfyUI Node: Adaptive Projected Guidance

Class Name

APG

Category
sampling/custom_sampling
Author
ComfyAnonymous (Account age: 872days)
Extension
ComfyUI
Latest Updated
2025-05-13
Github Stars
76.71K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Adaptive Projected Guidance Description

Enhances AI-generated outputs by dynamically adjusting guidance for refined conditioning and optimized results.

Adaptive Projected Guidance:

Adaptive Projected Guidance (APG) is a sophisticated node designed to enhance the quality and precision of AI-generated outputs by dynamically adjusting the guidance applied during the model's execution. The primary goal of APG is to refine the conditioning process, which is crucial in AI art generation, by adaptively projecting and modifying the guidance vectors. This method ensures that the guidance is not only aligned with the desired output but also optimized to prevent overfitting or underfitting, leading to more accurate and aesthetically pleasing results. By incorporating techniques such as momentum and normalization thresholds, APG provides a robust framework for managing the influence of conditioning on the model's output, making it an invaluable tool for artists seeking to fine-tune their AI-generated creations.

Adaptive Projected Guidance Input Parameters:

model

The model parameter represents the AI model that will be used for generating outputs. It is crucial as it defines the architecture and capabilities of the AI system being employed. The model's configuration directly impacts the quality and style of the generated art, making it a foundational element in the node's execution.

eta

The eta parameter is a scaling factor applied to the parallel component of the guidance vector. It influences how much of the guidance is aligned with the original conditioning, allowing for fine-tuning of the model's adherence to the initial conditions. Adjusting eta can help balance between strict adherence to the input conditions and creative deviation, with no specific minimum or maximum values provided in the context.

norm_threshold

The norm_threshold parameter sets a limit on the magnitude of the guidance vector. By capping the norm, it prevents excessive influence of the guidance, which can lead to overfitting. This parameter is essential for maintaining a balance between the guidance's strength and the model's flexibility, ensuring that the output remains within desired bounds.

momentum

The momentum parameter is used to apply a moving average to the guidance vector, smoothing out fluctuations and providing stability to the guidance process. It helps in maintaining consistency across iterations, especially in scenarios where the guidance might vary significantly. The momentum value typically ranges from 0 to 1, with higher values indicating greater smoothing.

Adaptive Projected Guidance Output Parameters:

modified_cond

The modified_cond output represents the adjusted conditioning that has been processed through the APG node. This output is crucial as it reflects the refined guidance applied to the model, ensuring that the generated output aligns with the desired artistic intent while maintaining flexibility and creativity.

uncond

The uncond output is the unconditioned component of the model's input, which remains unchanged by the APG process. It serves as a baseline or reference point, allowing users to compare the effects of the applied guidance and understand the modifications made by the node.

Adaptive Projected Guidance Usage Tips:

  • Experiment with different eta values to find the right balance between adherence to input conditions and creative freedom in the output.
  • Use the momentum parameter to stabilize the guidance process, especially in projects where consistency across iterations is crucial.
  • Adjust the norm_threshold to prevent overfitting and ensure that the guidance does not overpower the model's inherent creativity.

Adaptive Projected Guidance Common Errors and Solutions:

"Tensor is not defined"

  • Explanation: This error occurs when the guidance vector is expected to be a tensor, but it is not properly initialized or defined.
  • Solution: Ensure that all input parameters are correctly set and that the model is properly initialized before execution.

"Guidance norm exceeds threshold"

  • Explanation: This error indicates that the magnitude of the guidance vector exceeds the specified norm_threshold.
  • Solution: Adjust the norm_threshold parameter to a higher value or refine the input conditions to reduce the guidance vector's magnitude.

"Invalid model configuration"

  • Explanation: This error suggests that the model provided is not compatible with the APG node's requirements.
  • Solution: Verify that the model is correctly configured and compatible with the APG node, ensuring all necessary dependencies are met.

Adaptive Projected Guidance Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.