Spaces:
Running on Zero
Running on Zero
Commit History
-
Add the Gradio and Rerun application
app.py is the Hugging Face entrypoint and imports nothing but the standard library. fdanyone_app.py is everything else: CPU validation, the two ZeroGPU callbacks, the Rerun choreography, and the interface. prepare_run and generate_run are single blocking calls that report progress through synchronous hooks, so each GPU callback runs its pipeline call on a worker thread and yields BinaryStream.read() as the hooks fill an explicit RecordingStream. Yielding from inside a hook is impossible and yielding after the call returns would leave the viewer blank for minutes; an explicit recording rather than a thread-local one is what makes the cross-thread logging safe. Both workers run inline because a forked child would lose the ZeroGPU allocation. The viewer's layout switches with the run -- detections over the source clip, then a grid of per-step TAEW2.2 previews on a diffusion_step timeline, then the camera rig and the six results looping on frame. Each layout is sent with make_active=True…7580dd2