部署comfyUI 跑 Z_images_turbo 图生图
典型ComfyUI 安装流程
# 1. 创建Conda环境(生成在 /root/miniconda3/envs/comfyui)
conda create -n comfyui python=3.10
conda activate comfyui
#查询对应目录是否有足够空间(大于需要100G的空间)
df -Th | grep -Ev '/run/containerd|/var/lib'
# 2. 克隆项目代码(生成在 /root/comfyui)
yum install git
git clone https://github.com/comfyanonymous/ComfyUI /data/comfyui
cd /data/comfyui
# 3. 在项目目录中安装依赖
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple创建一个start_comfyui.sh脚本后台启动服务
vim start_comfyui.sh
#下面是脚本内容(内容只有一行)
nohup python main.py --listen 0.0.0.0 --port 8200 > comfyui.log 2>&1 &
chmod +x start_comfyui.sh
bash start_comfyui.sh执行下载模型放到指定目录下
pip install -U modelscope -i https://pypi.tuna.tsinghua.edu.cn/simple
modelscope download --model Comfy-Org/z_image_turbo --local_dir /data/z_image_turbo停止服务
#查询对于的PID(当中3077425这个就是PID)
ps -ef | grep "main.py --listen 0.0.0.0 --port 8200" | grep -v grep
root 3077425 1 0 10:50 pts/1 00:00:20 python main.py --listen 0.0.0.0 --port 8200
#停服务
kill -9 3077425