SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor

Self-hosted AI video generator: wetin e fit really do

See wetin Wan 2.2, HunyuanVideo and LTX-Video fit produce for July 2026, the VRAM wey each need, 5-second GPU cost, and when API make more sense.

Wetin self-hosted AI video generator fit really do

Self-hosted AI video generator dey work today, but e slower and smaller pass wetin demo reels dey suggest. As of July 2026, the open models wey worth running na Wan 2.2 from Alibaba and HunyuanVideo from Tencent, plus LTX-Video from Lightricks when speed matter pass realism. All of dem dey run under ComfyUI for Linux machine wey get NVIDIA GPU. With Wan 2.2, wey this guide dey set up, wetin you go get na clip of about five seconds for 720p. Lightricks document more for LTX-2.5, wey be the current model, and e dey generate audio too: up to 20 seconds per clip for 720p or 1080p and 24 or 25 fps, plus native 4K up to 50 fps for clips of up to 10 seconds. Those limits na for Lightricks own API, although LTX-2.5 weights dey published openly for Hugging Face too. E still be one shot. E no be scene. E no be one minute of finished footage.

Make we give short answer before the details. 24 GB card fit render five-second 720p clip within single-digit minutes. 12 GB card fit do the same work for twenty minutes or more, because the weights no fit enter video memory and the software dey move layers go and come between system RAM and the GPU. Server wey no get GPU no fit do this in any useful way. The same arithmetic wey make CPU image generation slow dey make CPU video generation useless.

If you don already read the hardware ladder for self-hosted image generator, video na the same argument, but every number don move one class up. VRAM (video memory, the RAM wey dem solder near graphics chip) still be the only spec wey decide whether this work go easy or painful.

Why one video cost pass one image

Diffusion model dey generate image by denoise am step by step, and every step dey read all the weights for the model. Video model dey do the same thing to one complete block of frames at once, and e add attention across time so frame 80 go know how frame 12 look. Five seconds for 24 frames per second na 120 frames inside one batch.

Na this temporal attention make cost no dey increase gently with clip length. If you double the frame count, the memory wey sampler need go increase pass two times. So the problem no be say rendering go slow. Na the render go stop.

Another memory spike dey wey people no dey expect. After sampler finish, VAE (variational autoencoder, the part wey dey turn compressed latent into real pixels) dey decode the whole latent video at once. That decode fit need more memory than sampling. The sign na job wey show completed progress bar, then print this:

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

The fix na tiled decoding or shorter clip. If you know which stage run out of memory, you no go waste one hour tuning the wrong thing.

How much VRAM you need for AI video generation

Two published figures dey frame the whole decision, and e fit look like dem dey contradict each other. Alibaba talk say the Wan 2.2 TI2V-5B model fit produce 720p clips at 24 frames per second, five seconds long, in under nine minutes on one consumer GPU like 4090, and e recommend at least 24 GB of VRAM. ComfyUI documentation talk say the same 5B model "should fit well on 8GB vram with the ComfyUI native offloading".

Both statements dey correct because dem measure different things. 8 GB na where e fit run. 24 GB na where e fit run comfortably. Offloading dey work by keeping most of the model for system RAM and streaming layers enter GPU for every step, so the card spend time waiting for PCIe bus instead of doing calculations. You pay this cost for every sampler step, not just once.

ChartWan 2.2 TI2V-5B, one 5 second 720p clip (typical, July 2026)
Di data wey dey behind dis 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
  }
]

Na only the last row be vendor figure. The 24 GB card dey reach 9 minutes per clip, and na Alibaba's published number for this model. The other rows show wetin offloading do to am, and dem be order-of-magnitude estimates, not benchmark results. The main point na the shape: 40 minutes on an 8 GB card na technically working setup, but practically na batch job wey you go leave running overnight.

