原文链接:https://itq5.com/posts/comfyui_wan
就在2月25日,阿里开源了Wan2.1模型的模型文件和代码以及权重。今天咋们就使用CloudStudio是一个免费提供10000分钟的开箱及用的一个AI应用平台,可免费运行T4显卡,滴滴滴,快上车。
Pytorch2.0.0
后点击“新建”。nvidia-smi
检查显卡型号、CUDA版本等信息。(base) root@VM-0-224-ubuntu:/workspace# nvidia-smi
Sun Mar 2 15:09:23 2025
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.105.17 Driver Version: 525.105.17 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla T4 On | 00000000:00:09.0 Off | Off |
| N/A 45C P0 26W / 70W | 12987MiB / 16384MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
+-----------------------------------------------------------------------------+
3 部署ComfyUI项目
本案例依赖Python3.11.11及以上环境,因此我们首先创建虚拟环境:
conda clean -i
conda create -n python-3.11.11 python=3.11.11 -y --override-channels --channel https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
3.2 安装基础依赖库
/root/miniforge3/envs/python-3.11.11/bin/pip install --upgrade pip
/root/miniforge3/envs/python-3.11.11/bin/pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
/root/miniforge3/envs/python-3.11.11/bin/pip install diffusers==0.30.0 transformers==4.44.0 accelerate==0.33.0 peft==0.12.0 gradio==3.41.2 safetensors==0.4.2 controlnet-aux==0.0.9 mediapipe==0.10.14 xformers==0.0.21 sentencepiece==0.2.0
/root/miniforge3/envs/python-3.11.11/bin/pip install python-multipart==0.0.13 ipywidgets==7.7.1
git config --global http.proxy http://proxy.cloudstudio.work:8081
git config --global https.proxy http://proxy.cloudstudio.work:8081
export http_proxy=http://proxy.cloudstudio.work:8081
export HTTP_PROXY=http://proxy.cloudstudio.work:8081
export https_proxy=http://proxy.cloudstudio.work:8081
export HTTPS_PROXY=http://proxy.cloudstudio.work:8081
cd /workspace/ && git clone https://github.com/comfyanonymous/ComfyUI.git
3.5 安装ComfyUI依赖库
cd /workspace/ComfyUI
/root/miniforge3/envs/python-3.11.11/bin/pip install -r requirements.txt
/root/miniforge3/envs/python-3.11.11/bin/pip install sentencepiece
3.6 拉取工作流模板
mkdir -p /workspace/ComfyUI/user/default/workflows
cd /workspace/ComfyUI/user/default/workflows
git clone https://github.com/yolain/ComfyUI-Yolain-Workflows.git
git clone https://github.com/ZHO-ZHO-ZHO/ComfyUI-Workflows-ZHO.git
3.7 安装插件
cd /workspace/ComfyUI/custom_nodes
git clone https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION.git
git clone https://github.com/talesofai/comfyui-browser.git
git clone https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet.git
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
git clone https://github.com/11cafe/comfyui-workspace-manager.git
git clone https://github.com/siliconflow/BizyAir.git
git clone https://github.com/crystian/ComfyUI-Crystools.git
git clone https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git
git clone https://github.com/city96/ComfyUI-GGUF.git
git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper.git
cd /workspace/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts/user && wget https://raw.githubusercontent.com/byzod/a1111-sd-webui-tagcomplete-CN/main/tags/Tags-zh-full-pack.csv && mv Tags-zh-full-pack.csv autocomplete.txt && wget https://gist.githubusercontent.com/pythongosssss/1d3efa6050356a08cea975183088159a/raw/a18fb2f94f9156cf4476b0c24a09544d6c0baec6/danbooru-tags.txt && cat danbooru-tags.txt >> autocomplete.txt && rm -rf danbooru-tags.txt
cd /workspace/ComfyUI/custom_nodes/comfyui-workspace-manager/ && find . -type f -exec sed -i 's|https://civitai.com/api|https://civitai.work/api|g' {} +
cd /workspace/ComfyUI/custom_nodes/ComfyUI-GGUF && /root/miniforge3/envs/python-3.11.11/bin/pip install -r requirements.txt
cd /workspace/ComfyUI/custom_nodes/ComfyUI-Crystools && /root/miniforge3/envs/python-3.11.11/bin/pip install -r requirements.txt
cd /workspace/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite && /root/miniforge3/envs/python-3.11.11/bin/pip install -r requirements.txt
cd /workspace/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper && /root/miniforge3/envs/python-3.11.11/bin/pip install -r requirements.txt
3.8 启动服务
/root/miniforge3/envs/python-3.11.11/bin/python3 /workspace/ComfyUI/main.py
4 打开ComfyUI面板
启动后默认监听8188端口,直接在空间地址例如https://xxx.ap-singapore.cloudstudio.work/
修改成https://xxx--8188.ap-singapore.cloudstudio.work/
即可打开项目网站。
wanvideo_480p_I2V_example_01.json
图片到视频 wanvideo_T2V_example_01.json
文字到视频 wanvideo_long_T2V_example_01.json
长文字到视频 wanvideo_vid2vid_example_01.json
视频到视频wanvideo_T2V_example_01.json
文字到视频,先下载这个工作流到本地。aria2c -x 16 -s 16 "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/umt5-xxl-enc-fp8_e4m3fn.safetensors" -o umt5-xxl-enc-fp8_e4m3fn.safetensors -d /workspace/ComfyUI/models/clip/
aria2c -x 16 -s 16 "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1-T2V-14B_fp8_e4m3fn.safetensors" -o Wan2_1-T2V-14B_fp8_e4m3fn.safetensors -d /workspace/ComfyUI/models/diffusion_models
aria2c -x 16 -s 16 "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/Wan2_1_VAE_bf16.safetensors" -o Wan2_1_VAE_bf16.safetensors -d /workspace/ComfyUI/models/vae
aria2c -x 16 -s 16 "https://huggingface.co/Kijai/WanVideo_comfy/resolve/main/open-clip-xlm-roberta-large-vit-huge-14_visual_fp16.safetensors" -o open-clip-xlm-roberta-large-vit-huge-14_visual_fp16.safetensors -d /workspace/ComfyUI/models/clip_vision
当模型都下载完成后,切换到工作流界面,将模型文件进行一一选择。
免责声明:
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。