diff --git a/server/operators/trellis_mac/run.py b/server/operators/trellis_mac/run.py index 1c92c19..bb2b8ba 100644 --- a/server/operators/trellis_mac/run.py +++ b/server/operators/trellis_mac/run.py @@ -1,5 +1,6 @@ import argparse import json +import os import subprocess import sys from pathlib import Path @@ -34,8 +35,18 @@ cmd = [ if p.get("no_texture"): cmd.append("--no-texture") +env = os.environ.copy() +# xet chunked downloader fails on these BFL/Meta repos ("Unable to parse string +# as hex hash value") — force the reliable HTTP path (same fix as flux_local). +env["HF_HUB_DISABLE_XET"] = "1" +# guard the torch + compiled-kernel OpenMP collision like sf3d does. +env["KMP_DUPLICATE_LIB_OK"] = "TRUE" +env.setdefault("OMP_NUM_THREADS", "1") +env.setdefault("MKL_NUM_THREADS", "1") + print("+", " ".join(cmd), flush=True) -res = subprocess.run(cmd, cwd=str(VENDOR), stdout=sys.stdout, stderr=subprocess.STDOUT) +print("(first run downloads TRELLIS.2-4B + dinov3 + RMBG-2.0 weights)", flush=True) +res = subprocess.run(cmd, cwd=str(VENDOR), stdout=sys.stdout, stderr=subprocess.STDOUT, env=env) if res.returncode != 0: sys.exit(res.returncode)