fix: add --max-seq-len to patch and remove || true from Dockerfile
The upstream openai_server.py gained --max-seq-len after v5 was built. Add it to the patch so every build gets explicit sequence length control. Also add max_seq_len=args.max_seq_len to FasterQwen3TTS.from_pretrained() so the argument is actually used. Remove || true from git apply so patch failures fail the build instead of silently producing a broken image. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3d8d444e0b
commit
1fc2f9c909
@ -22,7 +22,7 @@ RUN git clone --depth 1 --branch ${FASTER_QWEN3_TTS_REF} \
|
||||
|
||||
# Apply DGX Spark patches (non_streaming_mode=True, per-voice temperature/top_k/top_p)
|
||||
COPY patches/openai_server.patch /tmp/
|
||||
RUN cd /app && git apply /tmp/openai_server.patch || true
|
||||
RUN cd /app && git apply /tmp/openai_server.patch
|
||||
|
||||
# Create virtual environment (Ubuntu 24.04 enforces PEP 668)
|
||||
ENV VIRTUAL_ENV=/opt/venv
|
||||
|
||||
@ -25,3 +25,17 @@ index 61047ea..2b0c8bb 100644
|
||||
)
|
||||
|
||||
audio_arrays, sr = await loop.run_in_executor(None, _generate)
|
||||
@@ -306,4 +309,5 @@ def _parse_args():
|
||||
p.add_argument("--host", default="0.0.0.0", help="Bind host (default: 0.0.0.0)")
|
||||
p.add_argument("--port", type=int, default=8000, help="Bind port (default: 8000)")
|
||||
p.add_argument("--device", default="cuda", help="Torch device (default: cuda)")
|
||||
+ p.add_argument("--max-seq-len", type=int, default=4096, help="Max sequence length for CUDA graph static cache (default: 4096)")
|
||||
return p.parse_args()
|
||||
@@ -341,6 +349,7 @@ def main():
|
||||
logger.info("Loading model %s on %s …", args.model, args.device)
|
||||
tts_model = FasterQwen3TTS.from_pretrained(
|
||||
args.model,
|
||||
device=args.device,
|
||||
dtype=torch.bfloat16,
|
||||
+ max_seq_len=args.max_seq_len,
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user