前言 MacOS部署AI绘画模型
下载项目 1 2 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui cd stable-diffusion-webui
下载模型
将下载后的.safetensors
文件放到stable-diffusion-webui/models/Stable-diffusion
目录下
启动WebUI
踩坑
报错:ValueError: When localhost is not accessible, a shareable link must be created. Please set share=True or check your proxy settings to allow access to localhost.
原因
解决问题
修改stable-diffusion-webui/webui.py
的第80行代码,从share=cmd_opts.share,
改为share=True,
1 2 app, local_url, share_url = shared.demo.launch( share=True ,
踩坑
1 ImportError: Using SOCKS proxy, but the 'socksio' package is not installed. Make sure to install httpx using `pip install httpx[socks]`
原因
使用了SOCKS代理,但没有下载httpx[socks]
依赖
解决问题
踩坑
报错:RuntimeError: "upsample_nearest2d_channels_last" not implemented for 'Half'
原因
解决问题
1 export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --no-half"
生成AI绘画
最好是英文提示词,避免AI理解中文出错 多个关键词用,
分隔 包含多个单词的整句提示词,通过()
包起来
完成 参考文献 Bing的博客 知乎——AIGC LLM从业者