Spaces:
Running on Zero
Running on Zero
Commit History
-
Fix regression: drop track_tqdm=True reintroduced by the mypy-strict merge (#64)
#33 (commit 629c301) removed gr.Progress(track_tqdm=True) because it globally monkey-patches tqdm and picks up TorchInductor's own compilation progress bars, garbling the Gradio UI. That fix was silently reverted when the add-mypy-strict-typecheck branch — forked before #33 landed — merged its stale copy of these two default arguments back into develop. The callback_on_step_end mechanism #33 added for generation-stage progress was untouched by that merge; only the track_tqdm flag came back. Fixes #64. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>fed3939
-
Restore the .change() type: ignore removed during the develop merge
mypy without gradio installed treats it as untyped Any (ignore_missing_imports), which made the ignore comment look unused locally. CI installs gradio for real, where the base Component type genuinely lacks .change(), so the suppression is required there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>68273f5 -
Merge remote-tracking branch 'origin/develop' into add-mypy-strict-typecheck
# Conflicts: # app.py # postprocess/interpolation.py # postprocess/upscale/upscale.pyc8ec0f7 -
Build a tensor-only RIFE -> upscale pipeline (#53)
Interpolation can now hand upscale (C,H,W) fp16 GPU tensors directly instead of round-tripping every frame through CPU numpy in between, when both stages run in the same @spaces.GPU allocation. The "no upscale" and "no interpolation" paths are unchanged. Adds a print_frames_info log line after interpolation so the handoff mode (tensor vs. numpy) is visible in production logs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>fed6bc3 -
Remove redundant numpy->PIL->numpy round trip between interpolation and upscale
upscale_frames (and _frames_to_tensor) now accept the numpy float32 [0,1] (H,W,C) frames that _apply_interpolation already produces directly, instead of requiring a PIL.Image round trip solely to cross the function boundary. export_to_video accepts numpy or PIL either way, so the PIL detour bought nothing but two CPU-side per-pixel conversions and a PIL allocation per frame. Part of #47, closes #49. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>55d9178 -
Log the final served video, not the pre-upscale result (#46)
Unverified signature* Sync develop into main (#43) * Check Upscale 4x by default and drop model name from its label (#19) Simplifies the option to a plain checkbox toggle without exposing the underlying model name in the UI. Claude-Session: https://claude.ai/code/session_01W9GLmk1R3mFfb7otDoGiWX Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> * Add detailed export/traceback logging to diagnose post-pipeline UI errors (#20) The Space logs cut off right after the pipeline stages finish, with no trace of what happens next in generate_video() (export_to_video and the run_inference call boundary), even though the UI shows a generic Error. Log frame metadata and full tracebacks at those points so the next failure is diagnosable from the Space logs alone. * Pre-download RIFE/upscale weights at startup instead of inside @spaces.GPU (#22) The RIFE and 4xLSDIRCompact weight fetches are pure network/disk I/O with no CUDA dependency, but were only downloaded lazily on first use inside the metered @sp…3d9fab2
-
Prune log repo on file count, not just storage size (#44)
Unverified signatureThe Hub commit endpoint rejects pushes once a directory holds more than 10000 files. Storage-size-only retention didn't bound this: data/ and images/ files are tiny relative to videos/, so thousands of stems accumulated in those directories long before the byte cap ever triggered a prune, eventually hitting the Hub's per-directory limit. Add a LOG_MAX_FILES cap (default 8000 stems) that prunes alongside the existing LOG_STORAGE_CAP_GB, whichever is hit first. Claude-Session: https://claude.ai/code/session_01WHfM7C6kNJh15dWfYt8agd Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>4578f11
-
Fix deploy crash: gr.Image doesn't accept an info kwarg in Gradio 6.0.1 (#42)
Unverified signatureTypeError: Image.__init__() got an unexpected keyword argument 'info' on Space startup. Unlike gr.Slider/gr.Dropdown, gr.Image has no info param in this Gradio version — fold the hint into the label instead. Claude-Session: https://claude.ai/code/session_01929npp9MCfTtGF4tyfEE5n Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>4aabec2 -
Support specifying an end frame (last image) for I2V generation (#41)
Unverified signatureMirrors wan2-2-i2v-v3's Last Image input: adds an optional end-frame upload in Advanced Settings, resized/cropped to match the input image's dimensions, and passes it through to WanImageToVideoPipeline(..., last_image=...). This repo pins the same diffusers==0.38.0 as the reference project, so the pipeline already supported last_image — it just wasn't wired up here. Closes #40. Claude-Session: https://claude.ai/code/session_01929npp9MCfTtGF4tyfEE5n Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>7270705
-
Stop Inductor compilation progress from leaking into the Gradio UI (#33)
Unverified signaturegr.Progress(track_tqdm=True) monkey-patches tqdm globally, so it was picking up TorchInductor's own "Inductor Compilation" progress bars (triggered by torch.compile on the upscale model, and by the quantized transformer/text_encoder) regardless of their own disable flag. Drop track_tqdm and report the generation stage's progress explicitly via callback_on_step_end instead, matching the interpolation/upscale stages.629c301 -
Add liability disclaimer to the Space UI (#30)
Unverified signatureNotes that outputs are provided "as is" and that users are solely responsible for generated content and how it's used/shared. Claude-Session: https://claude.ai/code/session_015woCw9matvyXW3Xnx2JwXG Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>de8e11b -
Add mypy --strict type-check CI gate on every PR
Annotates the previously-untyped functions in app.py, model/pipeline.py, and postprocess/interpolation.py, fixes the couple of real bugs strict type-checking surfaced (deprecated Image.LANCZOS constant, an int-or-None mixing in preview_effect, a numpy float**float Any leak), and adds a pyproject.toml mypy config that exempts vendored third-party files instead of relaxing strictness project-wide. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CRfYRYPEtM8UA6mtHoKL422682589 -
Pre-download RIFE/upscale weights at startup instead of inside @spaces.GPU (#22)
Unverified signatureThe RIFE and 4xLSDIRCompact weight fetches are pure network/disk I/O with no CUDA dependency, but were only downloaded lazily on first use inside the metered @spaces.GPU allocation — costing a few seconds of ZeroGPU quota on every cold container start. Move both fetches to app startup (alongside load_pipeline()), mirroring how the main video model is already preloaded. Claude-Session: https://claude.ai/code/session_011keM1seSWsBZqPHrzKTeCG Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>7123409 -
Add detailed export/traceback logging to diagnose post-pipeline UI errors (#20)
Unverified signatureThe Space logs cut off right after the pipeline stages finish, with no trace of what happens next in generate_video() (export_to_video and the run_inference call boundary), even though the UI shows a generic Error. Log frame metadata and full tracebacks at those points so the next failure is diagnosable from the Space logs alone.ab3b519 -
Check Upscale 4x by default and drop model name from its label (#19)
Unverified signatureSimplifies the option to a plain checkbox toggle without exposing the underlying model name in the UI. Claude-Session: https://claude.ai/code/session_01W9GLmk1R3mFfb7otDoGiWX Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>441c4d5 -
Add in-app privacy notice for debug logging (closes #14) (#15)
Unverified signatureThe debug-logging pipeline (LOG-1-9, #13) was only documented for operators in README.md; end users of the Space saw no disclosure that their image/video/prompts may be logged when enabled. Add an in-app notice + Privacy Policy accordion, based on legitimate interest (GDPR Art. 6(1)(f)), mirroring the FireRed-Image-Edit-1.0-Fast reference project's equivalent notice. Logging itself is unchanged — still a silent no-op unless LOG_HF_TOKEN/LOG_DATASET_REPO are set. Claude-Session: https://claude.ai/code/session_01N8KBjSiiW8dPZc9KZru96q Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>2a6abee
-
Add optional debug logging pipeline (LOG-1–LOG-9) (#13)
Unverified signatureEach inference call can optionally be logged to a private HF Hub dataset repo for debugging, gated entirely by LOG_HF_TOKEN/LOG_DATASET_REPO (silent no-op when unset). Adapted from the FireRed-Image-Edit-1.0-Fast reference pattern for video: logged media (input image, pre-upscale output video) is referenced by path rather than embedded as bytes, and retention is a total-storage-size cap (LOG_STORAGE_CAP_GB) rather than a file-count limit, with oldest entries pruned first once exceeded. Uploads are batched and committed asynchronously (~60s) so logging never adds latency to a generation request. The generation/interpolation/upscale stages of run_inference are each extracted into their own helper function, so the frame/fps state for each stage is assigned exactly once instead of being reassigned across branches. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>e6a95be
-
Move 4x upscaling from CPU to GPU (fixes #11)
Runs upscale_frames() inside run_inference()'s @spaces.GPU call, right after RIFE interpolation, instead of outside it in generate_video(). postprocess/upscale/upscale.py now uses CUDA/fp16 when available (fp32 CPU fallback), matching the RIFE module's device pattern. _gpu_duration adds an upscaling-time estimate when the option is enabled. Avoids contending for the Space's single shared CPU container under concurrent load, at the cost of spending ZeroGPU quota on upscaling. SRS amendment tracked in issue #12.3546667 -
Disable experimental Gradio SSR mode
Gradio 6.0.1's SSR ⚡ (experimental) rendering made the Video/File output components show a bare "Error" badge on load, with no exception in the container logs. Gradio's own startup message points at this: "to disable set ssr_mode=False in launch()". Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>acbba8c -
Wire up graceful degradation and effect preview (FR-7, QF-2, QF-3)
- A failed interpolation or upscaling stage now surfaces a gr.Warning and falls back to the last successfully-produced result instead of discarding the generated video (QF-2). - Adds a live "Output: N frames @ X fps, WxHpx" preview that updates as duration, video fluidity, and upscale settings change, before the user clicks Generate (QF-3). Closes #7 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>9fbf3f5 -
Add 4x super-resolution upscaling stage (FR-4, FR-5, ID-2, CR-2)
postprocess/upscale/: 4xLSDIRCompact (SRVGGNetCompact, num_conv=16) tiled CPU upscaling, vendored from the reference project (inference structure adapted from xinntao/Real-ESRGAN, BSD-3-Clause). Runs after interpolation and outside the @spaces.GPU call, so it never bids for ZeroGPU time. Wired into app.py's "Upscale 4x" checkbox. Also adds .gitignore for __pycache__/ and the RIFE weights downloaded at runtime. Closes #6 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>819311d -
Add RIFE frame interpolation stage (FR-3, FR-5, ID-1)
postprocess/interpolation.py: RIFE v4.26 (thornmaze/RIFE), fp16, 2x/4x/8x multiplier, runs on GPU inside the same @spaces.GPU allocation as generation, wired into app.py's "Video Fluidity" dropdown. Vendors model/warplayer.py, model/loss.py, and model/pytorch_msssim/ from hzwer/Practical-RIFE (MIT) since the downloaded train_log/RIFE_HDv3.py module imports from a sibling `model` package at load time. Closes #5 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>f5e3ffa -
Scaffold baseline I2V generation pipeline (FR-1, FR-2, IF-1, ENV-1, ENV-2)
Non-AOT WanImageToVideoPipeline loading of WAMU_v3, sized/duration helpers, and a Gradio UI for image+prompt input and video preview/download. AOT-compiled inference (FR-6) is deferred until AOT-package compatibility is confirmed (C-2, issue #3). Also adds the HF Space README config front matter, fixing the Space's 'Missing configuration in README' error. Closes #4 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>904e4ad