Metadata-Version: 2.4
Name: wan2video
Version: 0.1.1
Summary: Generate videos using Wan2.2 TI2V model with GGUF quantization and GPU acceleration
Author-email: Yunfeng Wang <wyf.brz@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,gguf,stable-diffusion-cpp,video-generation,wan2
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.9
Requires-Dist: click>=8.0
Requires-Dist: huggingface-hub>=0.20.0
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# wan2video

Generate videos using Wan2.2 TI2V (Text+Image to Video) 5B model with GGUF quantization and GPU acceleration.

## Quick Start

```bash
# Install and run (requires sd-cli in PATH)
uvx wan2video "a cat walking on the grass, sunny day"

# Or install first
pip install wan2video
wan2video "a beautiful sunset over the ocean"
```

## Prerequisites

- NVIDIA GPU with CUDA support (12GB+ VRAM recommended)
- [stable-diffusion.cpp](https://github.com/leejet/stable-diffusion.cpp) compiled with CUDA (`sd-cli` in PATH)
- ffmpeg (for mp4 output)

## Setup sd-cli

```bash
wan2video setup
```

Or compile manually:
```bash
git clone --recurse-submodules https://github.com/leejet/stable-diffusion.cpp
cd stable-diffusion.cpp && mkdir build && cd build
cmake .. -DSD_CUBLAS=ON -DGGML_CUDA=ON
make -j
# Add build/bin/sd-cli to your PATH
```

## Usage

```bash
# Text to video (480x320, 2 seconds)
wan2video "your prompt here"

# 720p video
wan2video "prompt" -W 1280 -H 720

# 1080p video
wan2video "prompt" -W 1920 -H 1080

# Image to video
wan2video "prompt describing motion" -i input.jpg

# More frames (5 seconds)
wan2video "prompt" -f 81

# Custom output
wan2video "prompt" -o my_video.mp4 --steps 30 --seed -1
```

## Options

| Option | Default | Description |
|--------|---------|-------------|
| `-W/--width` | 480 | Video width |
| `-H/--height` | 320 | Video height |
| `-f/--frames` | 33 | Frames (33≈2s, 81≈5s) |
| `-s/--steps` | 20 | Sampling steps |
| `--cfg-scale` | 7.0 | CFG guidance scale |
| `--seed` | 42 | Random seed (-1 for random) |
| `-i/--image` | None | Input image for I2V |
| `-o/--output` | output.mp4 | Output file path |

## Performance (RTX 4070 Ti 12GB)

| Resolution | Frames | Time |
|-----------|--------|------|
| 480x320 | 33 | ~16s |
| 1280x720 | 33 | ~2.5min |
| 1920x1080 | 33 | ~9min |

## License

MIT
