Fix YuE2 playground output path

This commit is contained in:
Mikei386 committed 2026-09-10 21:52:21 +02:00
1 parent f8b1b19d4a
commit 72c9d8c485
1 file changed
+8 -2
+8 -2
View File
@@ -71,7 +71,8 @@ def run_job(job_id: str, request: dict) -> None:
log_file = LOGS / f"{job_id}.log"
command = [
"yue2", "generate", "--offline", "--device", "cuda:0", "--budget", "16",
"--request", str(request_file), "--output", str(output),
# YuE2 creates a child directory from request["id"] itself.
"--request", str(request_file), "--output", str(ROOT),
]
started = time.monotonic()
try:
@@ -245,7 +246,12 @@ class Handler(BaseHTTPRequestHandler):
chunk = source.read(min(1024 * 1024, remaining))
if not chunk:
break
self.wfile.write(chunk)
try:
self.wfile.write(chunk)
except (BrokenPipeError, ConnectionResetError):
# Browsers routinely close an old range request after a
# seek or metadata probe. This is not a server failure.
break
remaining -= len(chunk)