wan22-extend / README.md
Simzy's picture
Require HF sign-in; bill each visitor's own ZeroGPU quota (GitHub 2c05bcb)
80e9470 verified
|
Raw History Blame Contribute Delete
2.8 kB
---
title: Wan 2.2 Extend
emoji: 🎬
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.44.1
app_file: app.py
pinned: false
license: apache-2.0
short_description: Wan 2.2 I2V + Extend chaining for ~10–20s clips
hf_oauth: true
hf_oauth_scopes:
- inference-api
---
# Wan 2.2 Image β†’ Video + Extend
Helper Space by **Casey (Simzy)**: generate a short [Wan 2.2](https://huggingface.co/spaces/kulkas2pintu/wan222) image-to-video clip on **free ZeroGPU**, then **Extend** by chaining until you reach roughly **10–20 seconds**.
This Space does **not** load the 14B Wan weights itself. It calls the public ZeroGPU Space `kulkas2pintu/wan222` via `gradio_client`, then stitches segments with ffmpeg.
## How to use
0. Click **Sign in with Hugging Face**. Generation uses **your own** ZeroGPU quota; the Space owner's token is never used, and signed-out requests are refused.
1. Upload a still image and write a **Generate prompt**.
2. Click **Generate** β€” wait for ZeroGPU (often 1–3 minutes when busy).
3. Optionally set an **Extend prompt** (leave blank to reuse Generate prompt) and choose **Extend start**:
- **Last frame from video** (default) β€” current behavior
- **Upload custom image** β€” use a different image as the I2V start for the next segment
4. Click **Extend** to continue, or set a target length and use **Auto-extend** (capped at 6 segments).
5. Download the concatenated MP4.
### Length guide
| Segment length | Segments | Rough total |
|----------------|----------|-------------|
| ~3.5s | 3 | ~10s |
| ~3.5s | 4–5 | ~14–18s |
| ~4–5s | 4 | ~16–20s |
## Honesty about ZeroGPU
- Each visitor signs in with HF OAuth; upstream calls to `kulkas2pintu/wan222` carry that visitor's token, so ZeroGPU time and any overage bill to the visitor, not the Space owner. The Space has no `HF_TOKEN` secret.
- ZeroGPU is **free** but **queued and quota-limited** β€” not unlimited.
- Each segment is a separate upstream call; longer videos = more waits.
- If the queue is full or quota exhausted, wait and retry.
## Architecture
```
[Your image] β†’ Generate β†’ clip1.mp4
↓ last frame (or custom upload)
Extend β†’ clip2.mp4 β†’ ffmpeg concat β†’ longer.mp4
↓ …
```
Upstream API: `generate_video` on `kulkas2pintu/wan222` (same endpoint used by Command Center).
## Local files
Source also lives at `/workspace/wan22-extend/` on the agent box for re-push if needed.
Safe snapshot of v1: `/workspace/wan22-extend-snapshots/v1-working-20260922-055108/` (+ `.tgz`).
HF branch `backup-v1-working` is frozen and should not be overwritten.
## License / ToS
Apache-2.0 for this app code. Hugging Face Terms of Service apply to hosted Spaces and ZeroGPU usage.