M1 Mac上部署Stable Diffusion

date
May 27, 2023
slug
SD-on-mac-M1
status
Published
tags
AIGC
summary
在M1芯片的Mac上搭建stable-diffusion-webui 的过程总结
type
Post

采用WebUI

部署过程:
  1. If Homebrew is not installed, follow the instructions at https://brew.sh to install it. Keep the terminal window open and follow the instructions under "Next steps" to add Homebrew to your PATH.
  1. Open a new terminal window and run brew install cmake protobuf rust python@3.10 git wget (可以考虑用境内源安装)
  1. Clone the web UI repository by running git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
  1. Place Stable Diffusion models/checkpoints you want to use into stable-diffusion-webui/models/Stable-diffusion. If you don't have any, see Downloading Stable Diffusion Models below.
  1. cd stable-diffusion-webui and then ./webui.sh to run the web UI. A Python virtual environment will be created and activated using venv and any remaining missing dependencies will be automatically downloaded and installed.
  1. To relaunch the web UI process later, run ./webui.sh again. Note that it doesn't auto update the web UI; to update, run git pull before running ./webui.sh
 
在5步启动webui时,安装gfpgan时出现超时报错。经过查询时因为git地址被阻止访问。
Installing gfpgan ^CTraceback (most recent call last): ...
 
处理方法:如下图示在几个 https://github.com 的链接前添加:https://ghproxy.com/
添加后的结果类似这样:https://ghproxy.com/https://github.com/....
保存后继续执行 ./webui.sh 就可以
notion image
 
 

所用模型 - MeinaUnreal

但发现即便时同样的设置,发现生成的图片总是没有作者提供的demo好看,原因不太清楚
作者demo图
作者demo图
 
自己用模型生成图
自己用模型生成图
 

© Simon 2021 - 2025