Extraltodeus/ComfyUI-AutomaticCFG

If your image was a pizza and the CFG the temperature of your oven: this is a thermostat that ensures it is always cooked like you want. Also adds a 30% speed increase. For ComfyUI / StableDiffusion

What it solves

This project addresses the issue of "burned" images (over-saturation and artifacts) that often occur when using high Classifier-Free Guidance (CFG) scales in diffusion models. It also aims to reduce the slow inference speeds associated with calculating negative prompts (unconditional guidance) at every step.

How it works

The tool implements a self-rescaling CFG system that automatically adjusts the guidance scale at each sampling step based on the potential average min/max values of the latent space. Instead of a static CFG value, the sampler's CFG scale becomes a target for overall intensity, brightness, and saturation.

To increase speed, it includes a "warp drive" node and a "boost" toggle that can disable negative guidance when sigmas are near 1, significantly reducing the number of required calculations and speeding up generation times.

Who it’s for

Users of ComfyUI who want to prevent image artifacts at high guidance scales and those looking to accelerate their image generation process without sacrificing quality.

Highlights

  • Anti-burn mechanism: Automatically rescales CFG to prevent over-saturation and artifacts.
  • Warp Drive: A custom method to determine negatives from previous steps, potentially increasing generation speed by up to 160%.
  • Attention Modifiers: Includes a preset loader and "Excellent Attention" node to modify cross-attention layers for better prompt following and detail.
  • Broad Compatibility: Works with SDXL, SD 1.5, SD3, and PixArt Sigma.

相關

  • 專案
  • 專案
  • 專案
  • 專案
  • 專案