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\

相关推荐
qq_427506083 分钟前
linux使用docker安装运行kibana报错“Kibana server is not ready yet“的解决办法
linux·运维·elk
乱蜂朝王15 分钟前
ubuntu如何进行切换内核版本全教程
linux·运维·ubuntu
打鱼又晒网16 分钟前
linux信号| 学习信号三步走 | 学习信号需要打通哪些知识脉络?
linux·服务器·后端·操作系统
程序加冰2 小时前
ARM GNU工具链
linux·arm开发·gnu
jjb_2362 小时前
LinuxC高级作业4
linux·bash
qq_339191142 小时前
-bash: apt-get: command not found -bash: yum: command not found
linux·centos·bash
小 y 同 学3 小时前
Ubuntu22.04安装GNSS数据处理软件GAMIT/GLOBK
linux·gnss·测绘·gamit
欢'3 小时前
网络编程练习:UDP聊天室
linux·网络·网络协议·udp
穷人小水滴3 小时前
修复 blender 中文输入 BUG (linux/wayland/GNOME/ibus)
linux·c++·开源·bug·blender·wayland·ibus