Skip to content

hf space cpu fix & Enhance checkpoint validation and update OpenGL rendering options#8

Merged
lexiyutou merged 19 commits into
mainfrom
ti_dev
May 29, 2026
Merged

hf space cpu fix & Enhance checkpoint validation and update OpenGL rendering options#8
lexiyutou merged 19 commits into
mainfrom
ti_dev

Conversation

@lexiyutou
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and fixes to the PRIMA demo, focusing on better progress reporting in the Gradio interface, improved OpenGL backend selection for rendering, consistent checkpoint naming, and enhanced checkpoint validation. It also updates documentation and example scripts to reflect these changes.

User experience and progress reporting:

  • Added real-time progress updates to the Gradio demo by introducing a progress_callback mechanism in _collect_animal_results, which reports the current processing stage (e.g., detection, rendering, TTA) to the user. This makes long-running inferences more transparent and user-friendly. (app.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Rendering and environment compatibility:

  • Improved OpenGL backend selection for headless environments by preferring EGL over OSMesa when available, increasing compatibility with pyrender and reducing rendering errors in cloud or containerized deployments. (prima/utils/mesh_renderer.py, prima/utils/renderer.py) [1] [2]

Checkpoint management and validation:

  • Standardized Stage 3 checkpoint naming to s3ckpt_inference.ckpt throughout the codebase, scripts, and documentation for consistency and to avoid confusion. (prima/utils/weights.py, demo.sh, demo_tta.sh, README.md) [1] [2] [3] [4] [5] [6]
  • Enhanced checkpoint validation by checking for corrupt zip members and supporting the new weights_only argument in torch.load for more robust and informative error handling. (prima/utils/weights.py)

Documentation and examples:

  • Updated documentation to reflect the new checkpoint naming and added a reference to the SAM3DB project. (README.md) [1] [2]
  • Adjusted Gradio example parameters and default TTA iterations for a better out-of-the-box experience. (app.py) [1] [2]
  • Ensured the model is moved to the correct device in evaluation scripts. (eval.py)
  • Set minimum Python version to 3.10 in the project metadata. (pyproject.toml)

@lexiyutou lexiyutou requested a review from xiu-cs May 28, 2026 15:17
Comment thread prima/utils/renderer.py
Comment thread app.py
@lexiyutou lexiyutou merged commit fc96145 into main May 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants