mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-11-27 10:43:12 +01:00
Process GFPGANer on cuda:0 when possible, otherwise use cpu.
This commit is contained in:
parent
1d4c5cc96f
commit
d4a348a2b2
@ -217,6 +217,7 @@ def thread_render(device):
|
|||||||
if not queued_task.request.use_cpu and runtime.thread_data.device == 'cpu':
|
if not queued_task.request.use_cpu and runtime.thread_data.device == 'cpu':
|
||||||
continue # CPU Tasks
|
continue # CPU Tasks
|
||||||
if queued_task.request.use_face_correction and not runtime.is_first_cuda_device(runtime.thread_data.device):
|
if queued_task.request.use_face_correction and not runtime.is_first_cuda_device(runtime.thread_data.device):
|
||||||
|
if not runtime.thread_data.device == 'cpu' and is_alive(0) > 0: # Allows GFPGANer on cuda:0 and use cpu only when cuda:0 is not available.
|
||||||
continue #TODO Remove when fixed - A bug with GFPGANer and facexlib needs to be fixed before use on other devices.
|
continue #TODO Remove when fixed - A bug with GFPGANer and facexlib needs to be fixed before use on other devices.
|
||||||
task = queued_task
|
task = queued_task
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user