Spaces:
Running on Zero
Running on Zero
Commit History
-
Video modal: show loading spinner during generation, make it closable Running
- Modal now opens in a loading state (spinner + stage text) instead of an empty video box, with stage updates (preparing/fetching end frame/connecting to Wan/finalizing) and a 12s heartbeat noting the remote model is still working. - Video element swaps in only once the URL is ready. - Closable three ways: ✕ button, click on the dimmed backdrop, or Escape key. closeVideoModal() also resets to loading state so a reopen starts clean, and auto-closes on failure instead of leaving an empty box. Co-Authored-By: GLM 5.2 <noreply@zai.org>57b1995 -
Fix turn_into_video: normalize Wan return shape + serve video locally
Backend: Wan's /generate_video returns (video, seed) where video may be a dict ({video: path}) or a bare string depending on gradio_client version — the old video_path['video'] assumed a dict and crashed with 'string indices must be integers'. Normalize to a single path robustly. Then copy the file into our own outputs/ dir (it lives in the Wan Space's temp dir, not served by this app) and return FileData pointing at the local copy, served via the /outputs mount. Frontend: resolve video URL with absURL(fd.url || fd.path), log raw result, and call video.load() after setting src. Handle both FileData and string shapes. Co-Authored-By: GLM 5.2 <noreply@zai.org>f074c20 -
Serve outputs/ (not tempfiles) + harden frontend URL extraction & logging
Backend: revert to saving outputs to outputs/ and returning FileData(path=...). On ZeroGPU the @spaces.GPU worker can be torn down right after the call, deleting tempfiles before the browser fetches their URL -> broken image. outputs/ is persistent in the app dir and Gradio serves it via file protocol. Frontend: log the raw predict() result and parsed results to console so we can see the actual data shape / URL. Normalize result extraction (handle both [images, seed] and object shapes). Add absURL() to resolve relative Gradio file paths against the origin, and onerror handlers on the preview image to surface load failures instead of a silent broken icon. Co-Authored-By: GLM 5.2 <noreply@zai.org>b27b052 -
Fix transformer pos_embed crash and frontend submit().on() error
Backend: load base Qwen-Image-Edit-2511 transformer weights into our custom QwenImageTransformer2DModel class (its pos_embed/QwenEmbedRope has the (img_shapes, txt_seq_lens, device) signature our pipeline calls; diffusers' built-in class has a different arg order, causing 'got multiple values for argument device'). Same public repo, no 401; FA3 still disabled. Frontend: CDN client's submit().on() isn't a function in this build — switch to the documented predict() API (still routes through the queue). Live step fraction unavailable, so progress shows an indeterminate bar + 'Generating…'. Removed now-unused onStatus handler. Co-Authored-By: GLM 5.2 <noreply@zai.org>e6b651d -
Trim UI to original feature set (remove zoom, multi-gen, dice buttons, tabs)
Cut everything that wasn't in the original gr.Blocks app to avoid UI overload: - viewport zoom controls (toolbar + zoom bar) - num_images_per_prompt slider (original had no UI for it; backend default 1 preserved) - Random-dice and Reuse-last-seed buttons (original only had seed + randomize checkbox) - New / Clear All / Generate Video menubar items - viewport tabs (slot thumbnails already preview inputs) - per-thumb 'set as Image 2' action (original only did output -> Image 1) Kept: 2 image slots, prompt + generate (Cmd/Ctrl+Enter), steps/cfg/randomize, output size (auto/custom), seed, result gallery, use-as-input, history (click->Image 1, clear), turn-into-video, download result, progress + queue. Co-Authored-By: GLM 5.2 <noreply@zai.org>702b146 -
Switch to gradio.Server with Photoshop-style studio UI
Replace gr.Blocks UI with gradio.Server (FastAPI + Gradio API engine). infer and turn_into_video are now @app.api endpoints (queued, concurrency- controlled, gradio_client-compatible); index.html is served via @app.get('/') as a custom vanilla HTML/CSS/JS frontend that talks through the Gradio JS client so requests flow through the queue with live progress and queue position. New studio UI: menubar, left toolbar, tabbed viewport with zoom + progress card, right properties panel (image slots with drag-drop, prompt, generation sliders, output size Auto/Custom, seed tools, persistent localStorage history), status bar, and a video modal. Adds a num_images_per_prompt slider (previously hardcoded to 1). All original inference, diagnostics, video, and output-naming behavior is preserved. Co-Authored-By: GLM 5.2 <noreply@zai.org>6f0b1e3