SSD Nodes Learn 8GB RAM — $66/yr
Guides Matt ConnorBy Matt Connor

Self-hosted AI video generator: the reality

What open video models really produce in July 2026, the VRAM class each one needs, what a five second clip costs on a rented GPU, and when to use an API.

What a self-hosted AI video generator can actually do

A self-hosted AI video generator works today, and it is slower and smaller than the demo reels suggest. As of July 2026 the open models worth running are Wan 2.2 from Alibaba and HunyuanVideo from Tencent, plus LTX-Video from Lightricks when speed matters more than realism. All of them run under ComfyUI on a Linux machine with an NVIDIA GPU. What you get out is a clip of roughly five seconds at 720p. Not a scene. Not a minute of finished footage.

Here is the short answer before the detail. A 24 GB card renders a five second 720p clip in single-digit minutes. A 12 GB card does the same job in twenty minutes or more, because the weights do not fit in video memory and the software keeps moving layers back and forth to system RAM. A server with no GPU cannot do this in any useful sense. The arithmetic that made CPU image generation slow makes CPU video generation pointless.

If you have already read the hardware ladder for a self-hosted image generator, video is that same argument with every number moved one class up. VRAM (video memory, the RAM soldered next to the graphics chip) is still the only spec that decides whether this is fun or painful.

Why one video costs so much more than one image

A diffusion model generates an image by denoising it in steps, and each step reads every weight in the model. A video model does the same thing to a whole block of frames at once, and it adds attention across time so that frame 80 knows what frame 12 looked like. Five seconds at 24 frames per second is 120 frames in one batch.

That temporal attention is why cost does not scale politely with clip length. Doubling the frame count more than doubles the memory the sampler needs, so the failure mode is not slower rendering. It is the render dying.

There is a second memory spike people do not expect. After the sampler finishes, the VAE (variational autoencoder, the part that turns the compressed latent into real pixels) decodes the whole latent video at once. That decode can need more memory than the sampling did. The symptom is a job that shows a completed progress bar and then prints this:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 9.31 GiB

The fix is tiled decoding or a shorter clip. Knowing which stage ran out of memory saves you from tuning the wrong thing for an hour.

How much VRAM do you need for AI video generation

Two published figures frame the whole decision, and they look like they contradict each other. Alibaba states that the Wan 2.2 TI2V-5B model produces 720p clips at 24 frames per second, five seconds long, in under nine minutes on a single consumer GPU such as a 4090, and it recommends at least 24 GB of VRAM. The ComfyUI documentation states that the same 5B model "should fit well on 8GB vram with the ComfyUI native offloading".

Both are true because they measure different things. 8 GB is where it fits. 24 GB is where it is comfortable. Offloading works by keeping most of the model in system RAM and streaming layers into the GPU for every step, so the card spends its time waiting on the PCIe bus instead of doing math. You pay that cost on every sampler step, not once.

ChartWan 2.2 TI2V-5B, one 5 second 720p clip (typical, July 2026)
The data behind this chart
[
  {
    "label": "8GB VRAM, heavy offloading",
    "minutes_per_clip": 40
  },
  {
    "label": "12GB VRAM",
    "minutes_per_clip": 22
  },
  {
    "label": "16GB VRAM",
    "minutes_per_clip": 14
  },
  {
    "label": "24GB VRAM, 4090 class",
    "minutes_per_clip": 9
  }
]

Only the last row is a vendor figure. The 24 GB card lands at 9 minutes per clip, which is Alibaba's published number for this model. The other rows are what offloading does to it, and they are order of magnitude rather than benchmark results. The shape is the point: 40 minutes on an 8 GB card is technically a working setup and practically a batch job you leave running overnight.

The larger Wan 2.2 models are a different world. The A14B text-to-video and image-to-video variants ask for at least 80 GB of VRAM for single-GPU inference. That is data-center hardware, not a card you put in a desk machine, and it is the point where self-hosted starts to mean renting someone else's accelerator by the hour.

What a clip costs on a rented GPU

Renting is how most people should test this, because a card you buy is the wrong hardware if the model you end up wanting needs 80 GB. Median on-demand prices across the GPU rental market, as of July 2026:

ChartMedian on-demand GPU rental and cost per 5 second clip (July 2026)
The data behind this chart
[
  {
    "label": "RTX 4090, 24GB",
    "usd_per_hour": 0.36,
    "usd_per_clip": 0.05
  },
  {
    "label": "A100, 80GB",
    "usd_per_hour": 1.79,
    "usd_per_clip": 0.6
  },
  {
    "label": "H100, 80GB",
    "usd_per_hour": 2.99,
    "usd_per_clip": 0.55
  }
]

The 4090 row runs the 5B model and costs about 0.05 dollars per clip at 0.36 dollars an hour. The 80 GB rows run the 14B models, which is why their per-clip cost jumps to 0.6 dollars even though the hardware itself is much faster. Bigger model, more compute per second of video.

Five cents a clip sounds like nothing, and that is the misleading part. Your first usable five seconds is never one render. Prompting a video model is a search, and twenty to forty renders before a keeper is normal for a shot with specific motion in it. A working session is therefore dollars rather than cents, and an afternoon of iteration on rented hardware costs about what lunch does.

Two rental details cost real money if you miss them. You are billed while the box downloads weights, and the Wan 2.2 files with their text encoder and VAE run to tens of gigabytes, so pick a provider with a persistent volume and download once. You are also billed while the box sits idle with your SSH session open. Stop the instance instead of just closing the terminal.

