Fix YuE2 playground output path
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user