mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-02 11:40:05 +01:00
Fix a bug where the device wouldn't get set if no cuda-compatible hardware was found
This commit is contained in:
parent
952854f64e
commit
284b95213e
@ -113,6 +113,7 @@ def device_init(device_selection=None):
|
||||
return
|
||||
if not torch.cuda.is_available():
|
||||
print('WARNING: torch.cuda is not available. Using the CPU, but this will be very slow!')
|
||||
thread_data.device = 'cpu'
|
||||
return
|
||||
device_count = torch.cuda.device_count()
|
||||
if device_count <= 1 and device_selection == 'auto':
|
||||
|
Loading…
Reference in New Issue
Block a user