OnyxlMunkey Cursor commited on
Commit
b7756c5
·
1 Parent(s): b7dff2a

Initialize 5Hz LM on Space startup (ACESTEP_INIT_LLM env, default true)

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. app.py +8 -1
README.md CHANGED
@@ -16,4 +16,4 @@ models:
16
 
17
  Lyric-controllable, open-source text-to-music. Runs as a Docker Space with GPU.
18
 
19
- Models are downloaded from the Hub on first run. **Space Settings → Variables:** set `ACESTEP_CHECKPOINT_REPO` to the checkpoint repo (default: `ACE-Step/Ace-Step1.5`). Select **GPU** (e.g. T4 or A10G) in Space Settings.
 
16
 
17
  Lyric-controllable, open-source text-to-music. Runs as a Docker Space with GPU.
18
 
19
+ Models are downloaded from the Hub on first run. **Space Settings → Variables:** `ACESTEP_CHECKPOINT_REPO` = checkpoint repo (default: `ACE-Step/Ace-Step1.5`); `ACESTEP_INIT_LLM` = `true` to initialize 5Hz LM on startup (default), `false` to skip and save VRAM. Select **GPU** (e.g. T4 or A10G) in Space Settings.
app.py CHANGED
@@ -22,7 +22,7 @@ if _REPO_ROOT not in sys.path:
22
 
23
  # Override argv for Space: bind all interfaces, port 7860, init service
24
  os.chdir(_REPO_ROOT)
25
- sys.argv = [
26
  sys.argv[0],
27
  "--server-name", "0.0.0.0",
28
  "--port", "7860",
@@ -30,6 +30,13 @@ sys.argv = [
30
  "--config_path", "acestep-v15-turbo",
31
  "--download-source", "huggingface",
32
  ]
 
 
 
 
 
 
 
33
 
34
  from acestep.acestep_v15_pipeline import main
35
 
 
22
 
23
  # Override argv for Space: bind all interfaces, port 7860, init service
24
  os.chdir(_REPO_ROOT)
25
+ argv = [
26
  sys.argv[0],
27
  "--server-name", "0.0.0.0",
28
  "--port", "7860",
 
30
  "--config_path", "acestep-v15-turbo",
31
  "--download-source", "huggingface",
32
  ]
33
+ # Initialize 5Hz LM by default in Space (set ACESTEP_INIT_LLM=false in Settings to disable and save VRAM)
34
+ _init_lm = os.environ.get("ACESTEP_INIT_LLM", "").strip().lower()
35
+ if _init_lm in ("", "1", "true", "yes", "y", "on", "auto"):
36
+ argv.extend(["--init_llm", "true"])
37
+ elif _init_lm in ("0", "false", "no", "n", "off"):
38
+ argv.extend(["--init_llm", "false"])
39
+ sys.argv = argv
40
 
41
  from acestep.acestep_v15_pipeline import main
42