Commit ·
5dff6da
1
Parent(s): fbba0ef
Fix Space dependency conflict: transformers 5.0.0 + heartlib --no-deps bootstrap
Browse filesFiles changed (2)
- app.py+22-1
- requirements.txt+9-3
35 unmodified lines3637383940414235 unmodified linesimport gradio as grimport torchfrom heartlib.pipelines.music_generation import HeartMuLaGenPipelineAPP_DIR = Path("/home/user/app")CKPT_DIR = APP_DIR / "ckpt"35 unmodified lines3637383940414243444546474849505152535455565758596061626335 unmodified linesimport gradio as grimport torchtry:from heartlib.pipelines.music_generation import HeartMuLaGenPipelineexcept ModuleNotFoundError:# heartlib pins transformers==4.57.0 (needs huggingface-hub<1.0), which# conflicts with the Space runtime's gradio 6.24.0 (needs huggingface-hub# >=1.16). Install heartlib with --no-deps so pip does not enforce its# incompatible pins; all real runtime deps are pinned in requirements.txt.import subprocessimport sysprint("[startup] installing heartlib (--no-deps, pinned commit)...", flush=True)subprocess.check_call([sys.executable,"-m","pip","install","--no-deps","heartlib @ git+https://github.com/HeartMuLa/heartlib.git@3783bdb8441f2c298b1e64c8651173aac200361c",])from heartlib.pipelines.music_generation import HeartMuLaGenPipelineAPP_DIR = Path("/home/user/app")CKPT_DIR = APP_DIR / "ckpt"
123456--extra-index-url https://download.pytorch.org/whl/cu128torch==2.10.0torchaudio==2.10.0huggingface_hub>=0.32spacesheartlib @ git+https://github.com/HeartMuLa/heartlib.git@3783bdb8441f2c298b1e64c8651173aac200361c123456789101112--extra-index-url https://download.pytorch.org/whl/cu128torch==2.10.0torchaudio==2.10.0torchvision==0.25.0torchao==0.9.0transformers==5.0.0huggingface-hub==1.16.4torchtune==0.4.0vector-quantize-pytorch==1.27.15numpy==2.0.2tqdm==4.67.1spaces
app.py+22-1
requirements.txt+9-3