Install ComfyUI on the GPU box

Start from Ubuntu 24.04 with the NVIDIA driver already installed. Check the driver first, because every later failure looks identical without this check.

nvidia-smi

That must print a table with your card and a CUDA version. If it prints NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, the kernel module is not loaded, which usually follows a kernel upgrade with no reboot. Fix it here. ComfyUI will otherwise fall back to the CPU path and you will spend an hour blaming the model.

sudo apt update
sudo apt install -y git python3-venv python3-pip wget
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python3 -m venv venv
. venv/bin/activate
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
pip install -r requirements.txt

Confirm that PyTorch sees the card before you download a single weight file.

python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

True plus your card name means the stack is healthy. False means the installed wheel is the CPU-only build, which happens when pip finds a cached torch from an earlier install. Reinstall with the index URL above.

Download the Wan 2.2 model files

ComfyUI ships with no weights, and a video model is not one file. It is a diffusion model, a text encoder and a VAE, and each one goes in its own directory. Put a file in the wrong folder and the loader node simply will not list it, with no error to explain why.

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

The 5B model handles both text-to-video and image-to-video, which is why it is the sensible starting point. Always prefer .safetensors over .ckpt. A .ckpt file is a pickled Python object, so loading one runs code written by whoever built it. Budget disk generously: a working install with one model family and its output wants 100 GB, and video files are far larger than the PNG images an image workflow leaves behind. Back up your workflow JSON files with something like encrypted incremental backups to object storage, because the weights are re-downloadable and your tuned workflows are not.

Run it, and reach it safely

cd ~/ComfyUI
. venv/bin/activate
python main.py --listen 127.0.0.1 --port 8188

ComfyUI has no login screen and no user accounts. Anything that can reach port 8188 can queue jobs, read every clip you have generated, and install custom nodes, which is arbitrary code execution on your server. Bind it to localhost and reach it through an SSH tunnel from your own machine.

ssh -N -L 8188:127.0.0.1:8188 you@your-server

Then open http://127.0.0.1:8188 in your browser. Load the Wan 2.2 template workflow from the ComfyUI templates menu rather than wiring nodes by hand. The official templates carry the sampler settings the model was tuned for, and a video workflow has many more places to get a value quietly wrong than an image workflow does.

When the honest answer is to use an API

Self-hosting video generation is the right call when the volume is high and steady, when your frames must not leave your own infrastructure, or when you need a specific model or a custom adapter that no hosted service offers. It is also right when the pipeline must still work the same way in a year, because a hosted model can change under you with no version to pin.

Use a hosted API when you need a handful of clips a month, when you need output longer or larger than the open models produce, or when you have a deadline this week. Run the break-even honestly. A 24 GB card rented around the clock at the July 2026 median is roughly 260 dollars a month, and buying the same card costs more than that up front before you have generated one frame. An idle self-hosted box loses to per-clip API pricing every time. This is the same trade that decides how you serve text models, covered in Ollama against vLLM for self-hosted LLM serving, and it sits on top of the more basic question in whether a VPS with a GPU is worth the money at all.

What to check when a render fails

A render that dies at the very end, after the sampler bar completed, ran out of memory in the VAE decode. Reduce the frame count or switch to a tiled decode node. Changing the step count will not help, because the decode happens once, after every step has already run.

Output that is solid black or badly scrambled usually means the VAE does not match the model. A Wan 2.1 VAE loaded against a Wan 2.2 diffusion model produces exactly that, and no error appears anywhere in the log.

A render that runs but takes hours on a machine you know has a GPU means ComfyUI is on the CPU path. Check the startup log for the device line, then rerun the torch.cuda.is_available() check above.

The process vanishing with Killed in dmesg and no Python traceback is the kernel out-of-memory killer, so that is system RAM, not VRAM. Offloading needs the whole model resident in system RAM, which means a 16 GB box offloading a 5B model is short. Add RAM or add swap.

FAQ

Can I generate AI video on a VPS with no GPU?

No, not in a way you would use twice. A five second 720p clip that takes nine minutes on a 24 GB GPU takes many hours on a CPU, because the model has no matrix hardware to run on and system RAM bandwidth is an order of magnitude below GPU memory bandwidth. A CPU server can host the ComfyUI interface, store your models and hold your workflows, but the rendering itself needs a GPU.

How much VRAM do I need for Wan 2.2?

For the TI2V-5B model, 8 GB is the floor with ComfyUI native offloading, and 24 GB is what Alibaba recommends to get the published speed. For the A14B text-to-video and image-to-video models the model card asks for at least 80 GB of VRAM for single-GPU inference, so those need data-center cards.

How long can a self-hosted clip be?

About five seconds at 720p is the practical unit as of July 2026. Longer output is produced by generating segments and joining them, using the last frame of one segment as the first frame of the next. Quality drifts across the joins, so treat a long video as an editing job rather than one generation.

Is renting a GPU by the hour cheaper than buying a card?

Renting wins for anything under a few hours of rendering per day. At the July 2026 median of about 0.36 dollars per hour for a 24 GB card, you can rent for a long time before you match the purchase price of that card, and you avoid buying hardware that turns out to be the wrong class for the model you actually want. Buying wins only when the box is busy most of the day, every day.

#ai-video#comfyui#gpu#self-hosting#wan#vram