Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

4.9 KB
Raw Blame
# Hunyuan3D-2.1 inference stack (torch 2.5.1 / cu124 era). Pinned to Tencent's
# own requirements.txt for the pinned repo commit so the shape + PBR paint
# pipelines import and run exactly as upstream verified them. torch/torchvision/
# torchaudio are installed separately in the Dockerfile from the cu124 wheel
# index (they must match the base image's CUDA 12.4).
#
# Deliberately excluded from upstream's list:
#   - gradio: demo UI only.
#   - deepspeed: training-only; its sole import in the shape stack sits inside a
#     training-EMA branch that inference never reaches.
#   - bpy (Blender): has no cp310 wheel on PyPI, and it is only reached through
#     DifferentiableRenderer.mesh_utils.convert_obj_to_glb (the save_glb=True OBJ
#     to GLB exporter). This worker never calls it — it paints with
#     save_glb=False and assembles the final PBR GLB with pygltflib via
#     hy3dpaint.convert_utils.create_glb_with_pbr_materials. The Dockerfile
#     drops a tiny stub `bpy` module so the top-level `import bpy` in
#     mesh_utils resolves; no bpy function is ever executed.
# Added on top: httpx (the SSRF guard in worker_security), google-cloud-storage
# (task state + weight staging + result upload).

# ── Build tools (custom_rasterizer CUDA ext + mesh_inpaint_processor pybind11) ─
ninja==1.11.1.1
pybind11==2.13.4

# ── Core ML / diffusion ──────────────────────────────────────────────────────
# Security bumps over upstream's list, each clearing every advisory its line can:
#   - transformers 4.57.6 (from 4.46.0) needs huggingface-hub>=0.34, hence 0.36.2,
#     the hub release model-triposg already runs.
#   - accelerate 1.15.0 (from 1.1.1): sharded-checkpoint path traversal.
#   - pytorch-lightning 2.6.6 (from 1.9.5): inference only subclasses
#     pl.LightningModule at import (hunyuanpaintpbr/unet/model.py); every Trainer,
#     checkpoint and callback path is training code this worker never runs.
#     1.9.5 also stopped importing on a fresh build: its lightning_fabric calls
#     pkg_resources, which the setuptools 84 that the Dockerfile's
#     `pip install --upgrade setuptools` pulls no longer ships.
# diffusers stays on 0.30.0: its open advisories need 0.38 and are reachable only
# by loading an attacker-chosen repo or custom_pipeline; the paint pass loads the
# in-image hy3dpaint/hunyuanpaintpbr pipeline from operator-staged weights.
transformers==4.57.6
diffusers==0.30.0
accelerate==1.15.0
pytorch-lightning==2.6.6
huggingface-hub==0.36.2
safetensors==0.4.4

# ── Scientific computing ─────────────────────────────────────────────────────
numpy==1.24.4
scipy==1.14.1
einops==0.8.0
pandas==2.2.2

# ── Computer vision / image processing ───────────────────────────────────────
opencv-python==4.10.0.84
imageio==2.36.0
scikit-image==0.24.0
rembg==2.0.65
realesrgan==0.3.0
tb_nightly==2.18.0a20240726
basicsr==1.4.2

# ── 3D mesh processing ───────────────────────────────────────────────────────
trimesh==4.4.7
pymeshlab==2022.2.post3
pygltflib==1.16.3
xatlas==0.0.9
open3d==0.18.0

# ── Configuration ────────────────────────────────────────────────────────────
omegaconf==2.3.0
pyyaml==6.0.2
configargparse==1.7

# ── Web framework (worker server) ────────────────────────────────────────────
fastapi==0.115.12
uvicorn[standard]==0.34.3
pydantic==2.10.6

# ── Utilities ────────────────────────────────────────────────────────────────
tqdm==4.66.5
psutil==6.0.0
timm
pythreejs
torchdiffeq

# ── GPU computing ────────────────────────────────────────────────────────────
cupy-cuda12x==13.4.1

# ── Blender (bpy): intentionally NOT installed — stubbed in the Dockerfile ────
# (only reachable via the unused save_glb OBJ->GLB exporter; see header note).

# ── ONNX runtime (rembg background removal) ──────────────────────────────────
onnxruntime==1.16.3
torchmetrics==1.6.0

# ── three.ws worker deps ─────────────────────────────────────────────────────
httpx>=0.27.0
google-cloud-storage==2.18.0