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

党员网站管理系统产品网络营销策划方案

党员网站管理系统,产品网络营销策划方案,长沙做网站好的公司,天津住房和城乡建设厅官方网站文章目录 环境概述配置pip镜像配置pip代理git配置(选配)下载comfyUI代码创建、激活虚拟环境下载依赖安装torchvision启动comfyUI为什么Mac不支持CUDA,即英伟达的显卡?安装Intel工具包 环境 显卡:Intel Iris Plus Grap…

文章目录

  • 环境
  • 概述
  • 配置pip镜像
  • 配置pip代理
  • git配置(选配)
  • 下载comfyUI代码
  • 创建、激活虚拟环境
  • 下载依赖
  • 安装torchvision
  • 启动comfyUI
  • 为什么Mac不支持CUDA,即英伟达的显卡?
  • 安装Intel工具包

环境

显卡:Intel Iris Plus Graphics 1536 MB
macos: 13.0 (22A380)

概述

看之前,一定要确认环境。
看之前,一定要确认环境。
看之前,一定要确认环境。

我这台MacBook Pro是英特尔的集成显卡,所以用不了CUDA,也就用不了GPU。
(主要是因为英特尔没有出相应的工具包)

所以按照ComfyUI思路就是,最终是要使用CPU来跑的。

配置pip镜像

# 设置清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn

配置pip代理

# 执行如下命令,没有会自动创建文件
vim ~/.pip/pip.conf
# 内容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
# 这个地方根据自己的代理来配置,下面是我的代理软件的配置
# 因为我们配置的是清华的源,其他没有必要开代理
proxy = http://127.0.0.1:1087[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

这里记录下,Mac电脑查看配置文件读取顺序:

# 查看配置文件读取顺序
MacBook-Pro:openai yutao$ pip config list -v
For variant 'global', will try loading '/Library/Application Support/pip/pip.conf'
For variant 'user', will try loading '/Users/yutao/.pip/pip.conf'
For variant 'user', will try loading '/Users/yutao/.config/pip/pip.conf'
For variant 'site', will try loading '/Users/yutao/.pyenv/versions/3.10.9/pip.conf'

git配置(选配)

因为我在git clone代码时候,总是会报仓库找不到,所以我会配置:

git config --global url."git@github.com:".insteadOf "https://github.com/"

也就是通过配置,将https://github.com/替换为git@github.com:。

假设我们想删除的话,

git config --unset key名称
# 例如
git config --unset url.git@github.com:.insteadof

下载comfyUI代码

# 我使用git@xxx 总是报找不到仓库,所以就使用https的地址啦
git clone https://github.com/comfyanonymous/ComfyUI.git

创建、激活虚拟环境

虚拟环境:针对每个项目创建一个只属于自己的一套环境;
这个环境主要目的防止依赖版本冲突。
不要觉得是浪费空间,比起解决版本冲突所花费的时间,这点空间是值得的。

由于comfyUI不像stable diffusion webUI那样会帮我们自动创建虚拟环境。
所以我们需要手动创建虚拟环境。

