当前位置:   article > 正文

【WSL2笔记9】Ubuntu 环境ComfyUI 安装使用笔记_ubuntu安装comfyui

ubuntu安装comfyui

1 安装

1.1 Git仓下载ComfyUI

git clone https://github.com/comfyanonymous/ComfyUI.git

$ cd ~
$ git clone https://github.com/comfyanonymous/ComfyUI
Cloning into 'ComfyUI'...
remote: Enumerating objects: 10278, done.
remote: Counting objects: 100% (5100/5100), done.
remote: Compressing objects: 100% (1951/1951), done.
remote: Total 10278 (delta 3268), reused 3160 (delta 3148), pack-reused 5178
Receiving objects: 100% (10278/10278), 4.04 MiB | 97.00 KiB/s, done.
Resolving deltas: 100% (6965/6965), done.
Updating files: 100% (279/279), done.
$ cd ComfyUI
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

1.2 安装环境

1.2.1 Python 版本

ComfyUI在Ubuntu环境下,python 3.8、 3.9、 3.10 实测都能通过
使用3.9是为了后续兼容其他第三方插件,有些插件在3.10下依赖版本冲突
conda create -n comfyui python==3.9
conda activate comfyui

1.2.2 Torch 版本

Conda 安装
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
Pip 安装
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121

二选一即可

$ conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
nvidia
Channels:
 - pytorch
 - nvidia
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/gpu/anaconda3/envs/comfyui

  added / updated specs:
    - pytorch
    - pytorch-cuda=12.1
    - torchaudio
    - torchvision


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pytorch-2.2.1              |py3.9_cuda12.1_cudnn8.9.2_0        1.34 GB  pytorch
    torchaudio-2.2.1           |       py39_cu121         6.2 MB  pytorch
    torchtriton-2.2.0          |             py39       177.1 MB  pytorch
    torchvision-0.17.1         |       py39_cu121         7.9 MB  pytorch
    ------------------------------------------------------------
                                           Total:        1.53 GB

The following NEW packages will be INSTALLED:

  blas               anaconda/pkgs/main/linux-64::blas-1.0-mkl
  brotli-python      anaconda/pkgs/main/linux-64::brotli-python-1.0.9-py39h6a678d5_7
  bzip2              anaconda/pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_5
  certifi            anaconda/pkgs/main/linux-64::certifi-2024.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/956287
推荐阅读
相关标签
  

闽ICP备14008679号