您的位置:首页 > 汽车 > 时评 > 义乌微硕网络科技有限公司_建站论坛系统_站长工具域名查询ip_手机优化大师官方版

义乌微硕网络科技有限公司_建站论坛系统_站长工具域名查询ip_手机优化大师官方版

2024/10/22 23:02:21 来源:https://blog.csdn.net/EI__Nino/article/details/142854031  浏览:    关键词:义乌微硕网络科技有限公司_建站论坛系统_站长工具域名查询ip_手机优化大师官方版
义乌微硕网络科技有限公司_建站论坛系统_站长工具域名查询ip_手机优化大师官方版

MacOS

MPS support

pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu

如果出现
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')

错误,则证明安装的 torch 版本不是 arm ,需要将 torch torchvision torchaudio 删除重装。

不需要增加 --no-binary=:all: --compile --no-cache-dir --force-reinstall 这些类似的参数

pip uninstall torch torchvision torchaudio

以此类推,如果出现其他 mach-o file 的错误,也是将其卸载重装。因为 M系列芯片和 Intel 系列芯片有过渡期,可能会出现 M系列芯片的电脑上有 X86 的 packages。

比如可能会出现 numpy、PIL(其实是 Pillow)同样因为版本问题导致一样的报错。

如果是 PIL 出现问题,则需要重装 Pillow pip uninstall Pillow -> pip install Pillow

测试安装是否成功代码

import torch
if torch.backends.mps.is_available():mps_device = torch.device("mps")x = torch.ones(1, device=mps_device)print (x)
else:print ("MPS device not found.")

执行之后输出 tensor([1.], device='mps:0') 为成功

(资料来源 https://developer.apple.com/metal/pytorch/)

安装 ComfyUI

原项目太大了,如果不是为了维护项目,可以直接只下载最新代码

git  clone --depth 1  git@github.com:comfyanonymous/ComfyUI.git

使用 --depth 1 会使下载 14433 个文件变成只下载 408 个文件。

创建虚拟环境

因为 python 的包管理问题,如果不希望 comfyui 影响系统的 package ,可以只在当前 python 虚拟环境下运行

cd ComfyUI
python -m venv

安装 Python 依赖

pip install -r requirements.txt

运行 ComfyUI

python main.py

安装插件

  • 插件安装管理器:https://github.com/ltdrdata/ComfyUI-Manager
  • SDXL风格样式:https://github.com/twri/sdxl_prompt_styler
  • ComfyUI界面汉化:https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION
  • 中文提示词输入:https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet
  • 蟒蛇八卦工具箱:https://github.com/pythongosssss/ComfyUI-Custom-Scripts

ref waytoai

工具箱

cd ComfyUI/custom_nodes
git clone --depth=1 https://github.com/ltdrdata/ComfyUI-Manager.git

简体中文

cd ComfyUI/custom_nodes
git clone --depth=1 https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION.git

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com