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\

相关推荐
likfishdn20 分钟前
Linux的文件与目录管理
linux·运维·服务器
chian-ocean40 分钟前
Linux 文件缓冲区:高效数据访问的幕后推手
linux·运维·服务器
加油=^_^=42 分钟前
【Linux】进程优先级 | 进程调度(三)
linux·运维·服务器
若云止水1 小时前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_init_cycle 函数 - 详解(4)
数据库·nginx·ubuntu
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
追寻光1 小时前
Cannot find a valid baseurl for repo: base/7/x86_64
linux
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
陆沙2 小时前
deepseek-r1-centos-本地服务器配置方法
linux·服务器·centos
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
sz66cm2 小时前
Linux基础 -- ARM 32 位架构动态注入代码技术文档
linux·arm开发·架构