stable-diffusion-webui README

The project's README from github.com/AUTOMATIC1111/stable-diffusion-webui. As one markdown file: README.md.

Stable Diffusion web UI

A web interface for Stable Diffusion, implemented using Gradio library.

Features

Detailed feature showcase with images:

Installation and Running

Make sure the required dependencies are met and follow the instructions available for:

Alternatively, use online services (like Google Colab):

Installation on Windows 10/11 with NVidia-GPUs using release package

  1. Download sd.webui.zip from v1.0.0-pre and extract its contents.
  2. Run update.bat.
  3. Run run.bat.

    For more details see Install-and-Run-on-NVidia-GPUs

Automatic Installation on Windows

  1. Install Python 3.10.6 (Newer version of Python does not support torch), checking "Add Python to PATH".
  2. Install git.
  3. Download the stable-diffusion-webui repository, for example by running git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git.
  4. Run webui-user.bat from Windows Explorer as normal, non-administrator, user.

Automatic Installation on Linux

  1. Install the dependencies:
# Debian-based:
sudo apt install wget git python3 python3-venv libgl1 libglib2.0-0
# Red Hat-based:
sudo dnf install wget git python3 gperftools-libs libglvnd-glx
# openSUSE-based:
sudo zypper install wget git python3 libtcmalloc4 libglvnd
# Arch-based:
sudo pacman -S wget git python3

If your system is very new, you need to install python3.11 or python3.10:

# Ubuntu 24.04
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.11

# Manjaro/Arch
sudo pacman -S yay
yay -S python311 # do not confuse with python3.11 package

# Only for 3.11
# Then set up env variable in launch script
export python_cmd="python3.11"
# or in webui-user.sh
python_cmd="python3.11"
  1. Navigate to the directory you would like the webui to be installed and execute the following command:
wget -q https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh

Or just clone the repo wherever you want:

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
  1. Run webui.sh.
  2. Check webui-user.sh for options.

Installation on Apple Silicon

Find the instructions here.

Contributing

Here's how to add code to this repo: Contributing

Documentation

The documentation was moved from this README over to the project's wiki.

For the purposes of getting Google and other search engines to crawl the wiki, here's a link to the (not for humans) crawlable wiki.

Credits

Licenses for borrowed code can be found in Settings -> Licenses screen, and also in html/licenses.html file.

stable-diffusion-webui (AUTOMATIC1111/stable-diffusion-webui)

Searching Database…

这是什么?一个基于 Gradio 库构建的 Stable Diffusion 浏览器界面,让你可以在自己的电脑上生成和编辑 AI 图片,包括文生图(txt2img)、图生图(img2img)、局部重绘(inpainting)、扩图(outpainting)等。
这是桌面应用,还是要在浏览器里打开的东西?它是一个本地网页服务:用脚本启动后,像访问网页一样在浏览器中使用,而不是传统的已安装桌面程序。
我该怎么把它运行起来?在 Windows 上,下载 sd.webui.zip 发布包并解压,然后依次运行 update.bat 和 run.bat;或者克隆仓库并运行 webui-user.bat 进行自动安装。在 Linux 上,先安装所列的依赖项,再运行 webui.sh。
我需要先装好 Python 和 git 吗?需要。自动安装程序专门要求使用 Python 3.10.6(更新的版本会导致 torch 出错),并且要启用 PATH,同时还需要 git;打包好的 Windows 版本运行脚本时也同样需要这两者。
显存较小或非 NVIDIA 显卡能用吗?支持显存低至 4GB 的显卡(有人反馈 2GB 也能运行),但推荐使用 NVIDIA;AMD、Intel 的 CPU/GPU 以及昇腾 NPU 各自需要单独的安装指南。
我必须用 NVIDIA 显卡吗,还是可以用 AMD 或 Intel?推荐 NVIDIA,但项目为 AMD 显卡、Intel 的 CPU/GPU(包括集成和独立显卡)、昇腾 NPU 以及苹果芯片 Mac 分别提供了单独的安装说明。
一键式 Windows 安装包和自动安装有什么区别?一键安装包(sd.webui.zip)几乎已打包好所需内容,只需依次运行 update.bat 和 run.bat;而自动安装需要你自己安装 Python 3.10.6 和 git,克隆仓库,然后运行 webui-user.bat。
这里的 LoRA 和 hypernetwork 能做什么?两者都能通过小型附加文件微调生成图片的风格;界面中有带预览的专用选择器,你可以直接把 LoRA、hypernetwork 或 textual inversion 嵌入模型加入提示词中混合使用。
我能用脚本而不是浏览器界面来操作吗?可以,它提供了 API,因此可以通过程序触发图片生成,而不仅限于 Gradio 界面。
Extras 标签页是做什么的?它集成了人脸修复和放大工具(GFPGAN、CodeFormer、RealESRGAN、ESRGAN、SwinIR、LDSR),可用于已有图片,以修复人脸或提高分辨率。
Size
35.7 MB
Stars
165.1K
Age
4y
Commits · 90 Days