feat: scaffold avatar pipeline with ComfyUI driver, MLflow logging, and rclone promotion

- setup.sh: automated desktop env setup (ComfyUI, 3D-Pack, UniRig, Blender, Ray)
- ray-join.sh: join Ray cluster as external worker with 3d_gen resource label
- vrm_export.py: headless Blender GLB→VRM conversion script
- generate.py: ComfyUI API driver (submit workflow JSON, poll, download outputs)
- log_mlflow.py: REST-only MLflow experiment tracking (no SDK dependency)
- promote.py: rclone promotion of VRM files to gravenhollow S3
- CLI entry points: avatar-generate, avatar-promote
- workflows/ placeholder for ComfyUI exported workflow JSONs

Implements ADR-0063 (ComfyUI + TRELLIS + UniRig 3D avatar pipeline)
This commit is contained in:
2026-02-24 05:44:04 -05:00
parent a0c24406bd
commit 202b4e1d61
11 changed files with 1138 additions and 0 deletions

44
scripts/ray-join.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/usr/bin/env bash
# Join the Ray cluster as an external worker.
#
# The Ray head's GCS port must be reachable from this machine.
# Set RAY_HEAD_ADDRESS or pass it as the first argument.
#
# Usage:
# ./scripts/ray-join.sh # uses RAY_HEAD_ADDRESS env
# ./scripts/ray-join.sh 192.168.100.50:6379 # explicit address
# RAY_HEAD_ADDRESS=192.168.100.50:6379 ./scripts/ray-join.sh
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
COMFYUI_DIR="$PROJECT_DIR/ComfyUI"
RAY_HEAD="${1:-${RAY_HEAD_ADDRESS:-}}"
if [[ -z "$RAY_HEAD" ]]; then
echo "ERROR: Ray head address required."
echo "Usage: $0 <ray-head-ip>:<port>"
echo " or: RAY_HEAD_ADDRESS=<ip>:<port> $0"
exit 1
fi
# Activate ComfyUI venv (where Ray is installed)
# shellcheck disable=SC1091
source "$COMFYUI_DIR/.venv/bin/activate"
# Stop any existing Ray worker on this machine
ray stop --force 2>/dev/null || true
echo "Joining Ray cluster at $RAY_HEAD..."
ray start \
--address="$RAY_HEAD" \
--num-cpus=16 \
--num-gpus=1 \
--resources='{"3d_gen": 1, "rtx4070": 1}' \
--node-name=desktop
echo ""
echo "Desktop joined Ray cluster. Verify with: ray status"
echo "To disconnect: ray stop"