Adaptive Guidance is a specialized tool designed to enhance the functionality of ComfyUI by optimizing the guidance during the image generation process. By leveraging cosine similarity calculations between conditional and unconditional outputs, it aims to improve inference speed while maintaining quality.
- Allows for an
AdaptiveGuidancenode to be integrated withSamplerCustomAdvanced, enhancing sampling techniques. - Implements a threshold mechanism that adjusts the CFG (Classifier-Free Guidance) dynamically, improving processing efficiency.
- Features an experimental "uncond zero" CFG option that can further refine the output by modifying guidance after the standard CFG is disabled.
Context
Adaptive Guidance is an extension for ComfyUI that focuses on improving the efficiency of image generation through dynamic adjustments in guidance settings. It provides users with an innovative way to compare traditional CFG methods against adaptive techniques, potentially leading to faster and more effective image outputs.
Key Features & Benefits
The primary feature of Adaptive Guidance is its ability to calculate cosine similarity between the outputs of conditional and unconditional prompts. This calculation allows the tool to set the CFG to 1.0 when a specified similarity threshold is surpassed, effectively bypassing negative prompt computations. This results in quicker inference times, which is crucial for users looking to optimize their workflow.
Advanced Functionalities
One notable advanced feature is the "uncond zero" CFG option, which activates after the standard CFG has been turned off. This feature, derived from another project, aims to refine the output quality further by adjusting guidance parameters, although its stability may vary and is subject to change in future updates.
Practical Benefits
By implementing Adaptive Guidance, users can achieve a more streamlined workflow that reduces processing times without sacrificing output quality. The ability to dynamically adjust CFG settings based on similarity metrics provides greater control over the generation process, allowing for more efficient experimentation and iteration.
Credits/Acknowledgments
The tool is based on concepts from the original adaptive guidance paper and incorporates ideas from the Uncond Zero project. It is developed by contributors dedicated to enhancing the functionality of ComfyUI.