Skip to content

trellis2: add trellis.cpp as a second runtime flavor (Windows/Linux, Vulkan/CUDA/ROCm — no Python) #966

Description

@fernandotonon

Follow-up to the TRELLIS.2 backend integration (Python sidecar, ai/trellis2/, audit in docs/trellis2-dependencies.md).

Why

The Python sidecar runs upstream-exact TRELLIS.2 but requires Linux + CUDA + a Python env. pwilkin/trellis.cpp (MIT, C++/GGML) runs the same pipeline on CUDA + Vulkan + ROCm with a CPU fallback, on Windows and Linux, with quantized GGUF weights and no Python — a much better multiplatform story for QtMeshEditor. (Wimacs/trellis2.c is the MIT C alternative; watching it, but trellis.cpp has more traction + per-stage numerical validation vs PyTorch.)

Plan

  • Trellis2Predictor: second runtime flavor — detect a trellis-cli binary (env QTMESH_TRELLIS2_CLI / QSettings ai/trellis2Cli / PATH) alongside the existing Python env; detection order: trellis.cpp → Python sidecar.
  • Upstream PR (the key enabler): an option for trellis.cpp to dump the RAW generation — vertices/faces + the sparse PBR attribute volume — instead of (or in addition to) its own baked GLB, so QtMeshEditor keeps ownership of game-ready processing, UVs, PBR baking, and the preserved re-bakeable source (same QTM3D flow as the Python sidecar). Without it we'd have to ingest their finished GLB and lose Phases 5–9.
  • License audit of the GGUF weight pack (ilintar/trellis2-gguf): confirms the bundled DINOv3 conversion complies with Meta's DINOv3 License (redistribution-with-conditions) and that the background-removal model is the MIT BiRefNet, not CC-BY-NC RMBG-2.0. Extend docs/trellis2-dependencies.md.
  • Same UI/CLI/MCP surface (--backend trellis2 unchanged); progress mapping from trellis.cpp output; cancellation via process kill.
  • scripts/check-trellis2-restricted-deps.sh + Trellis2GuardTest still apply (trellis.cpp is nvdiffrast/nvdiffrec-free by design).

Non-goals

Replacing the Python sidecar (it stays as the upstream-exact reference runtime) or macOS support (tracked separately).

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions