ComfyUI-AutomaticCFG  by Extraltodeus

ComfyUI custom node for improved Stable Diffusion image generation

created 1 year ago
416 stars

Top 71.5% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides custom nodes for ComfyUI to enhance Stable Diffusion image generation by dynamically adjusting CFG scale and incorporating attention modifications. It targets users seeking improved image quality, reduced artifacts, and faster generation times, offering a "thermostat" for CFG control and advanced prompt-following capabilities.

How It Works

The core innovation is a self-rescaling CFG mechanism that adjusts the CFG scale at each sampling step based on estimated min/max values, aiming for a target intensity (brightness/saturation/sharpness). This approach aims to prevent "burns" (artifacts) and improve overall image quality by allowing the sampler to adapt dynamically. Additionally, it introduces custom attention modifiers and a "warp drive" feature that significantly speeds up generation by disabling negative guidance for most steps.

Quick Start & Requirements

  • Install via ComfyUI custom nodes manager or by cloning the repository into the custom_nodes directory.
  • Requires ComfyUI and a compatible Stable Diffusion model.
  • Specific workflows and examples are provided in the repository.

Highlighted Details

  • Claims up to 28.5% faster generation speed compared to standard methods.
  • Offers custom attention modifiers for fine-grained control over prompt adherence and style.
  • Includes a "warp drive" node for significant speedups by disabling negative prompts for most of the sampling process.
  • Features a preset loader for applying various attention and CFG configurations.

Maintenance & Community

  • The project is actively developed by Extraltodeus.
  • Updates include bug fixes, new features like the "warp drive" node, and compatibility improvements.
  • Example workflows and detailed explanations for nodes are available.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README.
  • Compatibility is primarily with ComfyUI and Stable Diffusion models (SDXL and SD 1.5 tested).

Limitations & Caveats

  • Presets are loaded using eval(), posing a potential security risk if loading untrusted configurations.
  • Some advanced features or presets may have limited testing on SD 1.5, with a primary focus on SDXL.
  • Certain models, like Juggernaut, may not be compatible with specific attention modification nodes.
Health Check
Last commit

10 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
1
Star History
14 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.