ComfyUI > Nodes > ComfyUI-AutomaticCFG

ComfyUI Extension: ComfyUI-AutomaticCFG

Repo Name

ComfyUI-AutomaticCFG

Author
Extraltodeus (Account age: 3201 days)
Nodes
View all nodes(11)
Latest Updated
2024-08-04
Github Stars
0.32K

How to Install ComfyUI-AutomaticCFG

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

ComfyUI-AutomaticCFG Description

ComfyUI-AutomaticCFG is a self-rescaling CFG tool designed to enhance image quality by preventing burned images and artifacts. Set your CFG at 8 for optimal results, with improved sensitivity and quality even at lower scales like 4.

ComfyUI-AutomaticCFG Introduction

ComfyUI-AutomaticCFG is an extension designed to enhance the image generation process in AI art by automatically adjusting the Classifier-Free Guidance (CFG) scale. This extension aims to prevent common issues such as image "burning" and artifacts, while also significantly speeding up the generation process. By dynamically rescaling the CFG at each step, ComfyUI-AutomaticCFG ensures that the output maintains high quality and consistency, making it a valuable tool for AI artists looking to improve their workflow and results.

How ComfyUI-AutomaticCFG Works

At its core, ComfyUI-AutomaticCFG works by dynamically adjusting the CFG scale during the image generation process. The CFG scale is a parameter that influences the strength of the guidance provided by the model's conditioning. Typically, a high CFG scale can lead to over-saturation and artifacts, while a low CFG scale might result in less detailed images.

ComfyUI-AutomaticCFG addresses this by evaluating the potential average minimum and maximum values of the CFG at each step and rescaling it to achieve a desired output intensity. This intensity is defined in terms of overall brightness, saturation, and sharpness. The extension uses a central CFG value of 8 as a reference point, adjusting the scale proportionally based on this value. For example, a CFG of 4 aims for half the desired intensity, while a CFG of 16 aims for double.

By automatically adjusting the CFG scale, ComfyUI-AutomaticCFG helps to produce images with fewer artifacts and more consistent quality, even when using higher CFG values.

ComfyUI-AutomaticCFG Features

Self-Rescaling CFG / Anti-Burn

This feature automatically adjusts the CFG scale to prevent image burning and artifacts. It ensures that the images generated are of high quality, regardless of the CFG scale used.

Warp Drive Node

The warp drive node significantly speeds up the image generation process, making it up to 160% faster. This is particularly useful for artists who need to generate multiple images quickly.

Custom Attention Modifiers

ComfyUI-AutomaticCFG includes custom attention modifiers that allow for more precise control over the image generation process. These modifiers can be adjusted to enhance specific aspects of the image, such as detail or style.

Interesting Presets

The extension comes with a variety of presets that can be used to quickly apply different settings and achieve various artistic effects. These presets are designed to be easy to use and can be customized further if needed.

Temperature Scaling

Temperature scaling helps to control the randomness of the image generation process. By adjusting the temperature, artists can influence the level of detail and creativity in the generated images.

ComfyUI-AutomaticCFG Models

ComfyUI-AutomaticCFG is compatible with various models, including SD3 and Pixart Sigma. It works well with these models as long as certain features, such as the boost feature or cutting the uncond, are not used. The extension is designed to be flexible and adaptable to different models, ensuring that artists can achieve the best possible results regardless of the model they are using.

What's New with ComfyUI-AutomaticCFG

Recent Updates

  • Uncond Zero Node: This node has been removed and moved to its own repository for better management and updates.
  • Temperature Nodes: These nodes have been removed and are now available in a separate repository.
  • Warp Drive Node: A new method that uses the previous step to determine a negative, significantly reducing generation time.
  • Preset Loader Node: Allows for loading and applying various presets, including custom attention mechanisms.
  • Excellent Attention Node: A new node that enhances the attention mechanism, improving prompt-following and overall image quality.

Version Updates

  • 28.5% Faster Generation: The extension has been optimized to generate images up to 28.5% faster than before.
  • Negative Weighting: Improved handling of negative prompts to enhance image quality.
  • Uncond Start Percentage: An experimental feature that allows starting the guidance later in the process, improving sample and distribution quality.

Troubleshooting ComfyUI-AutomaticCFG

Common Issues and Solutions

  1. Error After Update: If you encounter errors after updating ComfyUI, ensure that you have the latest version of ComfyUI-AutomaticCFG installed.
  2. Artifacts in Images: If you notice artifacts, try adjusting the CFG scale or using different presets to see if the issue resolves.
  3. Slow Generation Speed: Ensure that the warp drive node is enabled and properly configured to take advantage of the speed improvements.

Frequently Asked Questions

  • How do I install ComfyUI-AutomaticCFG? Installation instructions are typically provided in the repository. Follow the steps to clone the repository and integrate it with your existing setup.
  • Can I use ComfyUI-AutomaticCFG with any model? While it works with many models, some features may not be compatible with all models. Check the documentation for specific compatibility notes.
  • What are the best settings for high-quality images? Experiment with different CFG scales and presets to find the settings that work best for your specific needs.

Learn More about ComfyUI-AutomaticCFG

For additional resources, tutorials, and community support, consider exploring the following:

ComfyUI-AutomaticCFG Related 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.