File size: 1,927 Bytes
8fab102
d47df1b
 
 
 
8fab102
 
d47df1b
8fab102
 
d47df1b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Wan2.2 TI2V 5B Video Generator
emoji: 🐳
colorFrom: purple
colorTo: blue
sdk: docker
pinned: false
hardware: t4-medium
---

# 🐳 Wan2.2 TI2V 5B — Text & Image to Video

This Space runs [Wan-AI/Wan2.2-TI2V-5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B), a state-of-the-art open-source video generation model that produces 720p @ 24fps clips.

## Features

- **Text-to-Video** — describe a scene, get a video
- **Image-to-Video** — upload a starting image, let AI animate it
- **720p @ 24fps** output
- Runs on **T4 (16 GB VRAM)** or larger GPUs

## Getting Started

1. Go to **Settings → Hardware** and select `T4 medium` (16 GB VRAM) or `L4` (24 GB)
2. Wait for the Space to build (first build takes ~10 min)
3. Enter a prompt, optionally upload an image, and click **Generate**

> ⚠️ First generation downloads the model (~54 GB). Subsequent runs use the cached model.

## Hardware Requirements

| GPU | VRAM | Works? | Notes |
|-----|------|--------|-------|
| T4 (free) | 16 GB | ⚠️ Tight | May OOM on 720p. Use `L4` or tune `num_frames` lower |
| T4 medium ($) | 16 GB | ⚠️ Borderline | Enable CPU offload if needed |
| L4 | 24 GB | ✅ Good | Recommended |
| A10G | 24 GB | ✅ Great | |
| A100 | 40/80 GB | ✅ Overkill | Fast! |

## API Usage

You can also call the `/generate` endpoint directly:

```bash
# Text-to-Video
curl -X POST https://sayeed105236-dotprogrammers.hf.space/generate \
  -F "prompt=A cat astronaut floating in space" \
  -F "steps=30" \
  -o video.mp4

# Image-to-Video
curl -X POST https://sayeed105236-dotprogrammers.hf.space/generate \
  -F "prompt=Summer beach vacation, the cat looks at the camera" \
  -F "image=@cat.jpg" \
  -F "steps=30" \
  -o video.mp4
```

## Built With

- [Wan2.2 TI2V 5B](https://huggingface.co/Wan-AI/Wan2.2-TI2V-5B-Diffusers) by Wan Team
- [Diffusers](https://github.com/huggingface/diffusers) (main branch)
- FastAPI + UVicorn