mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-22 22:29:43 +01:00
Only return valid data for alive threads.
This commit is contained in:
parent
eb994716e6
commit
c687091ce9
@ -356,7 +356,11 @@ def get_devices():
|
||||
try:
|
||||
device_dict = {}
|
||||
for rthread in render_threads:
|
||||
if not rthread.is_alive():
|
||||
continue
|
||||
weak_data = weak_thread_data.get(rthread)
|
||||
if not weak_data or not 'device' in weak_data or not 'device_name' in weak_data:
|
||||
continue
|
||||
device_dict.update({weak_data['device']:weak_data['device_name']})
|
||||
return device_dict
|
||||
finally:
|
||||
|
Loading…
Reference in New Issue
Block a user