A modern C# WPF application for generating videos using the LTX Video model. This application provides an intuitive interface to interact with the Lightricks LTX-Video model for creating videos from text prompts.
Download and install Python 3.9 or later from python.org. Important: Make sure to check "Add Python to PATH" during installation.
Download the LTX Video model from Hugging Face or the official Lightricks repository. The application expects:
ltxv-13b-0.9.7-distilled.safetensorsD:\ai-models\Video\Lightbricks-LTX-Video\# Clone the repository
git clone <repository-url>
cd video_generator
# Restore NuGet packages
dotnet restore
# Build the solution
dotnet build --configuration Release
Easy Way (Recommended):
# Double-click run.bat or execute:
run.bat
Manual Way:
# Setup Python environment (first time only)
python src/python/setup_python.py
# Run the application
dotnet run --project src/VideoGenerator.UI
GPU Setup (CRITICAL for Performance):
# Install CUDA-enabled PyTorch (REQUIRED for fast generation)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Install other dependencies
pip install -r python_requirements.txt
# Test GPU is working
python -c "import torch; print('CUDA available:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None')"
⚠️ IMPORTANT: Without GPU acceleration, video generation will take 30-60+ minutes instead of 2-5 minutes!
The application will automatically:
Load Model:
Configure Generation Parameters:
Generate Video:
View Results:
The application follows clean architecture principles with dependency injection:
├── VideoGenerator.Models/ # Domain models and interfaces
├── VideoGenerator.Services/ # Python interop and business logic
├── VideoGenerator.UI/ # WPF presentation layer
│ ├── ViewModels/ # MVVM view models
│ ├── Styles/ # UI styling and themes
│ └── Converters/ # Data binding converters
└── python/ # Python scripts and environment
├── ltx_video_generator.py # Main video generation script
└── setup_python.py # Environment setup script
The application defaults to:
D:\ai-models\Video\Lightbricks-LTX-Video\ltxv-13b-0.9.7-distilled.safetensors
You can change this path in the UI or modify the default in MainWindowViewModel.cs.
Videos are saved to the same directory as the model by default. You can specify a different output directory in the UI.
🚀 GPU Acceleration (CRITICAL):
python -c "import torch; print(torch.cuda.is_available())"VRAM Usage:
Generation Settings:
Storage: Ensure sufficient disk space for generated videos
Model Loading Fails:
Generation Fails:
Python Process Errors:
pip install -r python_requirements.txtThe application logs to the console. Check the output window in your IDE or run from command line to see detailed logs.
Run tests with:
dotnet test
This project is licensed under the MIT License - see the LICENSE file for details.
A modern C# WPF application for generating videos using the LTX Video model. This application provides an intuitive interface to interact with the Lightricks LTX-Video model for creating videos from text prompts.
Download and install Python 3.9 or later from python.org. Important: Make sure to check "Add Python to PATH" during installation.
Download the LTX Video model from Hugging Face or the official Lightricks repository. The application expects:
ltxv-13b-0.9.7-distilled.safetensorsD:\ai-models\Video\Lightbricks-LTX-Video\# Clone the repository
git clone <repository-url>
cd video_generator
# Restore NuGet packages
dotnet restore
# Build the solution
dotnet build --configuration Release
Easy Way (Recommended):
# Double-click run.bat or execute:
run.bat
Manual Way:
# Setup Python environment (first time only)
python src/python/setup_python.py
# Run the application
dotnet run --project src/VideoGenerator.UI
GPU Setup (CRITICAL for Performance):
# Install CUDA-enabled PyTorch (REQUIRED for fast generation)
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Install other dependencies
pip install -r python_requirements.txt
# Test GPU is working
python -c "import torch; print('CUDA available:', torch.cuda.is_available()); print('GPU:', torch.cuda.get_device_name(0) if torch.cuda.is_available() else 'None')"
⚠️ IMPORTANT: Without GPU acceleration, video generation will take 30-60+ minutes instead of 2-5 minutes!
The application will automatically:
Load Model:
Configure Generation Parameters:
Generate Video:
View Results:
The application follows clean architecture principles with dependency injection:
├── VideoGenerator.Models/ # Domain models and interfaces
├── VideoGenerator.Services/ # Python interop and business logic
├── VideoGenerator.UI/ # WPF presentation layer
│ ├── ViewModels/ # MVVM view models
│ ├── Styles/ # UI styling and themes
│ └── Converters/ # Data binding converters
└── python/ # Python scripts and environment
├── ltx_video_generator.py # Main video generation script
└── setup_python.py # Environment setup script
The application defaults to:
D:\ai-models\Video\Lightbricks-LTX-Video\ltxv-13b-0.9.7-distilled.safetensors
You can change this path in the UI or modify the default in MainWindowViewModel.cs.
Videos are saved to the same directory as the model by default. You can specify a different output directory in the UI.
🚀 GPU Acceleration (CRITICAL):
python -c "import torch; print(torch.cuda.is_available())"VRAM Usage:
Generation Settings:
Storage: Ensure sufficient disk space for generated videos
Model Loading Fails:
Generation Fails:
Python Process Errors:
pip install -r python_requirements.txtThe application logs to the console. Check the output window in your IDE or run from command line to see detailed logs.
Run tests with:
dotnet test
This project is licensed under the MIT License - see the LICENSE file for details.