QQ扫一扫联系
进入JupyterLab
创建文件 install-comfyui-venv-linux.sh ,复制粘贴下面的代码,保存。
git clone https://github.com/comfyanonymous/ComfyUI cd ComfyUI/custom_nodes git clone https://github.com/ltdrdata/ComfyUI-Manager cd .. python -m venv venv source venv/bin/activate python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121 python -m pip install -r requirements.txt python -m pip install -r custom_nodes/ComfyUI-Manager/requirements.txt cd .. echo "#!/bin/bash" > run_gpu.sh echo "cd ComfyUI" >> run_gpu.sh echo "source venv/bin/activate" >> run_gpu.sh echo "python main.py --preview-method auto" >> run_gpu.sh chmod +x run_gpu.sh echo "#!/bin/bash" > run_cpu.sh echo "cd ComfyUI" >> run_cpu.sh echo "source venv/bin/activate" >> run_cpu.sh echo "python main.py --preview-method auto --cpu" >> run_cpu.sh chmod +x run_cpu.sh
直接下载这个写好的脚本,上传到JupyterLab
脚本文件创建或者上传完毕后,用命令行直接运行安装即可。