techfreakworm commited on
Commit
1de4459
·
unverified ·
1 Parent(s): a37fc46

fix(deploy): skip cp -al mirror on zerogpu — exdev hardlink failure across filesystems

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -155,13 +155,20 @@ def _symlink_snapshots_into_models() -> None:
155
  def _bootstrap_spaces_cache() -> None:
156
  """On HF Spaces, prepare ./models/<org>/<repo>/ so ACE-Step finds preloaded weights.
157
 
 
 
 
 
 
 
 
 
 
158
  Skipped locally — local dev uses setup.sh's site-packages symlink instead, since
159
  the apple-silicon fork hardcodes its checkpoint resolver to its own install dir.
160
  """
161
  if not os.getenv("SPACE_ID"):
162
  return
163
- _mirror_hf_cache()
164
- os.environ["HF_HOME"] = str(_hf_cache_rw_dir())
165
  _symlink_snapshots_into_models()
166
 
167
 
 
155
  def _bootstrap_spaces_cache() -> None:
156
  """On HF Spaces, prepare ./models/<org>/<repo>/ so ACE-Step finds preloaded weights.
157
 
158
+ Earlier versions tried to ``cp -al`` (hardlink-mirror) the build-user-owned
159
+ ~/.cache/huggingface into a runtime-writable ~/hf-cache-rw, but on ZeroGPU
160
+ the HF cache and the home directory live on different filesystems, so
161
+ hardlinks fail with EXDEV ("Invalid cross-device link"). We don't need
162
+ the mirror in practice — inference-only workloads READ from the cache,
163
+ never write to it. Just leave HF_HOME alone (default ~/.cache/huggingface)
164
+ and symlink the preloaded snapshots into ./models/<org>/<repo>/ for the
165
+ ACE-Step checkpoint resolver.
166
+
167
  Skipped locally — local dev uses setup.sh's site-packages symlink instead, since
168
  the apple-silicon fork hardcodes its checkpoint resolver to its own install dir.
169
  """
170
  if not os.getenv("SPACE_ID"):
171
  return
 
 
172
  _symlink_snapshots_into_models()
173
 
174