The boxing cats footage in The Seven-Cent Shot comes from a published Wan 2.2 5B Q4 sample. This guide uses the official Python pipeline. The seven-cent figure is an estimate from Wan’s published benchmark and a Vast price snapshot.
1. Set up your local terminal
Ready to try the shot yourself? Create a Vast.ai account with my referral link. If you buy credits, I may earn a referral reward. That helps cover GPU time for the next SuccessGraph® tutorial. Thanks for supporting the channel. — Avi
Use Bash on Linux, macOS, or Windows via WSL, with Python 3.10 or newer and OpenSSH installed. Create a funded Vast account and generate an API key. Paste the key at the hidden prompt to keep it out of your shell history. Keep this terminal open for the rest of the walkthrough.
python3 -m venv ~/.venvs/vast-video
source ~/.venvs/vast-video/bin/activate
python -m pip install 'vastai==1.11.2'
read -rsp 'Vast API key: ' VAST_API_KEY
printf '\n'
export VAST_API_KEY
mkdir -p ~/.ssh
ssh-keygen -t ed25519 -f ~/.ssh/vast-video
vastai create ssh-key "$(cat ~/.ssh/vast-video.pub)"
If you already have a registered SSH key, skip key generation and registration and use the matching private key for ssh and scp. Vast CLI quickstart · Vast REST API
2. Choose and rent an RTX 4090
Search for an on-demand single RTX 4090 with direct SSH support. The 64 GB system RAM filter is a practical buffer for CPU offloading. The checkpoint repository alone is about 34 GB, so this walkthrough budgets 80 GB of container disk. Compare the current hourly price and bandwidth fees before choosing.
vastai search offers 'num_gpus=1 gpu_name=RTX_4090 cpu_arch=amd64 cpu_ram>=64 cuda_vers>=12.6 disk_space>=80 direct_port_count>=1 reliability>0.98 verified=true rented=false' --type on-demand --storage 80 -o dph_total --limit 10
The next command starts a paid rental. Enter an offer ID from the search. If the offer has disappeared, search again and review the replacement price. Save the instance ID returned by the create command for all subsequent commands.
read -rp 'Offer ID: ' OFFER_ID
vastai create instance "$OFFER_ID" --image pytorch/pytorch:2.7.1-cuda12.6-cudnn9-devel --disk 80 --ssh --direct --cancel-unavail
read -rp 'Instance ID: ' INSTANCE_ID
vastai show instance "$INSTANCE_ID"
The instance can take time to pull the image and start SSH. Check its status again until it is running. Search options · Create instance · PyTorch image tag
3. Connect and install Wan
In the local terminal, get the SSH URI and connect. The example uses the private key created in step 1.
SSH_URI=$(vastai ssh-url "$INSTANCE_ID")
printf '%s\n' "$SSH_URI"
ssh -i ~/.ssh/vast-video "$SSH_URI"
Run the following in the remote shell. The FlashAttention wheel is selected by the container’s Python version and PyTorch C++ ABI. Installing the matching wheel avoids a source build.
nvidia-smi
apt-get update
apt-get install -y --no-install-recommends git libgl1 libglib2.0-0
cd /root
git clone https://github.com/Wan-Video/Wan2.2.git
cd Wan2.2
git checkout 1ea34ff48f87168174e12956e200b1d908b1c5ff
PY_ABI=$(python -c 'import sys; print(f"cp{sys.version_info.major}{sys.version_info.minor}")')
TORCH_ABI=$(python -c 'import torch; print(str(torch.compiled_with_cxx11_abi()).upper())')
FLASH_WHEEL="flash_attn-2.8.3+cu12torch2.7cxx11abi${TORCH_ABI}-${PY_ABI}-${PY_ABI}-linux_x86_64.whl"
python -m pip install "https://github.com/Dao-AILab/flash-attention/releases/download/v2.8.3/${FLASH_WHEEL}"
python -m pip install -r requirements.txt 'huggingface_hub>=0.34,<1'
python -c 'import flash_attn, torch; assert torch.cuda.is_available(); print(torch.cuda.get_device_name(0))'
hf download Wan-AI/Wan2.2-TI2V-5B \
--revision 921dbaf3f1674a56f47e83fb80a34bac8a8f203e \
--local-dir ./Wan2.2-TI2V-5B
Vast SSH URI command · Wan setup · FlashAttention release wheels · Hugging Face CLI download
4. Generate a clip
In the remote shell, generate about five seconds at 24 fps. Wan calls 1280*704 its 720p landscape size for this model. Keep the size in quotes so Bash passes the literal asterisk.
python generate.py \
--task ti2v-5B --size '1280*704' --ckpt_dir ./Wan2.2-TI2V-5B \
--frame_num 121 \
--offload_model True --convert_model_dtype --t5_cpu \
--save_file /root/Wan2.2/wan-output.mp4 \
--prompt 'Two cats in boxing gloves spar under a spotlight. The camera tracks around the ring.'
ls -lh /root/Wan2.2/wan-output.mp4
exit
For image-to-video, add --image examples/i2v_input.JPG or a path to your uploaded reference image. Describe what should move in the prompt. The reference image sets the output aspect ratio. Wan generation instructions · Model card and author benchmark
5. Copy the MP4 and release the rental
Back in the local shell, reuse the URI returned by Vast. The two slashes before root preserve the absolute remote path in the scp:// URI.
scp -i ~/.ssh/vast-video "scp://${SSH_URI#ssh://}//root/Wan2.2/wan-output.mp4" ./wan-output.mp4
ls -lh ./wan-output.mp4
Open the local MP4 to confirm it plays. Then destroy the instance to release it and delete its remote container files. Type y at the confirmation prompt. If you abandon the demo after renting, you can use the same destroy command to release the instance.
vastai destroy instance "$INSTANCE_ID"
vastai show instances
Stopping an instance can leave storage charges running. Check the Vast dashboard for your total bill, then divide it by how many clips you kept to get your cost per usable clip. Destroy instance · Vast live pricing guide
Call the Vast API directly
Run this authenticated offer search from the same Bash terminal to see the JSON Vast returns. The request searches the marketplace and incurs no GPU rental.
curl --fail-with-body --silent --show-error \
'https://console.vast.ai/api/v0/bundles' \
-H "Authorization: Bearer $VAST_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"limit": 10,
"type": "ondemand",
"gpu_name": {"eq": "RTX_4090"},
"num_gpus": {"eq": 1},
"verified": {"eq": true},
"rentable": {"eq": true},
"rented": {"eq": false}
}'
The API also exposes instance creation, status, and deletion. Inference runs inside the rented container using Wan’s Python program. Search offers endpoint
How the budget choice was made
Wan’s technical benchmark measured 534.7 seconds and 22.9 GB of peak VRAM for 720p text-to-video on one RTX 4090 after warm-up. Vast’s marketplace guide showed $0.20, $0.47 and $0.66 per hour as the RTX 3090, 4090 and 5090 medians in an evening snapshot on November 20, 2026 IST. At the median 4090 rate, 534.7 seconds comes to about $0.07 in rental time. The first clip can cost more because of image startup, the roughly 34 GB model download, storage, and transfer. An account’s initial funding requirement is separate from a single clip’s cost. Wan benchmark table · Vast marketplace snapshot source
At these median rates, a 3090 beats the benchmark-based 4090 compute cost if it finishes the same job in under 21.0 minutes. A 5090 beats it in under 6.35 minutes. Substitute the actual offers you see and time the same workload on each. An independent cloud benchmark reported substantially longer 4090 times with a different setup, which makes a short warm-up and a timed repeat important for budgeting. SaladCloud benchmark
The model files stay on the rented disk between runs. Starting a fresh python generate.py process still loads those files into memory, so time the full command when calculating your actual cost.
The container above targets the RTX 4090. For an RTX 5090, use a Blackwell-compatible stack such as PyTorch 2.7 built with CUDA 12.8 and a compatible attention implementation. PyTorch 2.7 release
The smaller LTX-Video 2B 0.9.8 distilled checkpoint is a candidate for fast drafts where its output meets your quality bar. The larger Wan A14B models are candidates when shot fidelity justifies more memory or a quantized workflow. Wan TI2V-5B is the starting point here because the authors published a 720p result on a single 24 GB consumer GPU and the same checkpoint supports both text-to-video and image-to-video. Compare motion, subject consistency, and prompt adherence on your own shots. LTX-Video model matrix · Wan model documentation
For a documented example specifically from TI2V-5B, off-grid-ai shares a boxing cats clip, its prompt and its settings. It used the Q4 GGUF version and an 8 fps review export, so use it to inspect the shot and use the published 4090 benchmark above for the official Python setup’s cost estimate. Sample and settings