Mac安装Stable Diffusion

Mac安装Stable Diffusion

    正在检查是否收录...

第一步:安装anaconda

https://www.anaconda.com/download

第二步:下载代码

# 创建虚拟环境sdtest1 conda create -n sdtest1 python=3.10 # 激活虚拟环境sdtest1 conda activate sdtest1 # 下载代码 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git # 也可以使用代理下载 git clone https://ghproxy.com/https://github.com/AUTOMATIC1111/stable-diffusion-webui.git 

第三步:pip设置镜像源

国内常用的镜像源如下所示

清华: https://pypi.tuna.tsinghua.edu.cn/simple
阿里云: http://mirrors.aliyun.com/pypi/simple/
中国科技大学: https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣: http://pypi.douban.com/simple/

# pip设置阿里源 pip config set global.index-url https://mirrors.aliyun.com/pypi/simple 

第四步:安装依赖

# 进入 stable-diffusion-webui 目录 pip install -r requirements_versions.txt pip install -r requirements.txt 

我在安装依赖时一直卡在下面地方很久都不动

Preparing metadata (setup.py) ... - 

通过使用--verbose来显示安装过程中出现的错误信息

pip install -r requirements_versions.txt --verbose pip install -r requirements.txt --verbose 

然后看到如下错误

Collecting basicsr==1.4.2 (from -r requirements_versions.txt (line 4)) Using cached https://mirrors.aliyun.com/pypi/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz (172 kB) Running command python setup.py egg_info /Users/lizhencheng/lzc/app/anaconda/anaconda3/envs/test/lib/python3.10/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. ******************************************************************************** !! dist.fetch_build_eggs(dist.setup_requires) 

根据错误提示,重新安装即可

第五步:启动准备

启动时会去GitHub下载东西,可以设置下代理。

stable-diffusion-webui/modules/launch_utils.py中的https://github.com替换成https://ghproxy.com/https://github.com

手动下载模型v1-5-pruned-emaonly.safetensors,大概有4G左右,下载地址如下:
https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors

将下载好的模型放到目录:stable-diffusion-webui/models/Stable-diffusion

第六步:启动项目

# 可以通过--port指定端口 python launch.py --skip-torch-cuda-test --precision full --no-half --api 

相关教程

Stable Diffusion2.1+WebUI的安装与使用

Mac环境 Stable Diffusion Web Ui 安装教程

AI图片生成Stable Diffusion环境搭建与运行

调用Stable Diffusion API 接口

GitHub Proxy

开源的建筑模型

codediffusiongitwebgithubwebuistable diffusionpythonproxyurlclone虚拟环境apicreateivaai图片huggingfaceappai图片生成mac图片生成sat
  • 本文作者:李琛
  • 本文链接: https://wapzz.net/post-6789.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.3W+
5
0
1
WAP站长官方

利用 “diart“ 和 OpenAI 的 Whisper 简化实时转录

上一篇

有哪些AI写作软件?安利这7款,轻松拿捏写作王

下一篇
  • 复制图片
按住ctrl可打开默认菜单