DAttnVis: Attention-guided visual diagnostics for stable diffusion inference in image generation

View at publisher
Authors: Xue Liang, Yi Chen, Cheng Lv
Cited by: 1
References: 34

Abstract

Stable Diffusion is a widely used text-to-image generation model. However, its outputs are highly sensitive to hyperparameters settings and often suffer issues such as semantic drift, subject misalignment and detail loss. Traditional methods rely on manually adjusting hyperparameters to alter the attention distribution and thus improve the quality of generated images, which is time-consuming and lacks precision. Therefore, we propose an attention-guided visual diagnostic system named DAttnVis, which is designed to assist users in understanding the complex inference process of the Stable Diffusion model and optimizing its parameters. The core idea is to transform high-dimensional attention signals into comparable diagnostic representations across layers using a quantifiable metric—the Attention Concentration Index (ACI). Additionally, an anomaly detection method based on Median Absolute Deviation (MAD) is proposed to accurately identify abnormal attention layers. By linking multiple views, including UNet attention flow, diagnosis and guidance, cross-attention, and historical comparison, DAttnVis constructs a comprehensive diagnostic workflow that covers global screening, structural drilling-down, semantic tracing, and result verification. Quantitative evaluation experiments, case studies and user studies demonstrate that DAttnVis can effectively reduce trial-and-error costs and debugging burdens in the model tuning process, while improving the accuracy of anomalous structure localization and key prompt attribution.

Fields of Study & Subjects

Generative Adversarial Networks and Image Synthesis Cell Image Analysis Techniques Domain Adaptation and Few-Shot Learning

Publication details

Journal / source
Information Visualization
Publisher
SAGE Publications
Volume
25
Issue
3
Pages
268–287
Publication date
28 March 2026
Language
EN