The bigger Wan 2.2 models dey operate for another level. Alibaba's own single-GPU inference command for the A14B text-to-video and image-to-video variants dey require at least 80 GB of VRAM. No consumer card get that much, so to run the command as published, you need data-center accelerator like A100 or H100, or workstation card like NVIDIA's RTX PRO 6000 Blackwell with 96 GB. That figure apply to Alibaba's script, not to every method of running the models. ComfyUI's dynamic VRAM loader, wey documentation publish for March 2026 for NVIDIA cards on Windows and Linux, don benchmark both 14B experts, for fp16 and fp8, on RTX 5060 by loading weights as dem become necessary. Those runs use 81 frames at 320 by 320, so dem show say A14B models fit load on small card. Dem no show say 720p go fast or even practical there. For 14B output at 720p within reasonable time, self-hosting still usually mean say you rent another person's accelerator by the hour. The same arithmetic go much further for the text side, where self-hosting a 2.8 trillion parameter model like Kimi K3 no longer be question of one card, but question of how many 80 GB cards you fit afford to connect together.

Wetin one clip cost for rented GPU

Renting na how most people suppose test this, because card wey you buy fit be wrong hardware if the model wey you later want need 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)
Di data wey dey behind dis 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 dey run the 5B model and e cost about 0.05 dollars per clip at 0.36 dollars per hour. The 80 GB rows dey run the 14B models, na why cost per clip jump reach 0.6 dollars even though the hardware itself dey much faster. Bigger model mean more compute per second of video.

Five cents per clip sound like nothing, and na there the misleading part dey. Your first usable five seconds no be ever just one render. Prompting video model na search, and twenty to forty renders before you get keeper dey normal for shot wey get specific motion. So one working session go cost dollars instead of cents, and one afternoon of iteration for rented hardware go cost about wetin lunch cost.

Two rental details fit cost real money if you miss dem. Dem go bill you while the box dey download weights, and the Wan 2.2 files together with their text encoder and VAE fit reach tens of gigabytes, so choose provider wey get persistent volume and download am once. Dem go also bill you while the box dey idle with your SSH session still open. Stop the instance instead of only closing the terminal.

GPU box for ComfyUI install

Ubuntu 24.04 wey NVIDIA driver don already install na where you go start. Check the driver first, because without this check, every later failure go look the same.

nvidia-smi

This one suppose print table wey show your card and CUDA version. If e print NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver, kernel module never load. This one usually happen after kernel upgrade when you never reboot. Fix am here. Otherwise, ComfyUI go fall back to CPU path, and you go spend one 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 say PyTorch dey see the card before you download even one weight file.

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

True together with your card name mean say the stack dey healthy. False mean say the installed wheel na CPU-only build. This one happen when pip find cached torch from an earlier install. Reinstall am with the index URL above.

Download Wan 2.2 model files

ComfyUI no get weights inside, and video model no be one file. E be diffusion model, text encoder, and VAE, and each one get its own directory. If you put file for wrong folder, loader node no go list am, and e no go show any 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 fit handle both text-to-video and image-to-video, na why e make sense as starting point. Always prefer .safetensors over .ckpt. A .ckpt file na pickled Python object, so when you load am, e go run code wey the person wey build am write. Reserve enough disk space: working install with one model family and its output need 100 GB, and video files dey much bigger than the PNG images wey image workflow leave behind. Back up your workflow JSON files with something like encrypted incremental backups to object storage, because you fit download the weights again, but you no fit download your tuned workflows again.

Run am, then access am safely

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

ComfyUI no get login screen and no user accounts. Anything wey fit reach port 8188 fit queue jobs and read every clip wey you don generate. If you later enable ComfyUI-Manager, whether remote visitor fit also install custom nodes depend on the security and network settings. Custom node fit run any code for your server. Bind am to localhost, then access am 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 for your browser. Load the Wan 2.2 template workflow from the ComfyUI templates menu instead of wiring nodes by hand. The official templates get the sampler settings wey dem tune the model for. Video workflow get many more places where wrong value fit pass quietly compared with image workflow.

When honest answer na to use an API

Self-hosting video generation make sense when volume high and steady, when your frames no suppose leave your own infrastructure, or when you need a specific model or custom adapter wey no hosted service dey offer. E still make sense when pipeline suppose work the same way one year from now. Some hosted models fit change under you: Replicate dey keep its official models up to date with the latest version and e no ask you to choose one. Others fit pin, and you call Replicate community models with a specific version, so check am before you build on top one.

