TRELLIS.2 / README.md
choephix's picture
Update default maximum concurrent jobs to 8 for improved performance
c08e8d5
metadata
title: TRELLIS.2
emoji: 🏢
colorFrom: purple
colorTo: red
sdk: docker
sdk_version: 6.1.0
app_file: server.py
pinned: false
license: mit
short_description: High-fidelity 3D Generation from images

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

API endpoints:

  • POST /v1/image-to-glb - create an async GLB generation job
  • GET /v1/jobs/{job_id} - poll job status
  • GET /v1/jobs/{job_id}/result - download the GLB when ready

Concurrency:

  • Job execution uses a worker pool sized by MAX_CONCURRENT_JOBS
  • Default is 8, matching the Space image env
  • Override MAX_CONCURRENT_JOBS if your GPU cannot hold multiple loaded pipelines or if you want higher concurrency

Example:

job_json=$(curl -s -X POST "http://localhost:7860/v1/image-to-glb" \
  -F 'image=@input.png' \
  -F 'request={"generation":{"resolution":"512"},"export":{"remesh":true}}')

job_id=$(python3 -c 'import json,sys; print(json.load(sys.stdin)["job_id"])' <<<"$job_json")

curl -s "http://localhost:7860/v1/jobs/$job_id"
curl -L "http://localhost:7860/v1/jobs/$job_id/result" --output output.glb