feat(models): skip install-time pull; hardware-aware picks in Models tab
Windows installer no longer auto-downloads models; points to the Models tab. synapse/hardware.py detects RAM + best-effort VRAM and a curated catalog; GET /models/recommended annotates each model with fit (gpu/ram/no); the Models page shows detected RAM/VRAM with fit badges and per-row Pull buttons. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,16 @@ def test_keep_alive_pins_the_model():
|
||||
assert "keep_alive" not in mgr._apply_keep_alive({"model": "x"})
|
||||
|
||||
|
||||
def test_hardware_fit_logic():
|
||||
from synapse import hardware
|
||||
assert hardware._fit(2.5, 4.0, 16.0) == "gpu" # 2.5+1 <= 4 -> fits GPU
|
||||
assert hardware._fit(4.7, 4.0, 16.0) == "ram" # too big for 4GB GPU, fits RAM
|
||||
assert hardware._fit(4.7, None, 16.0) == "ram" # VRAM unknown -> RAM
|
||||
assert hardware._fit(40.0, 4.0, 16.0) == "no" # too big everywhere
|
||||
rec = hardware.recommend()
|
||||
assert "hardware" in rec and all("fit" in m for m in rec["models"])
|
||||
|
||||
|
||||
def test_stt_status_endpoint():
|
||||
# Reports whether local Whisper is installed; wiring must respond either way.
|
||||
resp = TestClient(app).get("/stt/status")
|
||||
|
||||
Reference in New Issue
Block a user