写了一个脚本,帮助你在 Mac 上一键安装 Stable Diffusion,体验 AI 绘画

276 天前
 EatMi

之前帮公司设计装 SD ,后面想干脆写个脚本,一键安装。虽然咱们这里程序员居多,但还是和大家分享一下,欢迎讨论,共同进步。

使用方法

打开终端后执行以下命令即可自动安装

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/wy-luke/StableDiffusion-Installer-For-Mac/main/sd-installer.sh)"

当然,网络原因可以使用以下命令,但是后续安装可能也会由于网络原因失败,建议先保证网络通畅

/bin/bash -c "$(curl -fsSL https://raw.fastgit.org/wy-luke/StableDiffusion-Installer-For-Mac/main/sd-installer.sh)"

更详细的使用说明可以看这里

特性

  1. 使用 Homebrew 安装一些系统依赖

  2. 使用 Micromamba 作为 Python 包和环境管理工具。和 Conda 比起来,没有 Base 环境(为空),所以丝毫不会影响你的系统环境,而且更快。

  3. HomebrewMicromamba 均不会被添加到你的系统环境中,保证你的系统清爽如初。

  4. 项目开源,欢迎提出问题,讨论分享,欢迎 Star ⭐️ ~~~

3844 次点击
所在节点    分享创造
30 条回复
netty
276 天前
早前写过一篇 SD UI 介绍,可以参考一下

https://mp.weixin.qq.com/s/WHDu7zIvybcDLbJUysTz2g
Luzaiv7
275 天前
@EatMi ==>
Installing dependencies for protobuf: abseil
==> Installing protobuf dependency: abseil
Error: Failure while executing; `/usr/bin/env /opt/homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.24\ \(Macintosh\;\ arm64\ Mac\ OS\ X\ 13.0\)\ curl/7.84.0 --header Accept-Language:\ en --retry 3 --fail --location --silent --head --request GET https://mirrors.ustc.edu.cn/homebrew-bottles/abseil-20230125.3.arm64_ventura.bottle.1.tar.gz` exited with 22. Here's the output:
HTTP/2 404
server: openresty
date: Fri, 01 Sep 2023 02:22:01 GMT
content-type: text/html; charset=UTF-8
content-length: 150

curl: (22) The requested URL returned error: 404

安装失败,是否重试? [y/n]
Installation failed, do you want to retry? [y/n]
EatMi
275 天前
@Luzaiv7 #22 ops, 看起来像是网络问题
Luzaiv7
275 天前
@EatMi 没有啊,是 404 了
niji
275 天前
hugging face 解决
EatMi
275 天前
@niji #25 HF 确实很强,还有 Google Colab ,但是本地部署还是图个方便嘛
EatMi
275 天前
@Luzaiv7 #24 看样子是你改了 homebrew 的源,https://mirrors.ustc.edu.cn ,换个源试试吧
Luzaiv7
272 天前
@EatMi 的确好了,感谢
Luzaiv7
272 天前
@EatMi 装到一半提示 python 版本问题,还有找不到相应的库
stderr: ERROR: Ignored the following versions that require a different python version: 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10
ERROR: Could not find a version that satisfies the requirement tb-nightly (from versions: none)
ERROR: No matching distribution found for tb-nightly

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
EatMi
272 天前
@Luzaiv7 #29 你是换了清华源吗?应该是因为清华源里面没有 nigtly 的包

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/969686

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX