本地部署 Stable Diffusion XL Gradio Demo WebUI

StableDiffusion XL Gradio Demo WebUI

  • [0. 先展示几张 StableDiffusion XL 生成的图片](#0. 先展示几张 StableDiffusion XL 生成的图片)
  • [1. 什么是 Stable Diffusion XL Gradio Demo WebUI](#1. 什么是 Stable Diffusion XL Gradio Demo WebUI)
  • [2. Github 地址](#2. Github 地址)
  • [3. 安装 Miniconda3](#3. 安装 Miniconda3)
  • [4. 创建虚拟环境](#4. 创建虚拟环境)
  • [5. 安装 Stable Diffusion XL Gradio Demo WebUI](#5. 安装 Stable Diffusion XL Gradio Demo WebUI)
  • [6. 启动 Stable Diffusion XL Gradio Demo WebUI](#6. 启动 Stable Diffusion XL Gradio Demo WebUI)
  • [7. 访问 Stable Diffusion XL Gradio Demo WebUI](#7. 访问 Stable Diffusion XL Gradio Demo WebUI)

0. 先展示几张 StableDiffusion XL 生成的图片




1. 什么是 Stable Diffusion XL Gradio Demo WebUI

一个基于Gradio库的 Stable Diffusion 的 Web UI 界面。

2. Github 地址

https://github.com/TonyLianLong/stable-diffusion-xl-demo

3. 安装 Miniconda3

下载 Conda 安装脚本,

复制代码
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

运行安装脚本,

复制代码
bash Miniconda3-latest-Linux-x86_64.sh

按提示操作。当提示是否初始化 Conda 时,输入 "yes",

安装完成后,关闭当前终端并打开新终端,这将激活 Conda,

复制代码
sudo su - root

更新 Conda 至最新版本,

复制代码
conda update conda


4. 创建虚拟环境

复制代码
conda create -n sdxldemo python==3.10.6 -y
conda activate sdxldemo 

5. 安装 Stable Diffusion XL Gradio Demo WebUI

克隆代码和安装依赖库,

复制代码
git clone https://github.com/FurkanGozukara/stable-diffusion-xl-demo; cd stable-diffusion-xl-demo
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip install xformers==0.0.21.dev564
pip install -r requirements2.txt

设置 huggingface access_token,

复制代码
vi app2.py

---
access_token = "hf_ovfazhEBOXmTpUsfdfdshfdydZIfMNJVKrcZ"
---

6. 启动 Stable Diffusion XL Gradio Demo WebUI

启动,

复制代码
export ENABLE_REFINER=true
python app2.py

7. 访问 Stable Diffusion XL Gradio Demo WebUI

使用浏览器打开 http://localhost:7860/,并生成一张图片试试,你感觉怎么样?


refer: https://github.com/FurkanGozukara/Stable-Diffusion/blob/main/Tutorials/How-To-Use-Stable-Diffusion-SDXL-Locally-And-Also-In-Google-Colab.md

完结!

相关推荐
菜鸟~noob23342 分钟前
【AI】生成式大模型方法对比——ChatGPT、DeepSeek 与 Claude 的架构、对齐与效率路线**
人工智能·chatgpt·架构
云卷云舒___________7 小时前
OpenAI在ChatGPT上线Dots:主动型助手全球开放
ai·chatgpt·openai·智能体·ai助手·dots·ai日报
赛博三把手9 小时前
GPT-6.2 Sol 与 Astra 深度解析:Codex / ChatGPT 桌面端接入 api.new.bi 实战指南
网络·人工智能·gpt·chatgpt
Soujer1 天前
AUTOMATIC1111 stable-diffusion-webui:165k Star 的 AI 绘图 Web 界面,到底
stable diffusion·ai绘画·gradio·webui·a1111
钱栈up1 天前
OpenAI 给 ChatGPT 装了个钱包:智能体替你下单,交易入口又变了一次
chatgpt·openai·agent
ZhengEnCi3 天前
韩国高考 AI 作弊:防作弊为什么总比作弊慢一步
人工智能·chatgpt
syso_稻草人4 天前
qwen-image-2.1 文生图:动物七段结构提示词生成10张萌宠写真(含完整提示词与参数)
人工智能·stable diffusion·comfyui·qwen-image2.1
枫叶丹45 天前
AI文本水印:生成机制、统计检测与误报
人工智能·机器学习·chatgpt·agent·codex
2601_967979128 天前
OpenAI创始成员发布开源项目nanochat,仅需100美元就能实现类ChatGPT
chatgpt·openai·llm训练·nanochat·安德烈·卡帕西
ndz9 天前
一把 Key 接多家模型,再查 AI 会不会推荐你的品牌
chatgpt