Classifier-free Guidance with Adaptive Scaling

Dawid Malarz, Artur Kasymov, Maciej Zięba, Jacek Tabor, Przemysław Spurek
2/14/2025
cs.CV

No official code found. Best implementation: gmum/beta-CFG (10 stars, PyTorch, last commit 2025-03-02).

Abstract

Classifier-free guidance (CFG) is an essential mechanism in contemporary text-driven diffusion models. In practice, in controlling the impact of guidance we can see the trade-off between the quality of the generated images and correspondence to the prompt. When we use strong guidance, generated images fit the conditioned text perfectly but at the cost of their quality. Dually, we can use small guidance to generate high-quality results, but the generated images do not suit our prompt. In this paper, we present $β$-CFG ($β$-adaptive scaling in Classifier-Free Guidance), which controls the impact of guidance during generation to solve the above trade-off. First, $β$-CFG stabilizes the effects of guiding by gradient-based adaptive normalization. Second, $β$-CFG uses the family of single-modal ($β$-distribution), time-dependent curves to dynamically adapt the trade-off between prompt matching and the quality of samples during the diffusion denoising process. Our model obtained better FID scores, maintaining the text-to-image CLIP similarity scores at a level similar to that of the reference CFG.

View on arXivView PDF

Code Implementations(1)

gmum/beta-CFGCommunity100%
PyTorch

This paper presents β-CFG, a dynamic guidance method for text-to-image diffusion models. Unlike standard CFG, which uses a fixed guidance scale, β-CFG adapts guidance strength over time using a β-distribution. This improves image quality, keeps sampling closer to the data manifold, and achieves better FID while maintaining prompt alignment.

100PythonFeb 12, 20251 years ago
diffusion-modelsdiffusionmodelpytorchstable-diffusiontext-to-image+1 more

Similar Papers

Cite this paper

@article{malarz2025classifierfree,
  title  = {Classifier-free Guidance with Adaptive Scaling},
  author = {Dawid Malarz and Artur Kasymov and Maciej Zięba and Jacek Tabor and Przemysław Spurek},
  year   = {2025},
  eprint = {2502.10574},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.10574v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.10574.svg)](https://codeofpaper.com/paper/2502.10574)

Discussion