项目地址:https://github.com/AuroBit/ComfyUI-OOTDiffusion
在 AWS 上购买 g4dn.xlarge ,带有一个 gpu nvidia 显卡
初始化机器,如果没有选带 nvidia 驱动的操作系统,需要自己安装 nvidia 的显卡
sudo apt-get update #更新软件列表
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make ubuntu-drivers
sudo vim /etc/modprobe.d/blacklist-nouveau.conf
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u #更新系统
sudo reboot # 重启
lsmod | grep nouveau
sudo apt-get remove –purge nvidia*
ubuntu-drivers devices
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-driver-535 #此处数字要对应上面查询到的版本号
sudo apt-get install mesa-common-dev
sudo reboot # 重启
nvidia-smi
Clone 项目并安装相关依赖:
conda create -n ootd python=3.10 conda activate ootd conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia # Install nvcc compiler for torch cpp extensions conda install cuda-nvcc -c nvidia # Clone ComfyUI git clone https://github.com/comfyanonymous/ComfyUI.git # Clone to custom_nodes git clone https://github.com/AuroBit/ComfyUI-OOTDiffusion.git custom_nodes/ComfyUI-OOTDiffusion # Install dependencies pip install -r custom_nodes/ComfyUI-OOTDiffusion/requirements.txt
如果想外网访问,在启动的时候带上 –listen,如: python main.py –listen 0.0.0.0