mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-21 10:27:47 +02:00
Don't throw an exception when an invalid device is being checked for compatibility. Report and return false
This commit is contained in:
parent
5cf763d51f
commit
8e1ec5903b
@ -129,7 +129,11 @@ def is_device_compatible(device):
|
|||||||
'''
|
'''
|
||||||
Returns True/False, and prints any compatibility errors
|
Returns True/False, and prints any compatibility errors
|
||||||
'''
|
'''
|
||||||
|
try:
|
||||||
validate_device_id(device, log_prefix='is_device_compatible')
|
validate_device_id(device, log_prefix='is_device_compatible')
|
||||||
|
except:
|
||||||
|
print(str(e))
|
||||||
|
return False
|
||||||
|
|
||||||
if device == 'cpu': return True
|
if device == 'cpu': return True
|
||||||
# Memory check
|
# Memory check
|
||||||
|
Loading…
x
Reference in New Issue
Block a user