mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-06 06:42:51 +03:00
fix hardware stats crash when audio transcription is enabled (#24164)
This commit is contained in:
committed by
Nicolas Mowen
parent
8cd36416e2
commit
6bd6d3383f
@@ -427,13 +427,15 @@ class HardwareStats:
|
|||||||
if config.lpr.enabled and (config.lpr.device or "AUTO") != "CPU":
|
if config.lpr.enabled and (config.lpr.device or "AUTO") != "CPU":
|
||||||
names.add(gpu)
|
names.add(gpu)
|
||||||
|
|
||||||
# audio transcription runs on CUDA only
|
# audio transcription runs on CUDA only, and the device is global only
|
||||||
transcription_configs = [config.audio_transcription] + [
|
transcription = config.audio_transcription
|
||||||
camera.audio_transcription for camera in config.cameras.values()
|
transcription_enabled = transcription.enabled or any(
|
||||||
]
|
camera.audio_transcription.enabled for camera in config.cameras.values()
|
||||||
|
)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
any(c.enabled and c.device == "GPU" for c in transcription_configs)
|
transcription_enabled
|
||||||
|
and transcription.device == "GPU"
|
||||||
and "onnx:nvidia" in _present_hardware()
|
and "onnx:nvidia" in _present_hardware()
|
||||||
and _gpu_device_nodes_exist("nvidia")
|
and _gpu_device_nodes_exist("nvidia")
|
||||||
):
|
):
|
||||||
|
|||||||
Reference in New Issue
Block a user