林嘉杰 发表于 2023-9-26 00:43

有人成功 Stable Diffusion 在Mac下intel+AMD加速出图么?

参考这个https://blog.csdn.net/heweiyabeijing/article/details/130843084卡在最后一步把程序加到sd里,不会操作呀!而且能不能用核显+独显联合跑图呢?

ljl137 发表于 2023-9-26 08:00

1. 运行终端,安装homebrew
终端中输入 /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
2. Python 安装
代码安装:brew install cmake protobuf rust python@3.10 git wget
3. 克隆 Web UI
代码克隆 git clone https://ghproxy.com/https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
4. 准备模型
下载好后,把下载好的ckpt文件放在“你的用户名”> Stable-diffusion-webui>Models>Stable-diffusion文件夹里。
Huggingface 官网下载模型
https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt
5. 运行 Webui
终端输入cd Desktop/stable-diffusion-webui/回车,然后./webui.sh运行网络用户界面。将自动下载并安装任何剩余的缺失依赖项。
6. 运行 Stable Diffusion
复制终端的地址 http://127.0.0.1:7860 浏览器运行

林嘉杰 发表于 2023-9-26 10:09

ljl137 发表于 2023-9-26 08:00 https://bbs.pcbeta.com/static/image/common/back.gif
1. 运行终端,安装homebrew
终端中输入 /bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-in ...

研究的是安装 OpenVINO™工具,Intel+amd加速出图的操作。你上面的是安装 Stable Diffusion步骤。

wwwsu 发表于 2023-9-26 10:28

mac下有成功的吗?

林嘉杰 发表于 2023-9-26 12:31

wwwsu 发表于 2023-9-26 10:28 https://bbs.pcbeta.com/static/image/common/back.gif
mac下有成功的吗?

我不是程序员和后端的我不会代码不知道呀。不过用Mac都是生产力人才大佬那么多。会有人懂的

zyangc 发表于 2023-9-26 12:55

wwwsu 发表于 2023-9-26 10:28 https://bbs.pcbeta.com/static/image/common/back.gif
mac下有成功的吗?

安装不成功

zyangc 发表于 2023-9-26 13:00

致命错误:有歧义的参数 'HEAD':未知的版本或路径不存在于工作区中。
使用 '--' 来分隔版本和路径,例如:
'git <命令> [<版本>...] -- [<文件>...]'
致命错误:没有发现名称,无法描述任何东西。
Python 3.10.13 (main, Aug 24 2023, 22:48:59)
Version: 1.6.0
Commit hash: <none>
Fetching updates for CodeFormer...
Checking out commit for CodeFormer with hash: c5b4593074ba6214284d6acd5f1719b6c5d739af...
致命错误:引用不是一个树:c5b4593074ba6214284d6acd5f1719b6c5d739af
Couldn't checkout commit c5b4593074ba6214284d6acd5f1719b6c5d739af for CodeFormer, attempting autofix...
Fetching all contents for CodeFormer
remote: 对象计数中: 206, 完成.
remote: 压缩对象中: 100% (185/185), 完成.
remote: Total 206 (delta 17), reused 206 (delta 17)
接收对象中: 100% (206/206), 16.35 MiB | 982.00 KiB/s, 完成.
处理 delta 中: 100% (17/17), 完成.
Pruning CodeFormer
枚举对象中: 206, 完成.
对象计数中: 100% (206/206), 完成.
使用 8 个线程进行压缩
压缩对象中: 100% (202/202), 完成.
写入对象中: 100% (206/206), 完成.
总共 206(差异 18),复用 188(差异 0),包复用 0
Checking out commit for CodeFormer with hash: c5b4593074ba6214284d6acd5f1719b6c5d739af...
致命错误:引用不是一个树:c5b4593074ba6214284d6acd5f1719b6c5d739af
Traceback (most recent call last):
File "/Users/panda/stable-diffusion-webui/launch.py", line 48, in <module>
    main()
File "/Users/panda/stable-diffusion-webui/launch.py", line 39, in main
    prepare_environment()
File "/Users/panda/stable-diffusion-webui/modules/launch_utils.py", line 383, in prepare_environment
    git_clone(codeformer_repo, repo_dir('CodeFormer'), "CodeFormer", codeformer_commit_hash)
File "/Users/panda/stable-diffusion-webui/modules/launch_utils.py", line 181, in git_clone
    run_git(dir, name, f'checkout {commithash}', f"Checking out commit for {name} with hash: {commithash}...", f"Couldn't checkout commit {commithash} for {name}", live=True)
File "/Users/panda/stable-diffusion-webui/modules/launch_utils.py", line 162, in run_git
    return run(f'"{git}" -C "{dir}" {command}', desc=desc, errdesc=errdesc, custom_env=custom_env, live=live)
File "/Users/panda/stable-diffusion-webui/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't checkout commit c5b4593074ba6214284d6acd5f1719b6c5d739af for CodeFormer.
Command: "git" -C "/Users/panda/stable-diffusion-webui/repositories/CodeFormer" checkout c5b4593074ba6214284d6acd5f1719b6c5d739af
Error code: 128
panda@Mac-Pro stable-diffusion-webui %

clarkonestar 发表于 2023-9-26 13:34

我安装了 !没加速 纯cpu算 风扇呼呼的,换到win11下 SD也没加速 最后结论,不是N卡8G显存的别想了,SD只支持CUDA加速

wwwsu 发表于 2023-9-26 13:45

看网上说用OpenVINO可以用amd加速

damnsoul 发表于 2023-9-26 18:25

要安装torch预览版才可用mps加速。
# MPS acceleration is available on MacOS 12.3+
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

魔域封印 发表于 2023-9-26 18:48

看我回帖,出差背的9代i9MBP
https://bbs.pcbeta.com/forum.php?mod=redirect&goto=findpost&ptid=1980978&pid=54404799

林嘉杰 发表于 2023-9-26 23:05

zyangc 发表于 2023-9-26 13:00 https://bbs.pcbeta.com/static/image/common/back.gif
致命错误:有歧义的参数 'HEAD':未知的版本或路径不存在于工作区中。
使用 '--' 来分隔版本和路径,例如: ...

好像是要在跑图之前先转换一下模型 在改一下sd里面的输入输出配置吧 我也不知道。

搬砖青年 发表于 2023-9-27 08:46

zyangc 发表于 2023-9-26 13:00 https://bbs.pcbeta.com/static/image/common/back.gif
致命错误:有歧义的参数 'HEAD':未知的版本或路径不存在于工作区中。
使用 '--' 来分隔版本和路径,例如: ...

我记得是缺少模型,手动安装一次这个模型就可以了,搜索:stable diffusion Error code: 128报错,很多教程

林嘉杰 发表于 2023-9-27 08:57

wwwsu 发表于 2023-9-26 13:45 https://bbs.pcbeta.com/static/image/common/back.gif
看网上说用OpenVINO可以用amd加速

是用了这个 可以intel+AMD融合加速。

林嘉杰 发表于 2023-9-27 17:28

搬砖青年 发表于 2023-9-27 08:46 https://bbs.pcbeta.com/static/image/common/back.gif
我记得是缺少模型,手动安装一次这个模型就可以了,搜索:stable diffusion Error code: 128报错,很多教 ...

就是要先把模型转化成VINO 专用格式包 在跑图。关键是他那个怎么安装进去sd加速的!

mitu2001mitu 发表于 2023-9-27 17:44

Mac下跑性能不如windows,我的手5800x+5700xt
页: [1]
查看完整版本: 有人成功 Stable Diffusion 在Mac下intel+AMD加速出图么?