#!/usr/bin/env bash # Xenon setup for Apple Silicon Macs (M1 or later, 24GB+ unified memory). UNTESTED. # # Before running: # 1. pip install -U huggingface_hub && hf auth login # 2. Request access (usually instant) to these gated models on huggingface.co: # facebook/dinov3-vitl16-pretrain-lvd1689m # briaai/RMBG-2.0 (CC BY-NC 4.0: commercial use needs a BRIA licence) # 3. Optional, for the better texture baker: xcodebuild -downloadComponent MetalToolchain set -euo pipefail cd "$(dirname "$0")" if [ "$(uname -s)" != "Darwin" ] || [ "$(uname -m)" != "arm64" ]; then echo "This needs an Apple Silicon Mac (Intel Macs are not supported)." >&2 exit 1 fi # 1. Xenon's own environment (Qwen-VL + image model) python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install -r requirements.txt # 2. trellis-mac (its own venv, called by xenon.py as a subprocess) [ -d trellis-mac ] || git clone https://github.com/shivampkumar/trellis-mac.git (cd trellis-mac && bash setup.sh) echo echo "Done. Test with:" echo " source .venv/bin/activate && python run_xenon.py \"a wooden crate\" --tier turbo"