torch.cuda.graph() captures in "global" mode. If another thread
allocates, frees, synchronises or samples on the device while a graph
is being recorded, the capture can break; when cudaStreamEndCapture
fails, PyTorch never clears the CUDA generator's "capturing" flag, and
every later sampling call or graph replay in the process raises "Offset
increment outside graph capture encountered unexpectedly" until the
process restarts. A user of the VieNeu desktop app's local GPU server
(SDK 3.8.3) got this error and synthesis kept failing until a reboot;
a capture overlapping other GPU work is the most likely trigger.
v3 Turbo captures lazily (a new batch bucket, cache length or sampling
setting mid-request) from whichever thread needs the graph, and
_fused_lock (2f73298) only serialises the runs of one engine. Still
outside any lock: prompt embeddings and speaker anchors, the codec
decode after a batch, reference encoding (encode_reference), the
single-path engine, the stream scheduler's wor…
fix: harden Web UI, speech API and GPU streaming
Đoàn Quang Huy
ff63dc3
Web UI
- Stop running code from repos typed into "Custom Model":
trust_remote_code is off unless VIENEU_TRUST_REMOTE_CODE=1 (the
official v1/v2/0.3B checkpoints are stock Qwen2/Qwen3 and need
none). Custom repos take the LMDeploy path only with that flag set,
since older LMDeploy releases trust remote code on their own.
- Optional login via VIENEU_WEB_AUTH=user:password; warn when the UI
is reachable beyond localhost without one.
Speech API (apps/openai_speech.py)
- Listen on 127.0.0.1 by default and warn on a public bind without
VIENEU_API_KEY; the Docker profiles set HOST=0.0.0.0.
- POST /v1/voices refuses (409) built-in voice names and aliases, so
a client can no longer replace the default voice for everyone.
- Range-check temperature, top_k, top_p, repetition_penalty and
max_chars. Validation errors return 400 in OpenAI's error shape;
the default handler turned a NaN into a 500.
- /health and new requests return 503 once the GPU stream scheduler
has died, so th…
docs: nói rõ 'chọn một' ở các khối lệnh chạy server