Spaces:
Running on Zero
Running on Zero
File size: 2,725 Bytes
c36e22e 7e03643 c36e22e 7e03643 c36e22e 7e03643 164ddf4 7e03643 164ddf4 7e03643 94784e6 7e03643 164ddf4 7e03643 | 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 65 66 67 68 69 70 71 72 | ---
title: FrameForge
emoji: 🖼️
colorFrom: purple
colorTo: indigo
sdk: gradio
app_file: app.py
pinned: false
tags:
- ml-intern
- frameforge
- image-editing
- hunyuanvideo
---
[](https://hf.co/chat?mode=ml-intern)
# FrameForge — demo
Unofficial interactive demo for **FrameForge: Harnessing Priors of Video Foundation
Models for Unified Image Generation** ([arXiv 2610.36545](https://arxiv.org/abs/2610.36545)),
built on the authors' released
[inference code](https://github.com/Lyne1/FrameForge) and
[official LoRA weights](https://huggingface.co/lyneeeeeeeee/FrameForge) over
[HunyuanVideo 1.5](https://huggingface.co/tencent/HunyuanVideo-1.5).
Three modes in one model:
- **Instruction-guided editing** — "change the sky to sunset" style edits
- **Subject-driven generation** — place a subject from a photo into a new scene
- **Canny-to-image** — generate from an edge map (auto-extraction available)
## Running it
Built for **ZeroGPU** (`xlarge` slices, 96 GB): generation functions are
decorated with `@spaces.GPU`, and torch is pinned to **2.8.0** (the closest
ZeroGPU-supported version to the authors' 2.6.0 pin). It also runs unchanged
on a persistent GPU (A100 40 GB+ recommended; `FF_OFFLOAD=true` for smaller
GPUs at a large speed cost) — the decorator is a no-op off ZeroGPU.
**First run downloads ~40 GB of checkpoints.** (byt5-small/Glyph-SDXL-v2
from the authors' README are skipped — the released config sets `disable_by5=True`,
so they are never loaded.) On Spaces, attach persistent
storage and set `FF_CKPT_DIR=/data/ckpts` so this happens once.
**Quota note:** a 50-step generation takes a few minutes of GPU time and
`xlarge` consumes 2× daily quota — free accounts (5 min/day) get roughly one
image per day, PRO accounts (40 min/day) get several.
Required secret: `HF_TOKEN` — the pipeline pulls the **gated**
[FLUX.1-Redux-dev](https://huggingface.co/black-forest-labs/FLUX.1-Redux-dev)
vision encoder, so the token's account must have accepted its license.
Useful env vars: `FF_CKPT_DIR` (checkpoint root), `FF_LORA_PATH`,
`FF_REPO_DIR` (code cache), `FF_OFFLOAD` (`true`/`false`).
## Local run
```bash
pip install -r requirements.txt
python app.py
```
## Notes
- Outputs are 512×512; ~50 denoising steps on a video-model backbone, so expect
a couple of minutes per image.
- License: Tencent Hunyuan Community License (see the base model and the
[FrameForge repo](https://github.com/Lyne1/FrameForge)) — review before
redistribution or commercial use.
- If you use this in research, cite the paper: https://arxiv.org/abs/2610.36545
|