mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-20 07:30:19 +01:00
Prevent a crash on systems without an NVIDIA GPU
This commit is contained in:
parent
253e85a519
commit
38c50087fe
|
|
@ -421,11 +421,9 @@ def get_nvidia_free_vram():
|
|||
return total_free_vram_mib
|
||||
|
||||
except FileNotFoundError:
|
||||
raise
|
||||
# nvidia-smi not found (likely no NVIDIA drivers installed)
|
||||
return -1
|
||||
except Exception:
|
||||
raise
|
||||
# Handle any other unexpected exceptions
|
||||
return -1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue