Fix YuE2 playground output path
This commit is contained in:
1 parent
f8b1b19d4a
commit
72c9d8c485
1 file changed
+7
-1
@@ -71,7 +71,8 @@ def run_job(job_id: str, request: dict) -> None:
|
|||||||
log_file = LOGS / f"{job_id}.log"
|
log_file = LOGS / f"{job_id}.log"
|
||||||
command = [
|
command = [
|
||||||
"yue2", "generate", "--offline", "--device", "cuda:0", "--budget", "16",
|
"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()
|
started = time.monotonic()
|
||||||
try:
|
try:
|
||||||
@@ -245,7 +246,12 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
chunk = source.read(min(1024 * 1024, remaining))
|
chunk = source.read(min(1024 * 1024, remaining))
|
||||||
if not chunk:
|
if not chunk:
|
||||||
break
|
break
|
||||||
|
try:
|
||||||
self.wfile.write(chunk)
|
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)
|
remaining -= len(chunk)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user