CountDiffusion: Text-to-Image Synthesis with Training-Free Counting-Guidance Diffusion

Yanyu Li, Pencheng Wan, Liang Han, Yaowei Wang, Liqiang Nie +1 more
5/7/2025
cs.CV
diffusion-flow

No confident code implementation found for this paper.

Abstract

Stable Diffusion has advanced text-to-image synthesis, but training models to generate images with accurate object quantity is still difficult due to the high computational cost and the challenge of teaching models the abstract concept of quantity. In this paper, we propose CountDiffusion, a training-free framework aiming at generating images with correct object quantity from textual descriptions.

Show full abstract

CountDiffusion consists of two stages. In the first stage, an intermediate denoising result is generated by the diffusion model to predict the final synthesized image with one-step denoising, and a counting model is used to count the number of objects in this image. In the second stage, a correction module is used to correct the object quantity by changing the attention map of the object with universal guidance. The proposed CountDiffusion can be plugged into any diffusion-based text-to-image (T2I) generation models without further training. Experiment results demonstrate the superiority of our proposed CountDiffusion, which improves the accurate object quantity generation ability of T2I models by a large margin.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2025countdiffusion,
  title  = {CountDiffusion: Text-to-Image Synthesis with Training-Free Counting-Guidance Diffusion},
  author = {Yanyu Li and Pencheng Wan and Liang Han and Yaowei Wang and Liqiang Nie and Min Zhang},
  year   = {2025},
  eprint = {2505.04347},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.04347v1}
}

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/2505.04347.svg)](https://codeofpaper.com/paper/2505.04347)

Discussion