Fix SheetSage2 dependencies and document A100 hardware
Browse files- Dockerfile +2 -1
- README.md +3 -3
- logic.py +0 -8
- pipeline.py +0 -1
Dockerfile
CHANGED
|
@@ -14,7 +14,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 14 |
RUN python -m venv /opt/sheet && /opt/sheet/bin/pip install --no-cache-dir \
|
| 15 |
torch==2.8.0 torchaudio==2.8.0 transformers==4.45.2 \
|
| 16 |
numpy==1.26.4 scipy==1.15.3 huggingface-hub==0.36.0 \
|
| 17 |
-
safetensors==0.7.0 soundfile==0.13.1 pretty_midi==0.2.11 mido==1.3.3
|
|
|
|
| 18 |
|
| 19 |
RUN python -m venv /opt/yue && /opt/yue/bin/pip install --no-cache-dir \
|
| 20 |
'https://huggingface.co/m-a-p/YuE2-3B/resolve/29b3558dd46954a0cd9021dc76d5c91864a0f1c7/yue2_infer-0.1.5-py3-none-any.whl'
|
|
|
|
| 14 |
RUN python -m venv /opt/sheet && /opt/sheet/bin/pip install --no-cache-dir \
|
| 15 |
torch==2.8.0 torchaudio==2.8.0 transformers==4.45.2 \
|
| 16 |
numpy==1.26.4 scipy==1.15.3 huggingface-hub==0.36.0 \
|
| 17 |
+
safetensors==0.7.0 soundfile==0.13.1 pretty_midi==0.2.11 mido==1.3.3 \
|
| 18 |
+
mir_eval==0.8.2
|
| 19 |
|
| 20 |
RUN python -m venv /opt/yue && /opt/yue/bin/pip install --no-cache-dir \
|
| 21 |
'https://huggingface.co/m-a-p/YuE2-3B/resolve/29b3558dd46954a0cd9021dc76d5c91864a0f1c7/yue2_infer-0.1.5-py3-none-any.whl'
|
README.md
CHANGED
|
@@ -27,9 +27,9 @@ Output audio is downloadable 320 kbit/s CBR MP3. Source recordings remain in
|
|
| 27 |
the Space's temporary job directory; they are not committed or used to train
|
| 28 |
models. The Space should remain private while testing personal recordings.
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
ephemeral disk. A cold restart can require another download.
|
| 33 |
|
| 34 |
Model licenses and source: [SheetSage2](https://huggingface.co/m-a-p/SheetSage2),
|
| 35 |
[MERT-v2-FullSong](https://huggingface.co/m-a-p/MERT-v2-FullSong),
|
|
|
|
| 27 |
the Space's temporary job directory; they are not committed or used to train
|
| 28 |
models. The Space should remain private while testing personal recordings.
|
| 29 |
|
| 30 |
+
Current hardware request: A100 80 GB, one queued inference at a time, with
|
| 31 |
+
15-minute idle sleep. Models are downloaded at first use and cached on the
|
| 32 |
+
Space's ephemeral disk. A cold restart can require another download.
|
| 33 |
|
| 34 |
Model licenses and source: [SheetSage2](https://huggingface.co/m-a-p/SheetSage2),
|
| 35 |
[MERT-v2-FullSong](https://huggingface.co/m-a-p/MERT-v2-FullSong),
|
logic.py
CHANGED
|
@@ -2,7 +2,6 @@
|
|
| 2 |
|
| 3 |
from __future__ import annotations
|
| 4 |
|
| 5 |
-
from pathlib import Path
|
| 6 |
import re
|
| 7 |
|
| 8 |
|
|
@@ -62,10 +61,3 @@ def instrumental_abc(native: str, keep_chords: bool = False) -> str:
|
|
| 62 |
def validate_duration(seconds: float) -> None:
|
| 63 |
if not 0.4 <= seconds <= MAX_SECONDS:
|
| 64 |
raise ValueError(f"Нужен напев от 0,4 до {MAX_SECONDS:g} секунд; сейчас {seconds:.1f} с.")
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
def work_file(root: Path, name: str) -> Path:
|
| 68 |
-
path = root / name
|
| 69 |
-
if path.parent != root or path.name != name:
|
| 70 |
-
raise ValueError("Invalid work file name")
|
| 71 |
-
return path
|
|
|
|
| 2 |
|
| 3 |
from __future__ import annotations
|
| 4 |
|
|
|
|
| 5 |
import re
|
| 6 |
|
| 7 |
|
|
|
|
| 61 |
def validate_duration(seconds: float) -> None:
|
| 62 |
if not 0.4 <= seconds <= MAX_SECONDS:
|
| 63 |
raise ValueError(f"Нужен напев от 0,4 до {MAX_SECONDS:g} секунд; сейчас {seconds:.1f} с.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pipeline.py
CHANGED
|
@@ -7,7 +7,6 @@ import json
|
|
| 7 |
import os
|
| 8 |
from pathlib import Path
|
| 9 |
import subprocess
|
| 10 |
-
import sys
|
| 11 |
import tempfile
|
| 12 |
import time
|
| 13 |
|
|
|
|
| 7 |
import os
|
| 8 |
from pathlib import Path
|
| 9 |
import subprocess
|
|
|
|
| 10 |
import tempfile
|
| 11 |
import time
|
| 12 |
|