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. 創(chuàng)建虛擬環(huán)境
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文章來源:http://www.zghlxwxcb.cn/news/detail-564275.html
完結!文章來源地址http://www.zghlxwxcb.cn/news/detail-564275.html
到了這里,關于本地部署 Stable Diffusion XL Gradio Demo WebUI的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!