Rebuild the Foley Space to fit a free ZeroGPU quota
Alexander+1: Claude Opus 5 (1M context)
bbd4bcf
The reference Space (hugging-apps/ltx-foley-v2a) cannot run on a free account
at all: it declares duration=310 against a 300 s/day quota, and downloads ~70 GB
of weights. Three changes bring a run down to an estimated 30-50 s of GPU time.
Resident weights. Almost all of the reference's ~265 s per run is weight
streaming, not diffusion -- every class in ltx_pipelines.utils.blocks builds its
model inside __call__ and frees it via gpu_model() on exit. Each model is now
built once at module scope (also what ZeroGPU wants, since it forks a worker per
call) with dispose() shadowed by a no-op.
Distilled + fp8. ltx-2.3-22b-distilled-fp8 runs 8 steps at CFG=1 instead of 30
steps with CFG+STG, and loads 29.5 GB instead of 46.1 GB. Uses fp8-scaled-mm
rather than fp8-cast so the checkpoint's per-tensor scales survive and
torch._scaled_mm runs natively on Blackwell.
Smaller inputs. Gemma-3-12B comes from a pre-quantized NF4 repo (7.8 GB vs
24.4 GB) through PromptEncoder's text_encoder_builder ho…