stemd: AUTO_SCAN=0 runs on request only (Stem Now)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d69c44eff9
commit
e35ebedb56
3 files changed
+9
No files matched your search
@@ -20,6 +20,7 @@ Settings (environment):
|
||||
MODEL roformer_bs_sw any id from stemify/catalog.py
|
||||
DEVICE cuda cuda, cuda:N or cpu
|
||||
RESCAN_MIN 30 minutes between scans once caught up
|
||||
AUTO_SCAN 1 0 = never scan the library; only separate Stem Now requests
|
||||
FP16 1 half precision on the GPU
|
||||
OVERLAP / SEGMENT / SHIFTS as in the desktop app's settings
|
||||
"""
|
||||
@@ -47,6 +48,7 @@ MODELS_DIR = os.environ.get("MODELS_DIR", "/models")
|
||||
MODEL = os.environ.get("MODEL", "roformer_bs_sw")
|
||||
DEVICE = os.environ.get("DEVICE", "cuda")
|
||||
RESCAN_S = float(os.environ.get("RESCAN_MIN", "30")) * 60
|
||||
AUTO_SCAN = os.environ.get("AUTO_SCAN", "1") not in ("0", "false", "no", "")
|
||||
FP16 = os.environ.get("FP16", "1") not in ("0", "false", "no", "")
|
||||
OVERLAP = float(os.environ.get("OVERLAP", "0.25"))
|
||||
SEGMENT = float(os.environ.get("SEGMENT", "0"))
|
||||
@@ -349,8 +351,13 @@ def main():
|
||||
migrate_markers()
|
||||
sep = Separator()
|
||||
failed = Failed()
|
||||
if not AUTO_SCAN:
|
||||
log("AUTO_SCAN off: only Stem Now requests will be separated")
|
||||
while not stop.is_set():
|
||||
try:
|
||||
if not AUTO_SCAN:
|
||||
idle(sep, failed, RESCAN_S)
|
||||
continue
|
||||
done, used = run_pass(sep, failed)
|
||||
if done:
|
||||
log(f"pass finished: {done:,} tracks separated")
|
||||
|
||||
Reference in new issue
Block a user