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\

相关推荐
放飞自我的Coder12 分钟前
【win11 安装WSL2 详解一遍过!!】
linux·ubuntu
蜕变的土豆16 分钟前
Ubuntu下软件运行常见异常退出问题汇总分析
linux·ubuntu
数巨小码人1 小时前
Linux常用指令
linux·运维·服务器
●^●1 小时前
Linux 命令行与 vi/vim 编辑器完全指南
linux·编辑器·vim
哈哈幸运1 小时前
Linux Awk 深度解析:10个生产级自动化与云原生场景
linux·云原生·自动化·awk·三剑客
Linux运维老纪1 小时前
Linux之七大难命令(The Seven Difficult Commands of Linux)
linux·运维·服务器·云计算·运维开发
漫谈网络2 小时前
Ollama工具调用(Tool Calls)业务应用案例
linux·ai·aigc·工具调用·ollama·tool calls
unique_落尘2 小时前
java操作打印机直接打印及详细linux部署(只适用于机器和打印机处于同一个网段中)
java·linux·打印机
lswzw2 小时前
Ubuntu K8s集群安全加固方案
安全·ubuntu·kubernetes
前进的程序员3 小时前
在Linux驱动开发中使用DeepSeek的方法
linux·运维·服务器·人工智能