Spaces:
Configuration error
Configuration error
Commit History
-
Fix Genesis from_torch patch: avoid torch ops on genesis tensors inside ZeroGPU
Wei Liu +1: Claude Sonnet 4.6The previous patch used gs_tensor.clone() which triggers __torch_function__ on a genesis.grad.Tensor. Inside a ZeroGPU GPU slot, spaces/zero/torch/ patching.py intercepts __torch_function__ and then PyTorch's _convert() calls ret.as_subclass(genesis.grad.Tensor), which hits the same "already associated" error. Fix: do all tensor ops (to, clone, detach) on plain torch.Tensor BEFORE wrapping as a genesis.grad.Tensor via _make_subclass. No torch operations are ever called on the genesis tensor inside from_torch, so ZeroGPU's __torch_function__ interceptor is never triggered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7e09fa7 -
Test commit: check if HF Space restarts on push
Wei Liu +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>de43c55 -
Patch Genesis from_torch to fix PyTorch 2.5 tensor subclass error
Wei Liu +1: Claude Sonnet 4.6In PyTorch 2.5+, torch.Tensor.__new__(SubClass, existing_tensor) raises: "raw Tensor object is already associated to a python object of type Tensor which is not a subclass of the requested type" when the existing TensorImpl's Python wrapper is a plain torch.Tensor (not a subclass of genesis.grad.Tensor). Genesis's from_torch() does exactly this: torch.zeros() → plain tensor, then Tensor(plain_tensor) → fails because plain torch.Tensor is not a subclass of genesis.grad.Tensor. Fix: use torch.Tensor._make_subclass(Tensor, t) which is PyTorch's official API for creating tensor subclass views, bypassing the association check. Patch is applied before startup() runs, so all genesis gs.zeros()/gs.ones() etc. calls use the fixed path. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>2aa6ae4 -
Fix Genesis RuntimeError: don't move simulator tensors to GPU
Wei Liu +1: Claude Sonnet 4.6Genesis uses backend=gs.cpu — all simulation runs on CPU. Moving simulator tensors to CUDA caused two bugs: 1. scene.reset() raises "Tensor subclass already associated" because Genesis internally tries to re-wrap CPU tensors that conflict with our moved CUDA tensors. 2. state.pos from solver.get_state() is always on CPU, so particles_now - init_particles_gpu would be a CPU/CUDA mismatch. Fix: remove simulator.move_to_device() calls. Only the video generator pipeline (transformer, VAE, text encoder) and case data (latents, embeddings) are moved to GPU. Simulation and PyTorch3D rendering stay on CPU throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6dad5cc -
CPU-first startup: load all models/scenes to CPU at module level, GPU transfer at generation time
Wei Liu +1: Claude Sonnet 4.6- startup() now uses device="cpu" for StreamingVideoGenerator and InteractiveSimulator - Added move_pipeline_to_device() to StreamingVideoGenerator - Added move_to_device() to _MinimalSVR and InteractiveSimulator - do_generate() transfers everything to GPU at start, back to CPU in finally - Warmup deferred to first generation call (CUDA kernel compile on GPU) - Avoids ZeroGPU time limit: only fast tensor moves happen inside GPU slot Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>0cdce4a -
Fix TypeError: gr.Group does not accept label argument in gr.update()
Wei Liu +1: Claude Sonnet 4.6gr.update(visible=True, label=...) was passed for Group components but Group.__init__ has no label parameter. Drop the label from group_updates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a1190a9 -
Fix ZeroGPU illegal duration: defer all GPU work to do_generate
Wei Liu +1: Claude Sonnet 4.6- _on_load is now a plain CPU function (no @spaces.GPU): reads configs and preview images from disk, populates cases with lightweight bundles (simulator=None, noise_warper=None) just to render the UI - do_generate lazily calls startup() on first generation within its own existing GPU slot — no separate startup GPU allocation needed - Guard startup() failure: reset _is_generating and yield error message so the user can retry without getting stuck - Guard do_reset and do_generate finally against None simulator/warper (lightweight bundles before first generation) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>074f36e -
Fix ZeroGPU illegal duration: reduce to 240s, download models outside GPU slot
Wei Liu +1: Claude Sonnet 4.6- _on_load duration 900→240 (matches do_generate; 900 exceeds ZeroGPU max) - Call _ensure_models_downloaded() at module level before build_demo() so model files are on disk before the GPU slot is acquired; snapshot_download is pure network/disk I/O that must not consume GPU allocation time Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3ac4bfa -
Fix ZeroGPU Error: make _on_load itself @spaces.GPU instead of calling it
Wei Liu +1: Claude Sonnet 4.6In ZeroGPU, calling a @spaces.GPU function from a non-GPU Gradio event handler raises an error (no GPU context for the caller). The fix: - Remove @spaces.GPU from startup() — make it a plain function - Define _on_load at module level with @spaces.GPU(duration=900) - _on_load calls startup() within its own GPU context, then returns UI updates to populate the dropdown, prompt, and force controls Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5c61cbc -
Fix empty scene dropdown on ZeroGPU: move startup into demo.load()
Wei Liu +1: Claude Sonnet 4.6@spaces.GPU functions called at module-import time on ZeroGPU silently skip their body because no GPU allocation context exists yet. Moving startup() into a demo.load() event handler (the proper ZeroGPU entry point) ensures it runs with GPU access and cases dict is populated before the UI renders. Also add _startup_lock to prevent duplicate initialization if multiple users load the page concurrently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>50695ea -
Fix 3 bugs and remove tracked sim_tmp runtime files
Wei Liu +1: Claude Sonnet 4.6- taehv.py: fix broken forward() calling non-existent self.c → self.decode_video(x) - case_handlers/persimmon.py: fix off-by-one (>5 → >=5) so forces apply for exactly first 5 steps - app.py: fix race condition — move cases validity check inside _gen_lock before setting _is_generating=True - Remove 1676 sim_tmp runtime files from git tracking (already covered by .gitignore) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>21dc758 -
Patch gradio_client boolean schema bug at import time
Wei Liu +1: Claude Sonnet 4.6gradio_client._json_schema_to_python_type() calls get_type(schema) without checking if schema is a bool. JSON Schema allows boolean schemas (e.g. additionalProperties: false). This crashes every /info API request. Monkey-patch _json_schema_to_python_type before gradio initializes to short- circuit boolean schemas early. Wrapped in try/except so it's a no-op if the upstream bug is ever fixed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>476a767 -
Bump gradio sdk_version 5.9.1 → 5.14.0 to fix gradio_client schema bug
Wei Liu +1: Claude Sonnet 4.6gradio_client 5.9.1 crashes with: TypeError: argument of type 'bool' is not iterable in get_type() when schema is False (additionalProperties: false). This was fixed in later 5.x releases. sdk_version in README.md controls which gradio HuggingFace installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>5a4b682 -
Pin pymeshlab==2023.12.post3 (newest version with cp310 wheel)
Wei Liu +1: Claude Sonnet 4.62025.7.post1 only ships cp311+ wheels so HuggingFace (Python 3.10) silently kept the old deployment. 2023.12.post3 is the newest release with a cp310 manylinux_2_31 wheel and has meshing_isotropic_explicit_remeshing (added in 2022.2). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a2cef06 -
Pin pymeshlab==2025.7.post1 to match local working version
Wei Liu +1: Claude Sonnet 4.6Genesis does not pin pymeshlab, so HuggingFace resolves an older version that lacks meshing_isotropic_explicit_remeshing (added in 2022.2). 2025.7.post1 is the version verified to work locally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8e78b24 -
Fix EGL/OpenGL unavailable for Genesis headless rendering
Wei Liu +1: Claude Sonnet 4.6Genesis builds a pyrender OffscreenRenderer even with show_viewer=False, which requires EGL. In the HuggingFace container EGL was missing: - Add libegl1 + libegl-mesa0 to packages.txt - Set PYOPENGL_PLATFORM=egl in app.py before any imports Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>18a8cde -
Fix checkpoint discovery: use rglob instead of glob
Wei Liu +1: Claude Sonnet 4.6The checkpoint is nested under a subdirectory: ckpts/Realwonder-Distilled-AR-I2V-Flow/sink_size=1-.../step=000800.pt glob("*.pt") only searches one level deep; rglob("*.pt") finds it correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>337b6a6 -
Add torchvision==0.20.1 (companion to torch 2.5.1)
Wei Liu +1: Claude Sonnet 4.6torchvision was dropped when the pinned torch block was cleaned up. Required by simulation/utils.py for torchvision.io.write_video. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>572cd89 -
Pin torch==2.5.1 (no +cu121 suffix) for ZeroGPU compatibility
Wei Liu +1: Claude Sonnet 4.6ZeroGPU matched torch 2.9.1 by default, but flash_attn prebuilt wheels only go up to torch 2.8. Pin to 2.5.1 (explicitly supported by ZeroGPU, and the version flash_attn + pytorch3d wheels are built for). Use bare version number without +cu121 suffix — ZeroGPU matches on base version only. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>fab71cb -
Fix scipy version: 1.17.0 does not exist, use 1.15.3
Wei Liu +1: Claude Sonnet 4.6scipy==1.17.0 is not a valid release (latest for Python 3.10 is 1.15.3). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>d0de6c1 -
Fix ZeroGPU configuration: remove pinned torch, fix flash_attn Python version
Wei Liu +1: Claude Sonnet 4.6- Remove torch==2.5.1+cu121 and cu121 extra-index-url: ZeroGPU pre-installs PyTorch and rejects pinned CUDA-suffixed versions ("No candidate PyTorch version found for ZeroGPU") - Update flash_attn wheel from cp311 to cp310: ZeroGPU supports Python 3.10 and 3.12, not 3.11 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b949ee6 -
Migrate to Gradio SDK with ZeroGPU + H200 support
Wei Liu6f37a6b
-
load all cases at first
Wei Liube5c767 -
prepare environment
Wei Liub0483fa
-
init huggingface deployment
Wei Liufc36e06