mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-19 17:39:16 +02:00
Improved readability and comments.
This commit is contained in:
parent
902ccbd203
commit
9f5202fee3
@ -407,8 +407,10 @@ display_warning = False
|
|||||||
if task_manager.is_alive() <= 0: # Either no defauls or no devices after loading config.
|
if task_manager.is_alive() <= 0: # Either no defauls or no devices after loading config.
|
||||||
# Select best GPU device using free memory, if more than one device.
|
# Select best GPU device using free memory, if more than one device.
|
||||||
if task_manager.start_render_thread('auto'): # Detect best device for renders
|
if task_manager.start_render_thread('auto'): # Detect best device for renders
|
||||||
if task_manager.is_alive(0) <= 0 and task_manager.is_alive('cpu') <= 0: # is not cuda:0 and auto didnt use CPU.
|
if task_manager.is_alive(0) <= 0: # has no cuda:0
|
||||||
if task_manager.start_render_thread('cuda'): # An other cuda device is better and cuda:0 is missing, start it...
|
if task_manager.is_alive('cpu') >= 1: # auto used CPU.
|
||||||
|
pass # Maybe add warning here about CPU mode...
|
||||||
|
elif task_manager.start_render_thread('cuda'): # An other cuda device is better and cuda:0 is missing, try to start it...
|
||||||
display_warning = True # And warn user to update settings...
|
display_warning = True # And warn user to update settings...
|
||||||
else:
|
else:
|
||||||
print('Failed to start GPU:0...')
|
print('Failed to start GPU:0...')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user