trip_w_oblaka / README.md
keeendaaa
Add string-based API input to avoid image preprocess errors
9889e92

A newer version of the Gradio SDK is available: 6.13.0

Upgrade
metadata
title: TripoSG Image-to-3D API
emoji: 😻
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
python_version: 3.10.12
pinned: false

TripoSG Image-to-3D API

This Space wraps the official TripoSG pipeline and exposes a /predict API endpoint for programmatic generation of GLB meshes.

API usage

Python:

from gradio_client import Client

client = Client("your-username/your-space")
result = client.predict(
    image_path="input.png",
    seed=0,
    num_inference_steps=50,
    guidance_scale=7.5,
    simplify=True,
    target_face_num=100000,
    api_name="/predict",
)
print(result)

Raw HTTP (example):

curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"data": ["data:image/png;base64,......", 0, 50, 7.5, true, 100000]}' \
  https://your-username-your-space.hf.space/call/predict

The response contains the generated GLB file path and URL.

Notes

  • The Space will clone VAST-AI-Research/TripoSG at runtime and download weights from VAST-AI/TripoSG and briaai/RMBG-1.4.
  • requirements.txt targets the default Hugging Face Spaces GPU runtime (Linux). For local runs, adjust Torch/CUDA and the diso wheel as needed.