美文网首页
Mac Intel安装stable Diffusion记录

Mac Intel安装stable Diffusion记录

作者: ShiPF | 来源:发表于2023-08-06 11:44 被阅读0次

    安装Home Brew

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
    1. 打开一个新的终端窗口并运行
    brew install cmake protobuf rust python@3.10 git wget
    
    
    1. 通过运行克隆 Web UI 存储库
    git clone <https://github.com/AUTOMATIC1111/stable-diffusion-webui>
    
    
    1. 下载Stable Diffusion模型

    https://huggingface.co/CompVis/stable-diffusion-v-1-4-original

    把下载好的文件CKPT文件放入文件夹:stable-diffusion-webui/models/Stable-diffusion

    1. 终端继续执行:
    cd stable-diffusion-webui
    

    重新启动

    ./webui.sh
    

    需要注意的问题,修改“webui-user.sh”文件,以下参数一项一项修改,没有错误提示,不要改:

    # 第13行
    export COMMANDLINE_ARGS="--medvram --opt-split-attention --skip-torch-cuda-test --no-half --use-cpu all”
    
    

    安装参考

    https://updayday.notion.site/MacOS-Stable-Diffusion-WebUI-M1-M2-Intel-61a0fd82ea0e451d9ead16beafc3a28b
    https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
    参考视频
    https://www.youtube.com/watch?v=4vtLrafPd5c&t=4s

    问题记录

    1. 执行./webui.sh 后,python下载依赖异常

      Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b1/64/67efd36ed232b9b107ad8435d0f0ebec28e5e6f782ededbd1ab4a37a0100/scipy-1.11.1-cp310-cp310-macosx_10_9_x86_64.whl (37.2 MB)
    INFO: pip is looking at multiple versions of gfpgan to determine which version is compatible with other requirements. This could take a while.
    
    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 gfpgan) (from versions: none)
    ERROR: No matching distribution found for tb-nightly
    

    原因说明:
    镜像源冲突,修改为官方镜像源后,不报错了。但是安装卡主了,继续参考https://blog.csdn.net/weixin_40735291/article/details/129153398手动安装改模块

    解决方案:
    找到代码lanuch.py,引用了如下stable-diffusion-webui/modules/launch_utils.py 修改代码,在git前面添加k

    gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "https:/kgithub.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip")
        #gfpgan_package = os.environ.get('GFPGAN_PACKAGE', "https:/github.com/TencentARC/GFPGAN/archive/8d2447a2d918f8eba5a4a01463fd48e45126a379.zip")
    

    相关文章

      网友评论

          本文标题:Mac Intel安装stable Diffusion记录

          本文链接:https://www.haomeiwen.com/subject/nveipdtx.html