umer1995's picture
Fun CN: fp8 stream DiT + local bnb4 TE + xlarge (no bf16 host dump / no remote TE)
f0a4e91 verified
|
Raw
History Blame Contribute Delete
1.64 kB
---
title: NFA Track R FLUX.2 Fun CN ZeroGPU
emoji: 🎬
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: "5.49.1"
app_file: app.py
pinned: false
license: other
short_description: Real Fun depth ControlNet fp8+xlarge (NOT soft image=depth)
---
# Track R — FLUX.2 Fun depth ControlNet (ZeroGPU)
**Hard rule:** This Space runs **real** ALIMAMA / VideoX-Fun Fun ControlNet Union depth.
Soft Flux2 `image=depth` is **banned forever** on this path.
## Stack (2026-07-21 host-RAM fix)
| Piece | Value |
|---|---|
| Painter | FLUX.2-dev DiT **streamed to float8** (never full bf16 host materialize) |
| CN | VideoX-Fun `Flux2ControlPipeline` + `FLUX.2-dev-Fun-Controlnet-Union-2602` |
| TE | **Local** quantized `diffusers/FLUX.2-dev-bnb-4bit` (NO HF remote TE) |
| GPU | `@spaces.GPU(duration=300, size="xlarge")` = **96GB** @ **2×** Pro minutes |
| Memory mode | `model_cpu_offload_and_qfloat8` (weights already fp8 at load) |
| Weights | HF Mount `/data/FLUX.2-dev` + `/data/Fun-CN` (+ TE download/cache) |
| Abort | `NFA_FUN_CN_LOAD_DEADLINE_SEC` (default 480) if `Fun CN loaded` not reached |
Requires Space secret **`HF_TOKEN`** (gated FLUX.2-dev license accepted on the account).
## Env
| Var | Default |
|---|---|
| `NFA_FUN_CN_GPU_SIZE` | `xlarge` |
| `NFA_FUN_CN_MEM_MODE` | `model_cpu_offload_and_qfloat8` |
| `NFA_FLUX2_TE_MODEL_ID` | `diffusers/FLUX.2-dev-bnb-4bit` |
| `NFA_FUN_CN_LOAD_DEADLINE_SEC` | `480` |
## API
Same client contract: `/generate_still`
(`positive`, `negative`, `depth_image`, `seed`, `width`, `height`, `steps`, `guidance`, `cn_strength`)
Depth is **required**. Soft depth is never used.