Repository navigation
Expand file tree
/
Copy pathrequirements.txt
More file actions
33 lines (33 loc) · 1.85 KB
/
Copy pathrequirements.txt
File metadata and controls
33 lines (33 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Pinned for HF Spaces (ZeroGPU). Mirrors the package's runtime deps plus
# Gradio. ZeroGPU images ship Python 3.10 + CUDA 12.1, so a default torch
# wheel is fine here (no Blackwell sm_120 requirement).
torch>=2.2
# PINNED FOR REPRODUCIBILITY on Spaces, not for compatibility. The adapter runs
# on 4.x and 5.x through two call-site shims in srt/adapter.py, `_dtype_key`
# (torch_dtype -> dtype) and `_PKV_KWARG` (past_key_value -> past_key_values).
# The note that stood here said 5.x breaks KV-cached manual generation; that was
# the decoder-layer kwarg rename landing silently in **kwargs so the cache was
# never used, diagnosed and fixed in fe389f30 and verified on 5.14.
# CVE-2026-1839 (Trainer RCE) stays mitigated by the
# torch>=2.6 floor below, and we never invoke the HF Trainer.
# CVE-2026-4372 (config.json `_attn_implementation_internal` RCE, patched only
# in 5.3.0) and CVE-2026-5241 (LightGlue loading-path RCE, patched only in
# 5.5.0): both require loading an ATTACKER-CONTROLLED Hub repo. Mitigated by
# usage, not upgrade — every from_pretrained() call in this repo loads a fixed
# allowlist of first-party repos (Qwen/, openai/, google/, meta-llama/,
# RiverRider/); LightGlue is never used. Do NOT add user-supplied model IDs
# anywhere while this pin is <5.5.0.
transformers==4.53.3
safetensors>=0.4
huggingface_hub>=0.24
numpy>=1.24
# gradio >=6.15.0 fixes the cross-Space cookie-injection / session-fixation bug
# (CVE-2026-48545, GHSA-7hp7-4p35-3cx2). 6.19.0 is the version validated on the
# live srt-sunstone Space.
gradio==6.19.0
# Starlette is pulled transitively by gradio; floor at 0.40.0 to avoid the
# multipart/form-data DoS (CVE-2024-47874, GHSA-f96h-pmfr-66vw). gradio 6.x
# already requires a modern starlette, so the old <0.40 cap was both stale
# (it referenced gradio 4.44) and vulnerable.
starlette>=0.40.0
spaces>=0.30 ; sys_platform == "linux"