From fa0c2f7138b8daa04968559ec701667afb1925d1 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 11 Nov 2022 15:09:25 +0530 Subject: [PATCH] Temp change to get beta working and use a single GPU until the rest of the changes come through --- ui/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/server.py b/ui/server.py index ea5b98fc..57d374b0 100644 --- a/ui/server.py +++ b/ui/server.py @@ -278,8 +278,8 @@ def render(req : task_manager.ImageRequest): print('WARNING Replace {use_cpu: true} by {render_device: "cpu"}') req.render_device = 'cpu' del req.use_cpu - # if req.render_device != 'cpu': - # req.render_device = int(req.render_device) + if req.render_device != 'cpu': + req.render_device = 'cuda:0' # temp hack to get beta working if req.render_device and task_manager.is_alive(req.render_device) <= 0: raise HTTPException(status_code=403, detail=f'{req.render_device} rendering is not enabled in config.json or the thread has died...') # HTTP403 Forbidden if req.use_face_correction and task_manager.is_alive('cuda:0') <= 0: #TODO Remove when GFPGANer is fixed upstream. raise HTTPException(status_code=412, detail=f'GFPGANer only works GPU:0, use CUDA_VISIBLE_DEVICES if GFPGANer is needed on a specific GPU.') # HTTP412 Precondition Failed