【linux部署Stable Diffusion报错】

报错信息如下

lautodl上运行Stable Diffusion报错root@autodl-container-71b64aa67f-6ac7b6c8:~/autodl-tmp# ./run.sh
bash: ./run.sh: No such file or directory
root@autodl-container-71b64aa67f-6ac7b6c8:~/autodl-tmp# cd Stable-Diffusion-WebUI
root@autodl-container-71b64aa67f-6ac7b6c8:~/autodl-tmp/Stable-Diffusion-WebUI# ./run.sh
环境变量已配置完毕
=============================================================================================
INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.12.3.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/



Use --skip-python-version-check to suppress this warning.
=============================================================================================
Python 3.12.3 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:46:43) [GCC 11.2.0]
Version: v1.8.0
Commit hash: bef51aed032c0aaa5cfd80445bc4cf0d85b408b5
Installing clip
Installing open_clip
Traceback (most recent call last):
  File "/root/autodl-tmp/Stable-Diffusion-WebUI/webui/launch.py", line 48, in <module>
    main(
### 部署 Stable Diffusion 模型于 Linux 系统 #### 准备工作环境 为了在Linux环境下顺利部署Stable Diffusion模型,需先克隆项目仓库并设置好所需的工作目录结构。通过命令`git clone https://kgithub.com/AUTOMATIC1111/stable-diffusion-webui`可以获取到所需的WebUI版本[^3]。 #### 下载预训练模型文件 对于特定版本如Stable Diffusion 3.5,在完成上述准备工作之后,则应按照官方指导下载对应的VAE权重文件(例如vae_diffusion_pytorch_model.safetensors),并将此文件放置至指定路径下,比如`cd ComfyUI/models/vae/`以便后续调用[^2]。 #### 安装依赖项 进入已克隆下来的稳定扩散Web界面项目的根目录执行如下指令来安装运行所必需的各种Python包:`pip install -r requirements_versions.txt`以及`pip install -r requirements.txt`确保所有必要的库都被正确加载到了当前虚拟环境中。 #### 解决潜在的安全警告或错误提示 当遇到安全扩展访问权限的问题时,可以通过添加参数`--enable-insecure-extension-access`给启动脚本来绕过这一限制;另外如果是在尝试启用Xformers优化选项时报错的话,可能需要参照具体报错信息调整相应的配置或是更新驱动程序等措施以解决问题[^1][^4]。 #### 启动服务端应用 最后一步就是利用提供的shell脚本轻松地开启应用程序了。只需简单输入./webui.sh加上想要使用的额外参数即可开始体验图像生成功能,这里给出的例子包含了性能加速特性(--xformers)。 ```bash ./webui.sh --xformers --enable-insecure-extension-access ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

岁月玲珑

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值