芯片:Apple M1 Pro
内存:16G
mac如何本地部署stable diffusion (支持更换模组,支持M1,M2)
https://brew.sh
建议修改brew源,否则下载比较慢,或者用梯子也行
然后安装必备组件:
brew install cmake protobuf rust [email protected] git wget
PS:我安装的python 3.10.9,支持M1芯片(我是用annconda安装的)
打开pytorch官网:https://pytorch.org/
在页面上选择安装的版本,如下,根据提示的安装命令执行即可:
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
此处需要用梯子,不然很慢,或者就下载不了。我是直接去github把源码下载下来了:https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd到stable-diffusion-webui目录,运行webui.sh
cd /Users/xxx/stable-diffusion-webui(这是我的目录)
./webui.sh
PS:运行前请先往下看
pip3 install gfpgan
安装clip比较特殊,直接pip3 install clip只能安装0.2.0版本,CLIP反推功能无法正常使用(但是系统可以正常运行起来),1.0版本clip安装方式如下(建议上梯子):
pip install ftfy regex tqdm
pip install git+https://github.com/openai/CLIP.git
给pip3设置清华源
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
扩展列表网址:
https://gitee.com/akegarasu/sd-webui-extensions/raw/master/index.md
第一步:Extensions–>install from URL,输入汉化插件地址,点击install
汉化插件:https://github.com/dtlnor/stable-diffusion-webui-localization-zh_CN
第二步:settings–>User interface,点刷新按钮,选择zh_CN语言包
第三步:先点击Apply settings提交设置,然后点击Reload UI重启界面即可。
直接上大神视频教程
【AI绘画】完美控制画面!告别抽卡时代 人物动作控制/景深/线稿上色 Controlnet安装使用教程
ControlNet 插件:https://jihulab.com/hunter0725/sd-webui-controlnet
在URL后添加:?__theme=dark
http://127.0.0.1:7860/?__theme=dark
下模型的C站:https://civitai.com/
下模型的huggingface:https://huggingface.co/
tag标签超市:https://tags.novelai.dev/
Stable Diffusion 法术解析:https://spell.novelai.dev/