Fully offline, local AI video generation for NVIDIA CUDA GPUs on Windows.
Generate videos from text prompts using state-of-the-art diffusion models — no cloud, no API keys, no internet required after initial model download. Runs entirely on consumer hardware with an RTX 5080 or similar.
| Model | Parameters | Resolution | FPS | Duration | Disk | Quality |
|---|---|---|---|---|---|---|
| Wan2.1 T2V 1.3B (default) | 1.3B | 832×480 | 16 | ~2 s | ~27 GB | Standard |
| CogVideoX 2B | 2B | 720×480 | 8 | 6 s | ~11 GB | Entry |
| CogVideoX 5B | 5B | 720×480 | 8 | 6 s | ~20 GB | Standard |
| LTX-Video 2B | 2B | 768×512 | 24 | ~4 s | ~27 GB | Entry |
| LTX-2 19B | 19B (47B total) | 768×512 | 24 | ~5 s | ~135 GB | High |
All models are downloaded from HuggingFace in diffusers format and stored locally under models/.
LTX-2 19B includes a 27B Gemma3 text encoder and supports text-to-video, image-to-video, and text-to-audio with synchronized output.
| Component | Minimum | Recommended |
|---|---|---|
| GPU | NVIDIA with 8+ GB VRAM, CUDA support | RTX 5080 (16 GB VRAM) |
| System RAM | 32 GB | 64+ GB (required for LTX-2 19B with INT8) |
| Disk | 50 GB (smallest model) | 500+ GB (all models) |
| CUDA | 12.0+ | 12.8 |
| OS | Windows 10/11 | Windows 11 |
| Python | 3.10+ | 3.11 |
| FFmpeg | Required | Add to PATH |
git clone https://github.com/YMKNM/Local-Video-AI-26.git
cd Local-Video-AI-26
python -m venv venv
venv\Scripts\activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
Required for LTX-2 19B support (LTX2Pipeline is not yet in a stable release):
pip install git+https://github.com/huggingface/diffusers.git
pip install -r requirements.txt
Download from ffmpeg.org and add to your system PATH.
Models are automatically downloaded from HuggingFace on first use. To pre-download:
python download_models.py
Or use the HuggingFace CLI:
huggingface-cli download Wan-AI/Wan2.1-T2V-1.3B-Diffusers --local-dir models/wan2.1-t2v-1.3b
python run_ui.py
Opens at http://localhost:7860. Options:
python run_ui.py --port 8080 # Custom port
python run_ui.py --share # Public Gradio link
python run_ui.py --debug # Debug logging
UI Tabs:
python generate.py --prompt "A cinematic drone shot over mountains at sunset"
python generate.py --prompt "A cat playing" --seconds 4
python generate.py --prompt "Ocean waves" --width 1280 --height 720 --seed 42
from video_ai import VideoAI
ai = VideoAI()
result = ai.generate("A sunset over the ocean")
print(result.output_path)
uvicorn video_ai.api.server:app --host 0.0.0.0 --port 8000
import httpx
response = httpx.post("http://localhost:8000/generate", json={
"prompt": "A golden retriever running on a beach",
"model": "wan2.1-t2v-1.3b"
})
Configuration files are in video_ai/configs/:
| File | Purpose |
|---|---|
defaults.yaml | Default generation parameters (steps, guidance, resolution) |
hardware.yaml | GPU/RAM detection settings, VRAM thresholds, offloading strategy |
models.yaml | Legacy ONNX model paths (superseded by model_registry.py) |
prompt_templates.yaml | Prompt expansion templates and quality tags |
Key runtime settings are in defaults.yaml:
generation:
steps: 30
guidance_scale: 5.0
width: 832
height: 480
fps: 24
duration_seconds: 6
Local-Video-AI-26/
├── run_ui.py # Web UI launcher
├── generate.py # CLI entry point
├── api.py # Python API wrapper
├── download_models.py # Model downloader
├── requirements.txt # Python dependencies
├── setup.py # Package installer
│
├── video_ai/ # Main package
│ ├── __init__.py # VideoAI class, lazy imports
│ │
│ ├── agent/ # Planning & orchestration
│ │ ├── planner.py # GenerationPlanner — central orchestrator
│ │ ├── prompt_engine.py # Model-aware prompt expansion
│ │ ├── resource_monitor.py# GPU/RAM/disk monitoring
│ │ ├── retry_logic.py # OOM recovery with parameter reduction
│ │ └── temporal_prompt.py # Temporal prompt scheduling (experimental)
│ │
│ ├── runtime/ # Model loading & inference
│ │ ├── model_registry.py # Canonical model catalog (5 models)
│ │ ├── diffusers_pipeline.py # HuggingFace Diffusers pipeline wrapper
│ │ ├── inference.py # Inference engine (bridges planner → pipeline)
│ │ ├── cuda_session.py # CUDA session management
│ │ └── gpu_scheduler.py # Multi-job GPU scheduling
│ │
│ ├── ui/ # Web interface
│ │ ├── web_ui.py # Gradio UI (4 tabs)
│ │ ├── deepseek_tab.py # DeepSeek chat tab
│ │ ├── image_motion_tab.py# Image-to-video tab
│ │ ├── aggressive_generator_tab.py # Batch generation tab
│ │ └── log_handler.py # UI logging integration
│ │
│ ├── video/ # Video output pipeline
│ │ ├── assembler.py # Frame → video assembly
│ │ ├── ffmpeg_wrapper.py # FFmpeg process management
│ │ └── frame_writer.py # Frame I/O
│ │
│ ├── generators/ # Specialized generators
│ │ ├── aggressive_image.py# Memory-aggressive image generation
│ │ ├── image_to_motion.py # Image animation generator
│ │ └── video_models.py # Extended model definitions
│ │
│ ├── image_motion/ # SAM2-based image animation
│ │ ├── animator.py # Core animation engine
│ │ ├── sam2_segment.py # SAM2 segmentation
│ │ ├── motion_estimator.py# Optical flow & motion
│ │ ├── pose_detector.py # Pose estimation
│ │ └── ... # Supporting modules
│ │
│ ├── deepseek/ # Offline DeepSeek LLM
│ │ └── __init__.py # DeepSeek-R1-Distill (1.5B/7B/14B)
│ │
│ ├── api/ # REST API
│ │ └── server.py # FastAPI application
│ │
│ ├── sdk/ # Client SDKs
│ │ ├── python_client.py # Python SDK
│ │ └── javascript/ # JavaScript SDK
│ │
│ ├── models/ # Legacy ONNX pipeline modules
│ │
│ ├── configs/ # YAML configuration
│ │ ├── defaults.yaml
│ │ ├── hardware.yaml
│ │ ├── models.yaml
│ │ └── prompt_templates.yaml
│ │
│ └── examples/ # Usage examples
│ ├── basic_generation.py
│ ├── advanced_generation.py
│ └── directml_demo.py
│
├── models/ # Downloaded model weights (not in git)
│ ├── wan2.1-t2v-1.3b/ # ~27 GB
│ ├── cogvideox-2b/ # ~13 GB
│ ├── cogvideox-5b/ # ~20 GB
│ ├── ltx-video-2b/ # ~27 GB
│ ├── ltx-2-19b/ # ~135 GB
│ └── ...
│
├── outputs/ # Generated videos (not in git)
├── docs/ # Documentation
└── deploy/ # Deployment configs
PromptEngine expands short prompts with model-specific quality tags and cinematic descriptorsGenerationPlanner selects model, estimates VRAM, snaps resolution/frames to model constraintsDiffusersPipeline loads the HuggingFace pipeline with CPU offloading and optional INT8 quantizationFFmpegWrapper encodes frames to H.264 MP4RetryManager reduces resolution/frames and retries automaticallyThe retry system automatically reduces resolution and frame count on OOM. To reduce VRAM usage manually:
Models are large (11–135 GB). If downloads fail:
models/ can exceed 400 GB with all models)huggingface-cli download with --resume-download for resumable downloadsHF_HOME environment variable to control cache locationpython -c "import torch; print(torch.cuda.is_available(), torch.version.cuda)"cu128)https://download.pytorch.org/whl/cu128LTX-2 19B requires diffusers installed from source (the LTX2Pipeline class). If you get import errors:
pip install --upgrade git+https://github.com/huggingface/diffusers.git
Ensure ffmpeg is on your system PATH:
ffmpeg -version
If not installed, download from ffmpeg.org and add the bin/ directory to your PATH.
python -m pytest test_setup.py -v
Core stack:
This project is for personal/research use. Individual models have their own licenses:
| Model | License |
|---|---|
| Wan2.1 T2V 1.3B | Apache 2.0 |
| CogVideoX 2B | Apache 2.0 |
| CogVideoX 5B | CogVideoX (custom, research-OK) |
| LTX-Video 2B | LTX-Video Open Weights |
| LTX-2 19B | LTX-2 Community License |
| DeepSeek-R1 | DeepSeek License |
Python
93.8%
TypeScript
3.3%
Batchfile
1.2%
Fully offline, local AI video generation for NVIDIA CUDA GPUs on Windows.
Generate videos from text prompts using state-of-the-art diffusion models — no cloud, no API keys, no internet required after initial model download. Runs entirely on consumer hardware with an RTX 5080 or similar.
| Model | Parameters | Resolution | FPS | Duration | Disk | Quality |
|---|---|---|---|---|---|---|
| Wan2.1 T2V 1.3B (default) | 1.3B | 832×480 | 16 | ~2 s | ~27 GB | Standard |
| CogVideoX 2B | 2B | 720×480 | 8 | 6 s | ~11 GB | Entry |
| CogVideoX 5B | 5B | 720×480 | 8 | 6 s | ~20 GB | Standard |
| LTX-Video 2B | 2B | 768×512 | 24 | ~4 s | ~27 GB | Entry |
| LTX-2 19B | 19B (47B total) | 768×512 | 24 | ~5 s | ~135 GB | High |
All models are downloaded from HuggingFace in diffusers format and stored locally under models/.
LTX-2 19B includes a 27B Gemma3 text encoder and supports text-to-video, image-to-video, and text-to-audio with synchronized output.
| Component | Minimum | Recommended |
|---|---|---|
| GPU | NVIDIA with 8+ GB VRAM, CUDA support | RTX 5080 (16 GB VRAM) |
| System RAM | 32 GB | 64+ GB (required for LTX-2 19B with INT8) |
| Disk | 50 GB (smallest model) | 500+ GB (all models) |
| CUDA | 12.0+ | 12.8 |
| OS | Windows 10/11 | Windows 11 |
| Python | 3.10+ | 3.11 |
| FFmpeg | Required | Add to PATH |
git clone https://github.com/YMKNM/Local-Video-AI-26.git
cd Local-Video-AI-26
python -m venv venv
venv\Scripts\activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
Required for LTX-2 19B support (LTX2Pipeline is not yet in a stable release):
pip install git+https://github.com/huggingface/diffusers.git
pip install -r requirements.txt
Download from ffmpeg.org and add to your system PATH.
Models are automatically downloaded from HuggingFace on first use. To pre-download:
python download_models.py
Or use the HuggingFace CLI:
huggingface-cli download Wan-AI/Wan2.1-T2V-1.3B-Diffusers --local-dir models/wan2.1-t2v-1.3b
python run_ui.py
Opens at http://localhost:7860. Options:
python run_ui.py --port 8080 # Custom port
python run_ui.py --share # Public Gradio link
python run_ui.py --debug # Debug logging
UI Tabs:
python generate.py --prompt "A cinematic drone shot over mountains at sunset"
python generate.py --prompt "A cat playing" --seconds 4
python generate.py --prompt "Ocean waves" --width 1280 --height 720 --seed 42
from video_ai import VideoAI
ai = VideoAI()
result = ai.generate("A sunset over the ocean")
print(result.output_path)
uvicorn video_ai.api.server:app --host 0.0.0.0 --port 8000
import httpx
response = httpx.post("http://localhost:8000/generate", json={
"prompt": "A golden retriever running on a beach",
"model": "wan2.1-t2v-1.3b"
})
Configuration files are in video_ai/configs/:
| File | Purpose |
|---|---|
defaults.yaml | Default generation parameters (steps, guidance, resolution) |
hardware.yaml | GPU/RAM detection settings, VRAM thresholds, offloading strategy |
models.yaml | Legacy ONNX model paths (superseded by model_registry.py) |
prompt_templates.yaml | Prompt expansion templates and quality tags |
Key runtime settings are in defaults.yaml:
generation:
steps: 30
guidance_scale: 5.0
width: 832
height: 480
fps: 24
duration_seconds: 6
Local-Video-AI-26/
├── run_ui.py # Web UI launcher
├── generate.py # CLI entry point
├── api.py # Python API wrapper
├── download_models.py # Model downloader
├── requirements.txt # Python dependencies
├── setup.py # Package installer
│
├── video_ai/ # Main package
│ ├── __init__.py # VideoAI class, lazy imports
│ │
│ ├── agent/ # Planning & orchestration
│ │ ├── planner.py # GenerationPlanner — central orchestrator
│ │ ├── prompt_engine.py # Model-aware prompt expansion
│ │ ├── resource_monitor.py# GPU/RAM/disk monitoring
│ │ ├── retry_logic.py # OOM recovery with parameter reduction
│ │ └── temporal_prompt.py # Temporal prompt scheduling (experimental)
│ │
│ ├── runtime/ # Model loading & inference
│ │ ├── model_registry.py # Canonical model catalog (5 models)
│ │ ├── diffusers_pipeline.py # HuggingFace Diffusers pipeline wrapper
│ │ ├── inference.py # Inference engine (bridges planner → pipeline)
│ │ ├── cuda_session.py # CUDA session management
│ │ └── gpu_scheduler.py # Multi-job GPU scheduling
│ │
│ ├── ui/ # Web interface
│ │ ├── web_ui.py # Gradio UI (4 tabs)
│ │ ├── deepseek_tab.py # DeepSeek chat tab
│ │ ├── image_motion_tab.py# Image-to-video tab
│ │ ├── aggressive_generator_tab.py # Batch generation tab
│ │ └── log_handler.py # UI logging integration
│ │
│ ├── video/ # Video output pipeline
│ │ ├── assembler.py # Frame → video assembly
│ │ ├── ffmpeg_wrapper.py # FFmpeg process management
│ │ └── frame_writer.py # Frame I/O
│ │
│ ├── generators/ # Specialized generators
│ │ ├── aggressive_image.py# Memory-aggressive image generation
│ │ ├── image_to_motion.py # Image animation generator
│ │ └── video_models.py # Extended model definitions
│ │
│ ├── image_motion/ # SAM2-based image animation
│ │ ├── animator.py # Core animation engine
│ │ ├── sam2_segment.py # SAM2 segmentation
│ │ ├── motion_estimator.py# Optical flow & motion
│ │ ├── pose_detector.py # Pose estimation
│ │ └── ... # Supporting modules
│ │
│ ├── deepseek/ # Offline DeepSeek LLM
│ │ └── __init__.py # DeepSeek-R1-Distill (1.5B/7B/14B)
│ │
│ ├── api/ # REST API
│ │ └── server.py # FastAPI application
│ │
│ ├── sdk/ # Client SDKs
│ │ ├── python_client.py # Python SDK
│ │ └── javascript/ # JavaScript SDK
│ │
│ ├── models/ # Legacy ONNX pipeline modules
│ │
│ ├── configs/ # YAML configuration
│ │ ├── defaults.yaml
│ │ ├── hardware.yaml
│ │ ├── models.yaml
│ │ └── prompt_templates.yaml
│ │
│ └── examples/ # Usage examples
│ ├── basic_generation.py
│ ├── advanced_generation.py
│ └── directml_demo.py
│
├── models/ # Downloaded model weights (not in git)
│ ├── wan2.1-t2v-1.3b/ # ~27 GB
│ ├── cogvideox-2b/ # ~13 GB
│ ├── cogvideox-5b/ # ~20 GB
│ ├── ltx-video-2b/ # ~27 GB
│ ├── ltx-2-19b/ # ~135 GB
│ └── ...
│
├── outputs/ # Generated videos (not in git)
├── docs/ # Documentation
└── deploy/ # Deployment configs
PromptEngine expands short prompts with model-specific quality tags and cinematic descriptorsGenerationPlanner selects model, estimates VRAM, snaps resolution/frames to model constraintsDiffusersPipeline loads the HuggingFace pipeline with CPU offloading and optional INT8 quantizationFFmpegWrapper encodes frames to H.264 MP4RetryManager reduces resolution/frames and retries automaticallyThe retry system automatically reduces resolution and frame count on OOM. To reduce VRAM usage manually:
Models are large (11–135 GB). If downloads fail:
models/ can exceed 400 GB with all models)huggingface-cli download with --resume-download for resumable downloadsHF_HOME environment variable to control cache locationpython -c "import torch; print(torch.cuda.is_available(), torch.version.cuda)"cu128)https://download.pytorch.org/whl/cu128LTX-2 19B requires diffusers installed from source (the LTX2Pipeline class). If you get import errors:
pip install --upgrade git+https://github.com/huggingface/diffusers.git
Ensure ffmpeg is on your system PATH:
ffmpeg -version
If not installed, download from ffmpeg.org and add the bin/ directory to your PATH.
python -m pytest test_setup.py -v
Core stack:
This project is for personal/research use. Individual models have their own licenses:
| Model | License |
|---|---|
| Wan2.1 T2V 1.3B | Apache 2.0 |
| CogVideoX 2B | Apache 2.0 |
| CogVideoX 5B | CogVideoX (custom, research-OK) |
| LTX-Video 2B | LTX-Video Open Weights |
| LTX-2 19B | LTX-2 Community License |
| DeepSeek-R1 | DeepSeek License |
Python
93.8%
TypeScript
3.3%
Batchfile
1.2%