Use hosted API when you need only small number of clips every month, when you need output wey long or large pass wetin open models fit produce, or when deadline dey this week. Calculate the break-even honestly. 24 GB card wey you rent around the clock for July 2026 median price na roughly 260 dollars every month, and to buy the same card go cost more than that upfront before you generate even one frame. Self-hosted box wey dey idle go lose to per-clip API pricing every time. Na the same trade-off wey decide how you serve text models, as Ollama against vLLM for self-hosted LLM serving explain, and e dey on top the more basic question for whether VPS with GPU worth the money at all.

Wetin to check when render fail

If render die for the very end, after sampler bar don complete, e mean say VAE decode run out of memory. Reduce the frame count or change to tiled decode node. Changing the step count no go help, because decode happen once, after all the steps don already run.

If output come out solid black or badly scrambled, e usually mean say VAE no match the model. The version numbers no go tell you which file correct: Wan 2.2 TI2V-5B model dey use Wan 2.2 VAE, while Alibaba own configuration for Wan 2.2 A14B models specify Wan 2.1 VAE. Load the VAE wey the official template for your model name.

If render dey run but e take hours for machine wey you know get GPU, e mean say ComfyUI dey use CPU path. Check the startup log for the device line, then run the torch.cuda.is_available() check above again.

If process disappear with Killed inside dmesg and no Python traceback show, na kernel out-of-memory killer cause am. So na system RAM problem, no be VRAM. How much RAM offloading need depend on how ComfyUI load the weights. The dynamic VRAM loader, wey dey run on NVIDIA cards for Linux and Windows, map the weight files from disk and load dem as e need dem. ComfyUI talk say e fit run models wey pass your physical RAM, so 16 GB system RAM by itself no mean say offloading 5B model no go work. Older builds, and current ones wey start with --disable-dynamic-vram, use the older estimate-based loading and fit make small machine run short of memory. Update ComfyUI and check say the flag no dey set. If killer still dey fire, add RAM or add swap.

FAQ

I fit generate AI video for VPS wey no get GPU?

No, no be for way wey you go use am twice. A five second 720p clip wey dey take nine minutes for 24 GB GPU fit take many hours for CPU. Some server CPUs get matrix units inside dem, like Intel Xeon processors wey get AMX, but their throughput dey far below GPU own, and system RAM bandwidth dey one order of magnitude below GPU memory bandwidth. CPU server fit host ComfyUI interface, store your models, and keep your workflows, but na GPU dey needed for the rendering itself.

How much VRAM I need for Wan 2.2?

For TI2V-5B model, 8 GB na the minimum with ComfyUI native offloading, while 24 GB na wetin Alibaba recommend to reach the published speed. For A14B text-to-video and image-to-video models, Alibaba single-GPU inference command ask for at least 80 GB VRAM. This mean say you need either 80 GB data-center card or 96 GB workstation card like RTX PRO 6000 Blackwell if you run am that way. ComfyUI dynamic VRAM loader don run both 14B experts for RTX 5060, but na only for 320 by 320 benchmark. So take am as proof say the models fit load for small card, not as 720p speed or memory figure.

How long self-hosted clip fit be?

With Wan 2.2, about five seconds for 720p na the practical unit as of July 2026. Lightricks document LTX-2.5 clips with generated audio wey fit reach 20 seconds for 720p and 1080p, and up to 10 seconds for 1440p, 4K, or 48 to 50 fps. To produce longer output, generate segments and join dem together. Use the last frame of one segment as the first frame of the next one. Quality fit change across the joins, so treat long video as editing work instead of one generation.

Renting GPU by the hour cheaper pass buying card?

Renting better for anything wey involve less than few hours of rendering per day. For July 2026 median of about 0.36 dollars per hour for 24 GB card, you fit rent for long time before the cost match the purchase price of that card. You also avoid buying hardware wey later turn out to be the wrong class for the model you really want. Buying better only when the machine dey busy for most of the day, every day.

Dis article help you?