# Automatic1111

**Automatic1111**，正式名称为 [Stable Diffusion](https://www.edgepedia.org/zh/stable-diffusion) 网页界面（Stable Diffusion web UI），是一个用于以 Stable Diffusion 生成和编辑图像的开源浏览器界面，以 Python 配合 Gradio 库实现，于 2022 年 8 月 22 日在 GitHub 上以 GNU Affero 通用公共许可证 v3.0 发布<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。该仓库在 GitHub 上有 164,568 个星标和 30,136 个复刻<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。

| 关键事实 | 详情 |
|---|---|
| 它是什么 | 用于 Stable Diffusion 的浏览器界面，以 Python 配合 Gradio 库实现<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup> |
| 发布 | GitHub，2022 年 8 月 22 日，GNU Affero 通用公共许可证 v3.0<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup> |
| 采用情况 | 164,568 个星标和 30,136 个复刻<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup> |
| 核心模式 | 文生图、图生图、内补绘制、外补绘制、提示词注意力语法、负面提示词、嵌入、超网络、LoRA<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup> |
| 硬件下限 | 支持 4 GB 显卡，有报告称 2 GB 亦可运行；可在 8 GB 显存上训练嵌入<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup> |
| 安全 | Pickle 格式的模型文件可执行任意代码；CVE-2024-11045 和 CVE-2024-12375 影响该网页界面<sup>[5](https://huggingface.co/docs/hub/security-pickle)</sup><sup> • </sup><sup>[6](https://nvd.nist.gov/vuln/detail/cve-2024-11045)</sup><sup> • </sup><sup>[7](https://nvd.nist.gov/vuln/detail/CVE-2024-12375)</sup> |

## 概述

Automatic1111 是一个用于 Stable Diffusion 的网页界面，使用 Gradio 库实现<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。其底层的潜空间扩散架构由 Rombach 及其同事在 CVPR 2022 上发表，通过在压缩的潜空间中应用扩散过程，取得了当时最先进的合成结果，其公式化表达允许一种引导机制来控制图像生成<sup>[3](https://openaccess.thecvf.com/content/CVPR2022/papers/Rombach_High-Resolution_Image_Synthesis_With_Latent_Diffusion_Models_CVPR_2022_paper)</sup>。

一篇经同行评审的视觉计算扩散模型综述介绍了扩散模型的数学概念，以及流行的 Stable Diffusion 模型的实现细节与设计选择，涵盖个性化、条件化与反演等研究领域<sup>[4](https://onlinelibrary.wiley.com/doi/10.1111/cgf.15063)</sup>。

## 架构与功能

该界面是一个分标签页的 Gradio 页面：文生图用于文本到图像的生成，图生图配合内补绘制用于变换和编辑现有图像，附加功能用于放大和面部修复，还有一个扩展标签页用于安装社区附加组件<sup>[8](https://www.wireflow.ai/blog/comfyui-vs-automatic1111)</sup>。

**生成模式。** 文生图根据文本提示词生成图像；图生图在提示词和去噪强度的引导下变换输入图像；内补绘制重新生成被遮罩的区域，启用“内补区域：仅遮罩”选项时，只有被遮罩的区域会被调整尺寸并贴回，从而让大图能以大得多的有效分辨率进行内补绘制<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup><sup> • </sup><sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。外补绘制将图像延伸到其边界之外；项目 wiki 建议使用与画面匹配的提示词，将去噪和 CFG 比例设为最大值，并使用 Euler ancestral 或 DPM2 ancestral 采样器运行 50 到 100 步<sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。

**提示词语法与适配器。** 提示词支持注意力语法，如 ((tuxedo)) 或加权形式 (tuxedo:1.21)，以及引导模型远离不需要内容的负面提示词<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。文本反演嵌入、超网络和 LoRA（低秩适配器，即小型微调权重文件）通过额外网络卡片或语法添加到提示词中；放入 models/Lora 的 LoRA 文件以其文件名和一个通常在 0 到 1 之间的乘数来应用，且 LoRA 不能添加到负面提示词中<sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。LoRA 支持内置于该网页界面，原始实现由 kohya-ss 完成；在撰写该 wiki 时，尚不支持用于 Stable Diffusion 2.0+ 模型的 LoRA 网络<sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。

**实验工具。** X/Y/Z 图表可创建按参数变化的图像网格，X 和 Y 作为行和列，Z 作为批次维度<sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。附加功能标签页提供 GFPGAN 和 CodeFormer 面部修复，以及 RealESRGAN、ESRGAN、SwinIR/Swin2SR 和 LDSR 放大器<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。CLIP interrogator 可从现有图像猜测提示词，检查点合并器最多可合并三个模型检查点，API 则允许以编程方式使用<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。

**可复现性。** 生成参数随每张图像保存在 PNG 数据块中（JPEG 则保存在 EXIF 中），并可通过 PNG 信息标签页读回，因此保留这些元数据的图像可以携带其生成参数<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。

## 硬件要求与性能

该项目记录了针对 NVIDIA GPU（推荐）、AMD GPU、Intel CPU 和 GPU、昇腾 NPU 的安装方法，或通过 [Google Colab](https://www.edgepedia.org/zh/google-colab) 等在线服务使用<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。

**显存阈值。** 该界面支持 4 GB 显卡，有报告称 2 GB 亦可运行，嵌入可在 8 GB 显存上训练，有报告称 6 GB 亦可运行<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。低显存优化使 4 GB 显卡上的 512x512 生成成为可能：--lowvram 模式一次只在 GPU 内存中保留一个模型模块，该 wiki 作者测得其在 RTX 3090 上比正常运行慢约 10 倍，而轻量级 VAE 将 lowvram 的最大生成尺寸从 1152x1152 提高到 2560x2560<sup>[2](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)</sup>。

**速度与文件格式。** --xformers 命令行参数启用 xformers 的内存高效注意力实现，项目称其在部分显卡上可大幅提升速度<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。该界面可加载 safetensors 格式的检查点，这对下文所述的安全问题很重要<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>。

## 扩展生态系统

扩展从扩展标签页安装，该标签页列出社区仓库并将其安装到运行中的应用里<sup>[8](https://www.wireflow.ai/blog/comfyui-vs-automatic1111)</sup>。

## 安全与模型加载风险

对于任何在本地运行该工具的人来说，有两个不同的攻击面值得注意。

**模型文件格式。** Pickle 是 [PyTorch](https://www.edgepedia.org/zh/pytorch) 模型权重的默认序列化格式，而加载 pickle 文件可能促成任意代码执行攻击；构成威胁的 pickle 指令是 STACK_GLOBAL、GLOBAL 和 REDUCE<sup>[5](https://huggingface.co/docs/hub/security-pickle)</sup>。由于社区检查点和 LoRA 以文件形式共享，一个恶意的 .ckpt 或 .pt 文件在作为 pickle 加载时可执行代码。[Hugging Face](https://www.edgepedia.org/zh/hugging-face) 的应对方式是对每个上传的 pickle 文件运行 Pickle Import 扫描，提取并显示其导入项并高亮可疑项，同时正在开发 safetensors——一种它称为更安全替代方案的更简单的序列化格式<sup>[5](https://huggingface.co/docs/hub/security-pickle)</sup>。Automatic1111 对加载 safetensors 格式检查点的支持<sup>[1](https://github.com/automatic1111/stable-diffusion-webui/)</sup>为用户提供了一个直接的防御选择：优先使用 .safetensors 文件而非 pickle 文件。

**网页界面本身的漏洞。** CVE-2024-11045 是 1.10.0 版本中的一个跨站 [WebSocket](https://www.edgepedia.org/zh/websocket) 劫持漏洞，源于对 ws://127.0.0.1:7860/queue/join 处的 WebSocket 连接缺乏验证；它允许攻击者从 GitHub 仓库克隆一个恶意的服务器扩展、执行恶意脚本、窃取数据，并可能造成拒绝服务。该漏洞由 NVD 于 2025 年 3 月 20 日发布，来源为 huntr.dev<sup>[6](https://nvd.nist.gov/vuln/detail/cve-2024-11045)</sup>。CVE-2024-12375 是一个影响 git 提交 82a973c 的本地文件包含漏洞，允许攻击者通过特制请求读取系统上的任意文件<sup>[7](https://nvd.nist.gov/vuln/detail/CVE-2024-12375)</sup>。WebSocket 劫持漏洞利用的是对本地 Web 服务器连接的验证不足，使同一浏览器中打开的恶意网页能够访问到存在漏洞的端点<sup>[6](https://nvd.nist.gov/vuln/detail/cve-2024-11045)</sup>。

## 开发现状

发布活动在 2023 年 8 月的 v1.6 和 2023 年 12 月的 v1.7 前后达到高峰，随后延续至 v1.8（2024 年 2 月至 3 月）、v1.9（2024 年 4 月）和 v1.10（2024 年 7 月）<sup>[12](https://factory.ai/open-source-wikis/stable-diffusion-webui?page=by-the-numbers.md)</sup>。关于终止时间点的说法不一：一项代码库分析记录最新的 master 提交为 2024-07-27，带有 v1.10.1 标签<sup>[12](https://factory.ai/open-source-wikis/stable-diffusion-webui?page=by-the-numbers.md)</sup>，而一份专业对比报告称最后一次真正的发布是 2025-02-09 的 v1.10.1，一个缺陷修复版本<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup>。两者在实质上是一致的：项目处于维护模式，不原生支持 Flux 或 SD 3.5 模型系列<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup>。

该仓库仍有约 165,000 个星标，但 master 分支已约两年没有变化，约 2,400 个议题仍处于开启状态，大部分活跃开发已转移到 Forge 和 Forge Neo 等复刻<sup>[8](https://www.wireflow.ai/blog/comfyui-vs-automatic1111)</sup>。基于节点的替代方案 ComfyUI 于 2026-04-27 发布了 v0.20.1，约有 137 个版本和 300 多名贡献者<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup>。

## 与 ComfyUI、Forge 和 Fooocus 的比较

这些界面的差异主要在于工作流模型。Automatic1111 使用固定的、基于表单的标签页界面，易于学习，但无法表达任意的处理图<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup><sup> • </sup><sup>[8](https://www.wireflow.ai/blog/comfyui-vs-automatic1111)</sup>。ComfyUI 使用基于节点的工作流，高度可定制且显存高效，对 SDXL 模型性能最佳，代价是学习曲线更陡；它还将工作流保存为嵌入 PNG 元数据的 JSON，这是 A1111 所缺乏的可复现性功能<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup><sup> • </sup><sup>[10](https://techtactician.com/comfyui-vs-automatic1111-vs-fooocus-comparison/)</sup>。Fooocus 以最大程度的简单为设计目标，安装和启动快速，无需手动调整设置，但自定义选项较少<sup>[10](https://techtactician.com/comfyui-vs-automatic1111-vs-fooocus-comparison/)</sup>。

**Forge** 是关系最近的亲属：Stable Diffusion WebUI Forge 是一个复刻，扩展了最初为 A1111 设计的概念，并提升了图像生成速度，尤其是在显存较低的系统上<sup>[10](https://techtactician.com/comfyui-vs-automatic1111-vs-fooocus-comparison/)</sup>。原 Forge 仓库自 2025-07-31 起未再推送，活跃的延续版本 Forge Neo 增加了 Flux.2、Wan 2.2 视频和 RTX 50 系列支持<sup>[9](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)</sup>。

## 数据一览

一项于 2026-04-30 在提交 82a973c0 上收集的代码库分析显示，该项目有 213 个 Python 文件，总计约 43,654 行；30 个 [JavaScript](https://www.edgepedia.org/zh/javascript) 文件约 5,068 行；一个 CSS 文件约 1,732 行；共有 7,689 次提交，来自 653 位唯一作者<sup>[12](https://factory.ai/open-source-wikis/stable-diffusion-webui?page=by-the-numbers.md)</sup>。提交集中度很高：AUTOMATIC1111 占 2,255 次提交，另有 1,331 次使用旧别名，其次是 w-e-w 的 314 次、DepFA 的 168 次和 Aarni Koskela 的 155 次<sup>[12](https://factory.ai/open-source-wikis/stable-diffusion-webui?page=by-the-numbers.md)</sup>。作为规模参照，OSSInsight 列出 stable-diffusion-webui 有 30,136 个复刻，而原始 CompVis/stable-diffusion 研究仓库为 10,084 个<sup>[11](https://ossinsight.io/compare/AUTOMATIC1111/stable-diffusion-webui/CompVis/stable-diffusion)</sup>。

## References

1. [AUTOMATIC1111/stable-diffusion-webui README, GitHub](https://github.com/automatic1111/stable-diffusion-webui/)
2. [Features, AUTOMATIC1111/stable-diffusion-webui Wiki](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/features)
3. [Rombach et al. (2022). High-Resolution Image Synthesis with Latent Diffusion Models, CVPR 2022](https://openaccess.thecvf.com/content/CVPR2022/papers/Rombach_High-Resolution_Image_Synthesis_With_Latent_Diffusion_Models_CVPR_2022_paper)
4. [State of the Art on Diffusion Models for Visual Computing, Computer Graphics Forum](https://onlinelibrary.wiley.com/doi/10.1111/cgf.15063)
5. [Pickle Scanning, Hugging Face Documentation](https://huggingface.co/docs/hub/security-pickle)
6. [CVE-2024-11045, NIST NVD](https://nvd.nist.gov/vuln/detail/cve-2024-11045)
7. [CVE-2024-12375, NIST NVD](https://nvd.nist.gov/vuln/detail/CVE-2024-12375)
8. [ComfyUI vs Automatic1111: Which Stable Diffusion UI to Use in 2026, Wireflow](https://www.wireflow.ai/blog/comfyui-vs-automatic1111)
9. [ComfyUI vs AUTOMATIC1111 vs Forge (2026), Offline Creator](https://offlinecreator.com/compare/comfyui-vs-automatic1111-vs-forge)
10. [ComfyUI vs. Automatic1111 vs. Fooocus, Tech Tactician](https://techtactician.com/comfyui-vs-automatic1111-vs-fooocus-comparison/)
11. [AUTOMATIC1111/stable-diffusion-webui vs CompVis/stable-diffusion, OSSInsight](https://ossinsight.io/compare/AUTOMATIC1111/stable-diffusion-webui/CompVis/stable-diffusion)
12. [Stable diffusion webui by the numbers, Factory](https://factory.ai/open-source-wikis/stable-diffusion-webui?page=by-the-numbers.md)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 11, 2026; Oct 15, 2026; Oct 21, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 现代人工智能：基础模型、生成式人工智能与人工智能产业 › AI companies, people, and products › AI products and assistants › Generative media creation apps

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/automatic1111

English original: https://www.edgepedia.org/automatic1111
