fix(mana-video-gen): typo in get_model_info — total_mem → total_memory

PyTorch's `torch.cuda.get_device_properties(0)` returns a
`_CudaDeviceProperties` object whose memory attribute is
`total_memory` (bytes), not `total_mem`. The typo crashed the
service immediately at startup because `get_model_info()` is
called from the FastAPI lifespan handler, not lazily — uvicorn
logged "Application startup failed" before any request could land.

Found while installing mana-video-gen on the Windows GPU box
(192.168.178.11:3026) for the gpu-video.mana.how Cloudflare route.
After the fix the service starts cleanly under the ManaVideoGen
scheduled task and responds 200 on /health both LAN and via
Cloudflare tunnel. status.mana.how now reports 42/42 — first time
ever.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-08 11:59:40 +02:00
parent 142a65a22f
commit b6486a8a46

View file

@ -68,7 +68,7 @@ def get_model_info() -> dict:
gpu_name = torch.cuda.get_device_name(0) if torch.cuda.is_available() else "N/A"
vram_gb = (
round(torch.cuda.get_device_properties(0).total_mem / 1e9, 1)
round(torch.cuda.get_device_properties(0).total_memory / 1e9, 1)
if torch.cuda.is_available()
else 0
)