ubuntu 系统下,安装stable diffusion解决下载速度慢的问题

在Ubuntu系统下,安装过程中需要下载大量的文件,如果直接从GitHub下载,可能会因为网络问题导致失败。中国大陆地区可以使用清华大学提供的镜像源来加速下载。

首先,你需要确保已经安装了git和curl。如果没有安装,可以使用以下命令安装:

sudo apt update

sudo apt install git curl

然后,你可以使用以下命令来下载并安装Stable Diffusion的Web UI:

cd ~

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git

cd stable-diffusion-webui

git checkout webui-v4.9.1 # 切换到稳定的版本

修改install.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' install.sh

修改webui.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' webui.sh

修改download_dependencies.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_dependencies.sh

修改download_model.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/huggingface.co\//\/\/huggingface.bj.bcebos.com\/'\

'/stable-diffusion-webui\//g' download_model.sh

修改prereqs.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' prereqs.sh

修改download_models.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_models.sh

修改download_prompts.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_prompts.sh

修改download_ui.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_ui.sh

修改download_repositories.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_repositories.sh

修改download_repositories_and_models.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\//g' download_repositories_and_models.sh

修改download_repositories_and_models_v2.sh文件,使用清华大学的镜像源

sed -i 's/https:\/\/github.com\//\/\/git.code.tencent.com\/'\

'/stable-diffusion-webui\

相关推荐
不知几秋4 小时前
数字取证-内存取证(volatility)
java·linux·前端
欧先生^_^7 小时前
Linux内核可配置的参数
linux·服务器·数据库
海尔辛7 小时前
学习黑客5 分钟读懂Linux Permissions 101
linux·学习·安全
王RuaRua8 小时前
[数据结构]5. 栈-Stack
linux·数据结构·数据库·链表
曼岛_8 小时前
[架构之美]linux常见故障问题解决方案(十九)
linux·运维·架构
tan180°8 小时前
Linux进程信号处理(26)
linux·c++·vscode·后端·信号处理
大神的风范8 小时前
从0开始学linux韦东山教程第三章问题小结(4)
linux·服务器
sz66cm9 小时前
Linux基础 -- SSH 流式烧录与压缩传输笔记
linux·笔记·ssh
YOYO--小天9 小时前
RS485和RS232 通信配置
linux·嵌入式硬件
Lw老王要学习10 小时前
Linux数据库篇、第一章_02_MySQL的使用增删改查
linux·运维·数据库·mysql·云计算·it