本地部署 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

完结!

相关推荐
二十一_17 小时前
🤖✨ ChatGPT API深度体验:让AI看懂图片、听懂语音、调用你的代码
前端·chatgpt·openai
福宝plus18 小时前
只需1美元薅ChatGPT Team手把手的教程,教你如何解决“你不符合参与此促销活动折扣资格”或“您的银行卡被拒绝了”附上ChatGPT Team怎么取消订阅
chatgpt·openai·claude
dafanpai2 天前
Claude vs ChatGPT vs Gemini:功能对比、使用体验、适合人群
人工智能·chatgpt
dafanpai2 天前
gemini和chatgpt数据对比:谁在卷性能、价格和场景?
人工智能·chatgpt
爱吃的小肥羊2 天前
ChatGPT又双叒叕升级了,AI编程能联网,记忆功能免费用!
chatgpt·openai
我教你啊3 天前
不连网也能跑大模型?
chatgpt
nvvas3 天前
AI互联网辅助工具
人工智能·chatgpt
多恩Stone3 天前
【Stable Diffusion 1.5 】在 Unet 中每个 Cross Attention 块中的张量变化过程
stable diffusion
今夕节度使3 天前
ARM架构推理Stable Diffusiond
stable diffusion
量子位3 天前
ChatGPT 普通会员能用编程神器 Codex 了!支持联网,奥特曼:更多更新在路上
chatgpt·ai编程