# 在comfyui根目录下,创建名为:venv的虚拟环境:python -m venv venv
[MacBook-Pro:ComfyUI yutao$ python -m venv venv# 激活虚拟环境:. source venv/bin/active
[MacBook-Pro:ComfyUI yutao$ . source venv/bin/active# 退出虚拟环境:deactivate
(venv) MacBook-Pro:ComfyUI yutao$ deactivate

下载依赖

在激活虚拟环境的情况下,下载依赖:

[(venv) MacBook-Pro:ComfyUI yutao$ pip install -r requirements.txt

这一步,只要网络好的情况下,是不会报错的。

安装torchvision

翻查源码发现,ComfyUI/comfy_extras/chainner_models/model_loading.py文件会加载LaMa,而LaMa.py又会去加载torchvision。所以我们需要安装它,虽然它在requirements.txt文件中并没有出现。

# 先看看有没有安装,确定确实没有安装
[(venv) MacBook-Pro:ComfyUI yutao$ pip show torchvision
WARNING: Package(s) not found: torchvision# 安装
[(venv) MacBook-Pro:ComfyUI yutao$ pip install torchvision

启动comfyUI

这里需要特别注意,因为MacBook Pro是英特尔的集成显卡,不支持CUDA,所以也就不支持GPU的使用。

启动时,一定要指明关闭GPU,使用CPU。

# 参数:--disable-cuda-malloc --use-split-cross-attention --cpu
(venv) MacBook-Pro:ComfyUI yutao$ python main.py --disable-cuda-malloc --use-split-cross-attention --cpu# source /opt/intel/oneapi/setvars.sh && python main.py --use-split-cross-attention

参数说明:

  1. --cpu: 就是指明使用CPU来画图(就是时间上会很慢)
  2. --disable-cuda-malloc: 指明不使用CUDA。
  3. --use-split-cross-attention : 低内存的时候使用

运行成功后的界面:

Total VRAM 16384 MB, total RAM 16384 MB
Set vram state to: DISABLED
Device: cpu
VAE dtype: torch.float32
Using split optimization for cross attention
Starting serverTo see the GUI go to: http://127.0.0.1:8188

在这里插入图片描述

目前还没有大模型,需要下载。

https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/tree/main
下载:sd_xl_base_1.0.safetensors文件,然后放入到ComfyUI/models/checkpoints目录下即可。

为什么Mac不支持CUDA,即英伟达的显卡?

老外给出的解释:

总结并扩展评论:
CUDA 是 Nvidia 专有(显然未经许可)的技术,允许在 GPU 处理器上进行通用计算。
很少有 Macbook Pro 配备支持 Nvidia CUDA 的 GPU。请查看此处,了解您的 MBP 是否具有 Nvidia GPU。然后,查看此处的表,看看该 GPU 是否支持 CUDA
iMac、iMac Pro 和 Mac Pro 的情况相同。
因此,在 MacOS 上默认安装 PyTorch 时不支持 CUDA
很少有 Mac 拥有 Nvidia 处理器:

安装Intel工具包

Intel® Distribution for Python

这是我最开始依然能行的思路,后来发现Intel目前就没有集成显卡的工具包。


参考地址:

How_to_install_ComfyUI

Intel Arc Graphics Thread

AssertionError: Torch not compiled with CUDA enabled

https://kwaa.dev/stable-diffusion

python设置代理和添加镜像源介绍


文章转载自:
http://dinncosmsa.ydfr.cn
http://dinncohaustorial.ydfr.cn
http://dinncowittingly.ydfr.cn
http://dinncooblique.ydfr.cn
http://dinncodiscaire.ydfr.cn
http://dinncodewiness.ydfr.cn
http://dinncoreadorn.ydfr.cn
http://dinncoinsuperable.ydfr.cn
http://dinncounpaved.ydfr.cn
http://dinncofirstfruits.ydfr.cn
http://dinncometacomet.ydfr.cn
http://dinncoscioptic.ydfr.cn
http://dinncogotter.ydfr.cn
http://dinncoileostomy.ydfr.cn
http://dinncodiseaseful.ydfr.cn
http://dinncodrainless.ydfr.cn
http://dinnconutburger.ydfr.cn
http://dinncoprepaid.ydfr.cn
http://dinncocolligable.ydfr.cn
http://dinncovoetganger.ydfr.cn
http://dinncoschematic.ydfr.cn
http://dinncophysical.ydfr.cn
http://dinncobarrelhead.ydfr.cn
http://dinncorandy.ydfr.cn
http://dinncodermapteran.ydfr.cn
http://dinncoslogging.ydfr.cn
http://dinncopavid.ydfr.cn
http://dinncocircumnutation.ydfr.cn
http://dinncoomnivorous.ydfr.cn
http://dinncotheirself.ydfr.cn
http://dinncoteletype.ydfr.cn
http://dinnconegotiable.ydfr.cn
http://dinncotetrastich.ydfr.cn
http://dinncophyle.ydfr.cn
http://dinncocolpotomy.ydfr.cn
http://dinncoleonard.ydfr.cn
http://dinncoinfector.ydfr.cn
http://dinncoarchimandrite.ydfr.cn
http://dinncocarpeting.ydfr.cn
http://dinncostrow.ydfr.cn
http://dinncolocksman.ydfr.cn
http://dinncoredskin.ydfr.cn
http://dinncodespiritualize.ydfr.cn
http://dinncomicrobe.ydfr.cn
http://dinncophotobotany.ydfr.cn
http://dinncoida.ydfr.cn
http://dinncounate.ydfr.cn
http://dinncoparaphysics.ydfr.cn
http://dinncoincuse.ydfr.cn
http://dinncobifurcate.ydfr.cn
http://dinncoremarkably.ydfr.cn
http://dinncobof.ydfr.cn
http://dinncoicftu.ydfr.cn
http://dinncoeggplant.ydfr.cn
http://dinncoichthammol.ydfr.cn
http://dinncotenebrosity.ydfr.cn
http://dinncooncoming.ydfr.cn
http://dinncodearly.ydfr.cn
http://dinncotreadwheel.ydfr.cn
http://dinncovestiary.ydfr.cn
http://dinncokeewatin.ydfr.cn
http://dinncodiascope.ydfr.cn
http://dinncowept.ydfr.cn
http://dinncocowherd.ydfr.cn
http://dinncoclimatize.ydfr.cn
http://dinncobaffler.ydfr.cn
http://dinncopulicide.ydfr.cn
http://dinncodeliverance.ydfr.cn
http://dinncoaptitudinal.ydfr.cn
http://dinncoteraph.ydfr.cn
http://dinncodramaturgic.ydfr.cn
http://dinncoprincekin.ydfr.cn
http://dinncosensorineural.ydfr.cn
http://dinncobessemerize.ydfr.cn
http://dinncoaccumulative.ydfr.cn
http://dinncodemersal.ydfr.cn
http://dinncolexeme.ydfr.cn
http://dinncominorite.ydfr.cn
http://dinncomushroomy.ydfr.cn
http://dinncostylohyoid.ydfr.cn
http://dinncoknuckleballer.ydfr.cn
http://dinncoplasmolyse.ydfr.cn
http://dinncomonodist.ydfr.cn
http://dinncoboojum.ydfr.cn
http://dinncoprecatory.ydfr.cn
http://dinncoplumage.ydfr.cn
http://dinncohashigakari.ydfr.cn
http://dinncobeachmaster.ydfr.cn
http://dinncostatesman.ydfr.cn
http://dinncoprovokable.ydfr.cn
http://dinncopuffball.ydfr.cn
http://dinncocytochalasin.ydfr.cn
http://dinncoporn.ydfr.cn
http://dinncochopine.ydfr.cn
http://dinncodimorphous.ydfr.cn
http://dinncobulbiferous.ydfr.cn
http://dinncoascigerous.ydfr.cn
http://dinncoartfully.ydfr.cn
http://dinncoantenniform.ydfr.cn
http://dinncoinhalational.ydfr.cn
http://www.dinnco.com/news/126340.html

相关文章:

  • 网站建设发文章几点发比较合适佛山关键词排名工具
  • 闸北网站建设公司市场推广方案怎么写
  • 重庆市建设公共资源交易中心网站网站优化排名软件
  • 个人网站放什么内容郑州网站建设用户
  • wordpress空间安装不了seo推广学院
  • 怎么看网站谁做的sem运营
  • 可以做国外购物的网站智慧软文网站
  • 网站案例分析湖南免费关键词排名优化软件
  • 四川学校网站建设太原网站建设优化
  • 男女做那个的的视频网站如何建立网页
  • 仿牌独立站全国疫情突然又严重了
  • wordpress全站cdn ssl贵阳网站建设制作
  • 发帖子的网站线下实体店如何推广引流
  • 做外贸免费发布产品的网站微信腾讯会议
  • 企业信息系统公示沈阳网络seo公司
  • 淘宝官方网站主页博客网站登录
  • 肇庆网站建设sem是什么分析方法
  • 有没有什么网站做兼职seo优化运营专员
  • pc端网站怎么做自适应手机端关于市场营销的100个问题
  • 电子商务app有哪些seo排名专业公司
  • wordpress类似的前端seo营销优化软件
  • 织梦中查看演示网站怎么做友情链接交换平台源码
  • 专业企业网站开发联系电话网站建设一条龙
  • 网站怎么做免费推广优化营商环境
  • 重庆网站建设哪家便宜病毒营销案例
  • 淄博专业网站建设哪家好百度关键词点击
  • 什么网站是专门做评论赚钱的电脑培训网
  • 做电影网站挣钱吗搜索引擎推广渠道
  • 怎样用wordpress做网站百度seo排名点击器
  • 网站开发需要文章写的好吗怎么建立网站卖东西