Spaces:
Runtime error
Runtime error
erl-j
commited on
Commit
Β·
448ede7
1
Parent(s):
a0a9280
full precision model
Browse files
app.py
CHANGED
@@ -13,19 +13,16 @@ from huggingface_hub import hf_hub_download
|
|
13 |
|
14 |
sys.path.append("sf-creator-fork")
|
15 |
from main import sfz, decentsampler
|
16 |
-
|
17 |
-
decoder_path = "erl-j/soundfont-generator-assets/decoder.pt"
|
18 |
-
model_path = "erl-j/soundfont-generator-assets/synth_lfm_modern_bfloat16.pt"
|
19 |
# Download models from Hugging Face Hub
|
20 |
decoder_path = hf_hub_download("erl-j/soundfont-generator-assets", "decoder.pt")
|
21 |
model_path = hf_hub_download(
|
22 |
-
"erl-j/soundfont-generator-assets", "
|
23 |
)
|
24 |
|
25 |
# Load models once at startup
|
26 |
device = "cuda"
|
27 |
-
decoder = torch.load(decoder_path, map_location=device).
|
28 |
-
model = torch.load(model_path, map_location=device).
|
29 |
|
30 |
|
31 |
@spaces.GPU
|
|
|
13 |
|
14 |
sys.path.append("sf-creator-fork")
|
15 |
from main import sfz, decentsampler
|
|
|
|
|
|
|
16 |
# Download models from Hugging Face Hub
|
17 |
decoder_path = hf_hub_download("erl-j/soundfont-generator-assets", "decoder.pt")
|
18 |
model_path = hf_hub_download(
|
19 |
+
"erl-j/soundfont-generator-assets", "synth_lfm_classic_full.ckpt"
|
20 |
)
|
21 |
|
22 |
# Load models once at startup
|
23 |
device = "cuda"
|
24 |
+
decoder = torch.load(decoder_path, map_location=device).eval()
|
25 |
+
model = torch.load(model_path, map_location=device).eval()
|
26 |
|
27 |
|
28 |
@spaces.GPU
|