fix(stats): recognise -hwaccel cuda and nvdec as NVIDIA GPU args

Upstream only checks for 'cuvid' or 'nvidia' when deciding whether to
collect NVIDIA GPU stats. When using `-hwaccel cuda` (required on driver
580+ where cuvid breaks RTSP decoding), the condition is never true and
the GPU usage panel in the Frigate UI stays empty.

Extend the check to also match 'cuda' and 'nvdec' so that GPU stats are
reported regardless of which NVDEC entry-point is configured.
This commit is contained in:
Peter Dolkens 2026-03-12 15:22:14 +11:00
parent 192aba901a
commit b6b2783c56

View File

@ -234,7 +234,7 @@ async def set_gpu_stats(
if args in hwaccel_errors:
# known erroring args should automatically return as error
stats["error-gpu"] = {"gpu": "", "mem": ""}
elif "cuvid" in args or "nvidia" in args:
elif "cuvid" in args or "nvidia" in args or "cuda" in args or "nvdec" in args:
# nvidia GPU
nvidia_usage = get_nvidia_gpu_stats()