moge-2-p150 / code /pyproject.toml
changh95's picture
Python API (2026-10-04): pip install -e code/, from_pretrained() + model(...), Python-first quickstart
ea621a3 verified
Raw History Blame Contribute Delete
2.23 kB
# tt-moge: MoGe-2 on Tenstorrent Blackhole, installable on top of an environment that already has ttnn / tt-metal
# (and torch, which comes with ttnn). Only the model's own Python dependencies are declared here.
#
# pip install -e code/ # editable (from the repo root)
# pip install code/ # regular install
# pip install -e "code/[server]" # + the HTTP server's dependencies
#
# NOTE: tt-model's container build copies code/ over /opt/tt-metal, so this file is NOT listed in
# tt-model.yaml source.extra_code (it would replace tt-metal's own pyproject.toml in the image). In the image,
# tt_moge is importable without installing (the tt-metal root is on sys.path).
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"
[project]
name = "tt-moge"
version = "0.2.0"
description = "MoGe-2 monocular metric geometry (depth, point map, normals, intrinsics) on one Tenstorrent Blackhole chip"
readme = { text = "See PYTHON.md in https://huggingface.co/changh95/moge-2-p150", content-type = "text/markdown" }
requires-python = ">=3.10"
license = { text = "Apache-2.0 (port); MIT (vendored microsoft/MoGe and utils3d under tt_moge/reference)" }
keywords = ["tenstorrent", "blackhole", "ttnn", "moge", "depth-estimation", "monocular-geometry", "surface-normals"]
dependencies = [
# ttnn needs numpy < 2
"numpy>=1.26,<2",
"pillow",
"scipy",
"huggingface_hub",
# module-level import of the vendored moge reference (bounded below the numpy-2-only releases)
"opencv-python-headless<4.12",
]
[project.optional-dependencies]
server = ["fastapi", "uvicorn", "pydantic>=2", "isal"]
test = ["pytest"]
[project.urls]
"Model card" = "https://huggingface.co/changh95/moge-2-p150"
"Upstream" = "https://github.com/microsoft/MoGe"
"Port" = "https://github.com/changh95/tt-MoGe"
[tool.setuptools.packages.find]
where = ["."]
include = ["tt_moge*"]
namespaces = false
[tool.setuptools.package-data]
# device kernels and the C++ host kernels are data of the tt_moge package (no __init__.py in those dirs);
# tt_moge/tools_opt (optimization scripts, not a package) is not installed
tt_moge = ["kernels/*.cpp", "kernels/*.hpp", "host_ext/*.cpp"]
"*" = ["*.pyi"]