forked from extern/easydiffusion
Only return valid data for alive threads.
This commit is contained in:
parent
eb994716e6
commit
c687091ce9
@ -356,7 +356,11 @@ def get_devices():
|
|||||||
try:
|
try:
|
||||||
device_dict = {}
|
device_dict = {}
|
||||||
for rthread in render_threads:
|
for rthread in render_threads:
|
||||||
|
if not rthread.is_alive():
|
||||||
|
continue
|
||||||
weak_data = weak_thread_data.get(rthread)
|
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']})
|
device_dict.update({weak_data['device']:weak_data['device_name']})
|
||||||
return device_dict
|
return device_dict
|
||||||
finally:
|
finally:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user