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.
Keywords
Get full access to this article
View all access options for this article.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
