Commit History
-
Reject empty inputs with gr.Error instead of crashing Running
mafeibiaoThe four pipeline stages are separate buttons with no chaining, so clicking them out of order hands None / "" to the handlers and produces a 500 with no indication of what went wrong. Observed in the Space logs: app.py:72 Image.fromarray(image) AttributeError: 'NoneType' has no attribute '__array_interface__' -> "Convert" pressed with no reference image infer_api.py:709 imgs = [cv2.imread(img[0])[:, :, ::-1] for img in imgs] TypeError: 'NoneType' object is not iterable -> "Reconstruct" pressed with an empty gallery app.py:116 cache_multiview[0][image_hash]["images"][0] KeyError: '' -> "Refine" pressed before the multi-view step ran, so the gr.State still holds its "" initial value Each handler now validates its inputs up front and raises gr.Error, which Gradio surfaces as a message telling the user which step to run first. Verified under gradio 5.38.2 with the values Gradio actually passes: an empty Gallery arrive…8705ae6 -
Disable xformers FlashAttention-3 backend on Hopper
mafeibiaoThe canonicalization stage died on the very first denoising step: 0%| | 0/40 [00:00<?, ?it/s] CUDA error (/__w/xformers/xformers/third_party/flash-attention/hopper/ flash_fwd_launch_template.h:188): invalid argument The "hopper/" path means the FlashAttention-3 kernel was launched. Reading xformers 0.0.32.post2 dispatch.py, FA3 is enabled by default and is placed first in the priority list on any Hopper GPU: _USE_FLASH_ATTENTION_3 = True def fa3_available(): is_90a = has_cuda and torch.cuda.get_device_capability() >= (9, 0) return is_90a and flash3._C_flashattention3 is not None def _dispatch_fw_priority_list(inp, needs_gradient): flash3_op = [flash3.FwOp] if _get_use_fa3() else [] priority_list_ops = deque(flash3_op + [flash.FwOp, cutlass.FwOp]) ZeroGPU runs on H200 (sm90), so FA3 gets picked. flash3.FwOp's not_supported_reasons() does not reject these inputs, so the dispatcher never falls back -- it laun…7e165eb -
Pin Gradio SDK to 5.38.2 instead of 5.50.0
mafeibiao5.50.0 fixed the api_info schema crash but broke the import chain: gradio >= 5.41.1 requires huggingface-hub >= 0.33.5, which makes the huggingface_hub==0.29.3 pin in pre-requirements.txt unsatisfiable. pip resolved that by upgrading the hub, and 5.49.0+ widened the ceiling to <2.0, so it landed on huggingface-hub 1.30.0. transformers 4.42.4 caps it at <1.0 and refuses to import: ImportError: huggingface-hub>=0.23.2,<1.0 is required for a normal functioning of this module, but found huggingface-hub==1.30.0 huggingface-hub constraint per gradio release (from PyPI metadata): 5.20.1 .. 5.38.2 >=0.28.1 <- 0.29.3 is fine 5.41.1 .. 5.46.1 >=0.33.5,<1.0 5.49.1 .. 5.50.0 >=0.33.5,<2.0 <- pulls hub 1.x The schema fix turns out to predate all of this. Probing the failing schema shape against each gradio_client release: 1.7.2 (gradio 5.20.1) TypeError 1.8.0 (gradio 5.23.3) OK <- fix landed here 1.11.0 (gradio 5.38.2) OK 5.38.2 is …6140a09 -
Bump Gradio SDK to 5.50.0 to fix api_info schema crash
mafeibiaoGET / returned 500 on startup, which made launch() conclude localhost was unreachable and abort with: ValueError: When localhost is not accessible, a shareable link must be created. The 500 came from get_api_info(): gradio_client/utils.py:993 _json_schema_to_python_type(schema['additionalProperties'], defs) gradio_client/utils.py:898 if "const" in schema TypeError: argument of type 'bool' is not iterable gradio_client recurses into `additionalProperties` unconditionally, so a schema carrying `additionalProperties: true` (a bool, not a sub-schema) reaches get_type() as a bool. Newer gradio_client special-cases it: if isinstance(additional_properties, bool) and additional_properties: des += ["str, Any"] Verified locally against the exact failing schema shape: gradio_client 1.7.2 (shipped with gradio 5.20.1) -> TypeError (reproduces) gradio_client 1.13.3 -> OK gradio_client 1.14.0 (shipped with gradio 5.50.0) -> OK …e30a60f -
Defer FlexiCubes geometry init into the ZeroGPU worker
mafeibiaoinit_flexicubes_geometry() builds a NeuralRender, which constructs an nvdiffrast RasterizeCudaContext. That requires a real CUDA device, but on ZeroGPU the main process has no GPU attached -- only @spaces.GPU functions run with one. Calling it at import time raised: torch.AcceleratorError: CUDA error: no CUDA-capable device is detected at dr.RasterizeCudaContext(device=device) (neural_render.py:74) Replace the module-level call with a lazy, idempotent _ensure_slrm_geometry() invoked at the top of the two @spaces.GPU entry points that reach self.geometry (infer_slrm_make3d -> forward_planes, infer_slrm_make_mesh -> extract_mesh). This was the only module-level CUDA-context creation left; every other NormalsRenderer/RasterizeCudaContext construction already sits inside a @spaces.GPU function or in a standalone CLI script not imported by app.py.427385d -
Fix nvdiffrast ABI mismatch with torch 2.8
mafeibiaoThe vendored package/nvdiffrast-0.3.1.torch wheel ships a plugin .so compiled against torch 2.2 libtorch, which fails on torch 2.8 with "undefined symbol: _ZN3c104cuda9SetDeviceEi". - app.py: drop the runtime `pip install pip==24.0` and the `pip install package/nvdiffrast-...whl --force-reinstall --no-deps` calls. The --force-reinstall was overwriting any correct version installed at build time. Also drop the now-unused shlex import. - requirements.txt: install nvdiffrast 0.4.0 built for pt2.8.0/cu128 from the torch_packages_builder index instead. Remove the redundant torch/torchvision pins, which are already pinned against the cu128 index in pre-requirements.txt. nvdiffrast API used by this repo (RasterizeCudaContext, rasterize, interpolate, DepthPeeler, antialias) is unchanged in 0.4.0.34d75c9 -
Update pre-requirements.txt
Verified signature修改依赖eb85b50 -
Update requirements.txt
Verified signature修改依赖0ce8a56
-
fixes 500 error for some users (#2)
Verified signature- fixes 500 error for some users (906e4ee04a5b446cfe0a62057ef0bc5229be8131) Co-authored-by: Joseph [open/acc] Pollack <Tonic@users.noreply.huggingface.co>e1cbb1e -
update
bc5114d -
add case
1d2aa9f -
bug fixed
4b04e0b -
hash changed
01416ea -
bug fixed
522a413 -
update
d8f0376 -
update
914c133
-
update
e6f7ceb -
update
6f8045f -
update
424c7ef -
update
216a665
-
update
f1e6905 -
update
c794eba -
update
508502c -
update
068de59 -
update
65b1e2e -
update
fdc86f3 -
update
76fcd25 -
update
e82e682 -
update
ccc749d -
update
402acb5 -
update
be12b94 -
update
13973ba -
update
cfae272 -
update
af77592 -
Update requirements.txt
Verified signature138a3dc -
Update infer_api.py
Verified signature8629ffb -
Update pre-requirements.txt
Verified signature9d6a6e1 -
Update app.py
Verified signatureeae4248 -
Update app.py
Verified signaturef4f1e38 -
Rename package/nvdiffrast-0.3.1-cp310-cp310-linux_x86_64.whl to package/nvdiffrast-0.3.1.torch-cp310-cp310-linux_x86_64.whl
Verified signaturefa13f8e -
Rename package/nvdiffrast-0.3.1.torch-cp310-cp310-linux_x86_64.whl to package/nvdiffrast-0.3.1-cp310-cp310-linux_x86_64.whl
Verified signature5d2c2c3 -
Update app.py
Verified signatureadadfb3 -
Update app.py
Verified signature2a28342 -
update
c4940f9 -
update
2336000 -
Update app.py
Verified signature1800753 -
Upload nvdiffrast-0.3.1.torch-cp310-cp310-linux_x86_64.whl
Verified signature3ccf54b -
update
908a013 -
update
d2d74f0 -
Merge branch 'main' of hf.co:spaces/hyz317/StdGEN into main
bfc6073