Spaces:
Running on Zero
Running on Zero
Commit History
-
fix: replace mmengine set_random_seed import with local impl (avoids PyTorch JIT LaTeX bug)
03bd4d5 -
fix: set num_workers=0 for ZeroGPU daemon process compatibility
ce2cdf0
-
fix: from_pretrained must be a .pt file, not model/ dir
load_checkpoint expects a .pt/.pth file or a colossalai-sharded dir. The HF repo's model/ dir is pytorch_model-*.bin (HF sharding), which load_checkpoint misreads as .../model/model and fails. So only accept ema.pt; if missing, raise with a listing of the ckpt dir for diagnosis instead of silently falling back to the unusable model/ dir.a7d5aa3 -
fix: disable apex FusedLayerNorm (use nn.LayerNorm)
Configs set enable_layernorm_kernel=True which requires apex; apex is hard to build on the Space. Recursively set enable_layernorm_kernel=False in run_inplace so it falls back to nn.LayerNorm (same math, no result change). Co-Authored-By: Claude <noreply@anthropic.com>0030520 -
fix: resolve model.from_pretrained placeholder
Co-Authored-By: Claude <noreply@anthropic.com>7769d41 -
fix: move inference in-process to avoid ZeroGPU SIGSEGV (-11)
ZeroGPU's GPU allocation is bound to the main (Gradio) process. Launching inference via subprocess.Popen left the child's CUDA context untracked by the scheduler, which revoked it ~4min in → SIGSEGV in wrapper.py. - inference_magicdrive.py: add run_inplace()/_init_once()/_get_logger()/ _clear_global_hydra() for in-process inference with global model caching. dist.init_process_group guarded (not idempotent) + env:// instead of fixed tcp://localhost:12355; Hydra GlobalHydra cleared per call; logger handlers not leaked; coordinator.destroy() not called per request. main() untouched → local torchrun path unchanged. - app.py: replace subprocess.Popen block in run_inference with a direct call to run_inplace; progress driven via callback. UI, _runtime_setup, download_weights, check_env, environment vars all unchanged. Co-Authored-By: Claude <noreply@anthropic.com>cbc51a7
-
Fix numpy version conflict: numpy<2.0 + pickle compat shim
- Revert numpy to >=1.26,<2.0 (matplotlib etc require numpy 1.x) - Add sys.modules shim in inference_magicdrive.py to load numpy 2.x pickles2a279c8 -
init
8056602