AnimoFlow commited on
Commit
8f0206e
·
1 Parent(s): 19bcca8

Provision GMR for robot retargeting and allow staging repo overrides

Browse files

Bootstrap clones GMR at a pinned commit and exposes it via GMR_HOME; the
solver dependencies install from requirements (GMR's own setup.py is
never used). The AnimoFlow repo clone URLs are env-overridable so a
staging Space can point at private mirrors.

Files changed (2) hide show
  1. bootstrap.py +28 -2
  2. requirements.txt +6 -0
bootstrap.py CHANGED
@@ -60,6 +60,13 @@ MDM_PINNED_COMMIT = os.environ.get("MDM_PINNED_COMMIT", "af061ca")
60
  COMFYUI_PINNED_COMMIT = os.environ.get("COMFYUI_PINNED_COMMIT", "")
61
  API_PINNED_COMMIT = os.environ.get("API_PINNED_COMMIT", "")
62
 
 
 
 
 
 
 
 
63
  ANIMOFLOW_CHECKPOINTS_REPO = os.environ.get(
64
  "ANIMOFLOW_CHECKPOINTS_REPO", "AnimoFlow/animoflow-checkpoints"
65
  )
@@ -111,20 +118,34 @@ _DOCKER_MODE_PATHS = (
111
  )
112
 
113
  # What we need to clone. (repo_name, target_subdir, is_private).
 
 
114
  _GIT_REPOS: tuple[tuple[str, str, str, bool], ...] = (
115
  # (full_url_template_or_url, target_subdir, friendly_name, private)
116
  (
117
- "https://github.com/AnimoFlow/comfyui-animoflow.git",
 
 
 
118
  "comfyui-animoflow",
119
  "comfyui-animoflow",
120
  True,
121
  ),
122
  (
123
- "https://github.com/AnimoFlow/animoflow-api.git",
 
 
 
124
  "animoflow-api",
125
  "animoflow-api",
126
  True,
127
  ),
 
 
 
 
 
 
128
  (
129
  "https://github.com/GuyTevet/motion-diffusion-model.git",
130
  "mdm-codes",
@@ -736,6 +757,11 @@ def _clone_all(gh_token: str | None) -> None:
736
  _pin_to_commit(target, COMFYUI_PINNED_COMMIT, name)
737
  if subdir == "animoflow-api" and API_PINNED_COMMIT:
738
  _pin_to_commit(target, API_PINNED_COMMIT, name)
 
 
 
 
 
739
 
740
 
741
  def _pin_to_commit(target: Path, commit: str, name: str) -> None:
 
60
  COMFYUI_PINNED_COMMIT = os.environ.get("COMFYUI_PINNED_COMMIT", "")
61
  API_PINNED_COMMIT = os.environ.get("API_PINNED_COMMIT", "")
62
 
63
+ # GMR (github.com/YanjieZe/GMR, MIT) powers robot-character retargeting.
64
+ # Cloned pinned; installed WITHOUT its setup.py (which would pull the
65
+ # research-only smplx package the BVH path never imports) — the solver
66
+ # dependencies ship in requirements.txt instead. GMR_HOME points the
67
+ # robot_retarget package at the checkout.
68
+ GMR_PINNED_COMMIT = os.environ.get("GMR_PINNED_COMMIT", "bb1bbe40774794fceb2a7c579a3464a28e68c844")
69
+
70
  ANIMOFLOW_CHECKPOINTS_REPO = os.environ.get(
71
  "ANIMOFLOW_CHECKPOINTS_REPO", "AnimoFlow/animoflow-checkpoints"
72
  )
 
118
  )
119
 
120
  # What we need to clone. (repo_name, target_subdir, is_private).
121
+ # The AnimoFlow repo URLs are env-overridable so a staging Space can run
122
+ # against private staging mirrors without touching this file.
123
  _GIT_REPOS: tuple[tuple[str, str, str, bool], ...] = (
124
  # (full_url_template_or_url, target_subdir, friendly_name, private)
125
  (
126
+ os.environ.get(
127
+ "COMFYUI_REPO_URL",
128
+ "https://github.com/AnimoFlow/comfyui-animoflow.git",
129
+ ),
130
  "comfyui-animoflow",
131
  "comfyui-animoflow",
132
  True,
133
  ),
134
  (
135
+ os.environ.get(
136
+ "API_REPO_URL",
137
+ "https://github.com/AnimoFlow/animoflow-api.git",
138
+ ),
139
  "animoflow-api",
140
  "animoflow-api",
141
  True,
142
  ),
143
+ (
144
+ "https://github.com/YanjieZe/GMR.git",
145
+ "GMR",
146
+ "GMR (robot retargeting)",
147
+ False,
148
+ ),
149
  (
150
  "https://github.com/GuyTevet/motion-diffusion-model.git",
151
  "mdm-codes",
 
757
  _pin_to_commit(target, COMFYUI_PINNED_COMMIT, name)
758
  if subdir == "animoflow-api" and API_PINNED_COMMIT:
759
  _pin_to_commit(target, API_PINNED_COMMIT, name)
760
+ if subdir == "GMR" and GMR_PINNED_COMMIT:
761
+ _pin_to_commit(target, GMR_PINNED_COMMIT, name)
762
+
763
+ # Robot retargeting finds its pinned GMR checkout through GMR_HOME.
764
+ os.environ.setdefault("GMR_HOME", str(EXTERNAL_DIR / "GMR"))
765
 
766
 
767
  def _pin_to_commit(target: Path, commit: str, name: str) -> None:
requirements.txt CHANGED
@@ -52,3 +52,9 @@ accelerate>=1.0
52
  # Tests
53
  pytest>=8.3.4
54
  pytest-asyncio>=0.25.0
 
 
 
 
 
 
 
52
  # Tests
53
  pytest>=8.3.4
54
  pytest-asyncio>=0.25.0
55
+
56
+ # Robot character retargeting (GMR solver deps; GMR itself is a pinned
57
+ # clone via bootstrap — never installed through its setup.py).
58
+ mink
59
+ mujoco
60
+ qpsolvers[daqp]