Files
log/my-blog/content/posts/2025-09-10-comfyui.md
2025-09-10 20:34:10 +09:00

4.0 KiB
Raw Permalink Blame History

title, slug, date, tags, draft
title slug date tags draft
comfyuiでwan2.2を試す comfyui 2025-09-10
comfyui
false

comfyuiにwan2.2が来ていたので試してみました。wanがcomfyuiの公式に採用されているので、導入が簡単になっています。

今回は爆速になったLoRA採用でいきます。なお、無効化ードを外すとクオリティ重視の設定になります。

関係ありませんが、comfyui公式ページのコメントシステムはgiscus/giscusを使用しているようですね。

comfyui

$ git clone https://github.com/comfyanonymous/ComfyUI
$ cd ComfyUI
$ winget install python.python.3.13
$ pip uninstall torch torchaudio
$ pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129
$ pip install -r requirements.txt
$ python main.py

もしvenvを使用する場合

$ python -m venv venv
$ pip install -r requirements.txt
$ python main.py

wan2.2

基本的にpromptから生成し、bypassを切ると画像を参照できます。

workflowをdownloadしてcomfyuiで開きます。

# ComfyUI/user/default/workflows/
$ curl -sLO https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/video_wan2_2_5B_ti2v.json

必要なものは公式ページにリンクがあります。

https://docs.comfy.org/tutorials/video/wan/wan2_2

ComfyUI/
├───📂 models/
│   ├───📂 diffusion_models/
│   │   └───wan2.2_ti2v_5B_fp16.safetensors
│   ├───📂 text_encoders/
│   │   └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors 
│   └───📂 vae/
│       └── wan2.2_vae.safetensors

wan2-2-fun-control

これはポーズを動画から作成して動画を作ります。

$ curl -sLO https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/video_wan2_2_14B_fun_control.json

https://docs.comfy.org/tutorials/video/wan/wan2-2-fun-control

ComfyUI/
├───📂 models/
│   ├───📂 diffusion_models/
│   │   ├─── wan2.2_fun_control_low_noise_14B_fp8_scaled.safetensors
│   │   └─── wan2.2_fun_control_high_noise_14B_fp8_scaled.safetensors
│   ├───📂 loras/
│   │   ├─── wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors
│   │   └─── wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors
│   ├───📂 text_encoders/
│   │   └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors 
│   └───📂 vae/
│       └── wan_2.1_vae.safetensors

wan2-2-fun-inp

これは画像から画像を参考にして動画を生成します。

https://docs.comfy.org/tutorials/video/wan/wan2-2-fun-inp

$ curl -sLO https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/video_wan2_2_14B_fun_inpaint.json
ComfyUI/
├───📂 models/
│   ├───📂 diffusion_models/
│   │   ├─── wan2.2_fun_inpaint_high_noise_14B_fp8_scaled.safetensors
│   │   └─── wan2.2_fun_inpaint_low_noise_14B_fp8_scaled.safetensors
│   ├───📂 loras/
│   │   ├─── wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors
│   │   └─── wan2.2_i2v_lightx2v_4steps_lora_v1_low_noise.safetensors
│   ├───📂 text_encoders/
│   │   └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors 
│   └───📂 vae/
│       └── wan_2.1_vae.safetensors

ゲームで動かしたほうがいい

今回、ゲームのスクショを使って動画を生成してみました。

しかし、ゲームで動かしたほうがよほど早く確実です。