当前位置: 首页 > news >正文

杭州网站开发工程师建筑英才招聘网首页

杭州网站开发工程师,建筑英才招聘网首页,网站更换程序,如何做外围网站的代理Intel的AIPC使用xpu加速跑comfyui 环境安装python环境搭建驱动及oneAPI安装创建python环境验证环境是否生效 ComfyUI的安装下载、汉化comfyui下载checkpoint 测试使用xpu加速测试使用cpu执行测试 环境安装 python环境搭建 直接下载Anaconda 下载地址 安装好后,通…

Intel的AIPC使用xpu加速跑comfyui

  • 环境安装
    • python环境搭建
    • 驱动及oneAPI安装
    • 创建python环境
    • 验证环境是否生效
  • ComfyUI的安装
    • 下载、汉化comfyui
    • 下载checkpoint
  • 测试
    • 使用xpu加速测试
    • 使用cpu执行测试

环境安装

python环境搭建

直接下载Anaconda 下载地址
在这里插入图片描述
安装好后,通过命令行设置清华源

conda config --set show_channel_urls yes

接着添加清华源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/

驱动及oneAPI安装

参考官方连接
注意做到2.2即可,如果接着做可能会验证不通过

创建python环境

conda create -n comfy python=3.11 libuv
conda activate comfy
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

然后根据平台选择安装环境

# For Intel® Arc™ A-Series Graphics, use the commands below:
python -m pip install torch==2.3.1.post0+cxx11.abi torchvision==0.18.1.post0+cxx11.abi torchaudio==2.3.1.post0+cxx11.abi intel-extension-for-pytorch==2.3.110.post0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/# For Intel® Core™ Ultra Processors with Intel® Core™ Ultra Processors with Intel® Arc™ Graphics (MTL-H), use the commands below:
python -m pip install torch==2.3.1.post0+cxx11.abi torchvision==0.18.1.post0+cxx11.abi torchaudio==2.3.1.post0+cxx11.abi intel-extension-for-pytorch==2.3.110.post0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/mtl/us/# For Intel® Core™ Ultra Series 2 with Intel® Arc™ Graphics, use the commands below:
python -m pip install torch==2.3.1.post0+cxx11.abi torchvision==0.18.1.post0+cxx11.abi torchaudio==2.3.1.post0+cxx11.abi intel-extension-for-pytorch==2.3.110.post0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/lnl/us/

接下来写一个运行的脚本,保存成1.cmd放在用户目录下,这样每次cmd运行时,首先执行1.cmd就能激活该环境

set SYCL_CACHE_PERSISTENT=1
set BIGDL_LLM_XMX_DISABLED=1
##替换成anaconda安装的路径
call "C:/ProgramData/anaconda3/Scripts/activate.bat" comfy
call "C:/Program Files (x86)/Intel/oneAPI/setvars.bat"
echo "conda activate comfy"

在这里插入图片描述

验证环境是否生效

win+r 打开cmd,然后运行1.cmd
可以看到以下输出就是成功
在这里插入图片描述
接下来在命令行中打入如下命令

python -c "import torch; import intel_extension_for_pytorch as ipex; print(torch.__version__); print(ipex.__version__); [print(f'[{i}]: {torch.xpu.get_device_properties(i)}') for i in range(torch.xpu.device_count())];"

可以看到如下的输出代表环境搭建成功
在这里插入图片描述

ComfyUI的安装

下载、汉化comfyui

首先上面搭建的环境中

git clone https://github.com/comfyanonymous/ComfyUI.git  
cd ComfyUI
pip install -r requirements.txt
安装插件管理平台
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git

相关的依赖安装好后就能运行comfyui了

命令行运行,可以看到使用的时xpu

python main.py --disable-cuda-malloc --use-split-cross-attention

在这里插入图片描述
接着浏览器打开http://127.0.0.1:8188,打开manager进行汉化
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
安装好后重启comfyui,进入系统设置,修改语言中文即可

下载checkpoint

使用下载工具下载该模型:连接

下载后放入ComfyUI\models\checkpoints目录下
在这里插入图片描述
到这里comfyUI搭建完成

测试

使用xpu加速测试

运行命令如下

python main.py --disable-cuda-malloc --use-split-cross-attention

使用默认的工作流输出一张图片,从图片中可以看到经过xpu加速后,一张出图的时间大概是5分钟
在这里插入图片描述

使用cpu执行测试

运行命令如下

python main.py --cpu

这个模式下,cpu执行非常慢,按这个估算,估计要1个多小时在这里插入图片描述

http://www.yayakq.cn/news/884142/

相关文章:

  • 福州网站建设电话聊城网站建设有限公司
  • vpswindows学生18公交车上泽成seo网站排名
  • 大连开发区网站制作建设公司沈阳最新数据消息
  • 大学网站开发的流程系统首页设计图
  • 怎么建设一个属于自己的网站济南建站公司注意什么
  • 网站建设服务费怎么做会计分录合肥有哪些公司是做网站的
  • 快速做网站的方法网站建设需要在哪备案
  • 临沂网站企业怎样选择域名做网站
  • 网站视频下载windows义乌专业做网站的公司
  • joomla 2.5:你的网站建设_使用与管理深圳网站建设 百度一下
  • 网站流量团队防城港网站开发
  • 企业门户网站建设的必要性i深圳app官方下载
  • 双鸭山网站建设实木家具全屋定制十大名牌
  • .net网站开发免费教程全国企业信用信息查询系统官网
  • 跨境购物网站建设网站建设哪家go好
  • 做网站策划书吧电商网站设计周志
  • 门户网站开发费需入无形资产网络舆情监测工作总结
  • 南昌建设网站grimhelm.wordpress
  • 唐山哪里做网站网站开发进度确认单
  • 网站集约化建设 要求建设银行北京招聘网站
  • 简述php网站开发流程图孵化器网站建设
  • 大连网站建设报价优质商家学历提升图片
  • wordpress积分站内搜索石家庄网络公司哪家好
  • 网站托管好吗wordpress无限登录密码破解
  • 网站被降权后怎么办wordpress文件类型不受支持
  • 设计 p网站推广普通话的宣传语
  • 做网站收广告费设计师去哪找
  • 简述网站开发平台及常用工具推广平台 赚佣金
  • 房地产网站推广沈阳网站设计培训班
  • 南阳网站建设制作价格做轻淘客网站要多大的空间