0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VM型GPUの高火力 VRT で Wan2.2を使って動画生成を行う

Last updated at Posted at 2025-08-20

高火力 VRT(バート)はVM型GPUクラウドサービスで、NVIDIA H100 を仮想サーバー上で利用できます。

image.png

今回はこの高火力 VRT を使って、Wan2.2を使った動画生成に挑戦してみました。

Wan2.2とは

Wan2.2は、動画生成に特化したAIモデルで、以下の3つの動画生成に対応しています。

  • T2V(Text to Video)
  • I2V(Image to Video)
  • TI2V(Text and Image to Video)

オープンなモデルとなっていて、GitHub上で公開されています。

Wan-Video/Wan2.2: Wan: Open and Advanced Large-Scale Video Generative Models

ComfyUIとの組み合わせ

今回は、ComfyUIと組み合わせて実行しています。ローカルにファイルを各種配置する関係上、高火力DOKよりもVRT向きだと思います。

FireShot Capture 1029 - _video_wan2_2_5B_ti2v - ComfyUI - 153.120.18.92.jpg

サーバーのセットアップ

VRTのプランは 高火力 VRT/24Core-240GB-H100x1 になります。また、OSはUbuntu 24.04.2を選択しています。ディスクは250GBあれば十分だと思います。

image.png

GPU周りのセットアップ

初期セットアップを行います。以下のコマンドはOSバージョンによって異なるので注意してください。

apt-get update
apt-get install gcc gnupg -y
apt-key del 7fa2af80
wget https://jp.download.nvidia.com/tesla/570.133.20/nvidia-driver-local-repo-ubuntu2404-570.133.20_1.0-1_amd64.deb
dpkg -i nvidia-driver-local-repo-ubuntu2404-570.133.20_1.0-1_amd64.deb
cp /var/nvidia-driver-local-repo-ubuntu2404-570.133.20/nvidia-driver-local-BB6607B3-keyring.gpg /usr/share/keyrings/
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
dpkg -i cuda-keyring_1.0-1_all.deb
apt-get update
apt-get install nvidia-driver-575 nvidia-container-toolkit -y

これでサーバーをリスタートすれば、GPUが認識されているかと思います。

$ nvidia-smi
Thu Aug 14 13:16:39 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.57.08              Driver Version: 575.57.08      CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| 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  NVIDIA H100 80GB HBM3          On  |   00000000:00:04.0 Off |                    0 |
| N/A   58C    P0            703W /  700W |   53343MiB /  81559MiB |    100%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A            9495      C   python                                53334MiB |
+-----------------------------------------------------------------------------------------+

ComfyUIの立ち上げ

まずPython周りをセットアップします。

sudo apt update
sudo apt install -y python3 python3-venv python3-pip git

そして、ComfyUIをクローンします。

git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI

Pythonは専用の環境を作成して実行します。

python3 -m venv venv
source venv/bin/activate
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu129
pip install -r requirements.txt

これで、ComfyUIの起動準備が整いました。

python main.py --listen 0.0.0.0 --port 8188

ブラウザから、 http://(VRTのIPアドレス):8188 にアクセスすると、ComfyUIのインターフェースが表示されます。

FireShot Capture 1029 - _video_wan2_2_5B_ti2v - ComfyUI - 153.120.18.92.jpg

素材

今回は自分が登壇しているときの写真を使ってみました(photograph by koyhoge)。なお、実際に生成されるのは動画ですが、Qiita掲載用として、アニメーションGIFに変換しています。

koyhoge-04378.jpg

モデルのダウンロード

Wan2.2用のモデルをダウンロードします。これはWan2.2 Video Generation ComfyUI Official Native Workflow Example - ComfyUIに書かれている通りです。

  • wan2.2_ti2v_5B_fp16.safetensors
  • wan2.2_vae.safetensors
  • umt5_xxl_fp8_e4m3fn_scaled.safetensors

をそれぞれ、 models/diffusion_models / models/text_encoders / models/vae に配置します。

cd models
cd diffusion_models
wget https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors
cd ../text_encoders
wget https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors
cd ../vae
wget https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors

そして、ワークフローファイルをダウンロードして、ブラウザでComfyUIのWorkflow > 開くからインポートします。

FireShot Capture 1029 - _video_wan2_2_5B_ti2v - ComfyUI - 153.120.18.92.jpg

これで Wan2.2 5B が試せます。こちらはデフォルトのT2V(Text to Video)で生成された動画です(実際には1280×704)。

ComfyUI_00001_.mp4.gif

自分の写真から生成した動画。人相が若干変わっていますが、全体としてはバランスが保たれています。

ComfyUI_00005_.mp4.gif

14Bを試す

さらに大きなモデル、14BもVRTで実行できます。

cd models
cd diffusion_models/
wget https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors
cd ../vae
wget https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors
cd ../loras/
wget https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/loras/wan2.2_i2v_lightx2v_4steps_lora_v1_high_noise.safetensors

14Bの場合は、こちらのワークフローファイルを利用して試せます。

動画の生成にはおおよそ5分程度かかるようです。今回は長めにしてみました。なぜかノイズが入ります。

ComfyUI_00007_.mp4.gif

注意点

高火力 VRT は時間単位の課金です。利用し終わったら終了しましょう。なお、ディスクだけの保存であれば250GBで月額9,625円(2025年8月現在)なので、必要なときだけサーバーを立ち上げるようにして、ディスクは残しておくとコストを抑えられます。

まとめ

今回は高火力 VRT を使って、Wan2.2を使った動画生成の方法を紹介しました。高火力 VRTはNVIDIA H100を利用できるため、大規模なAIモデルの実行に適しています。ComfyUIと組み合わせることで、直感的なインターフェースで動画生成が可能になります。

VRTなら、いつでも強力なGPU環境を利用できます。ぜひ試してみてください。

VM型GPUクラウドサービス 高火力 VRT(バート) | さくらインターネット

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?