mirror of
https://github.com/Sygil-Dev/sygil-webui.git
synced 2024-12-15 22:42:14 +03:00
esrgan gpu id
This commit is contained in:
parent
b0c1ac9f7b
commit
b61b453a02
4
webui.py
4
webui.py
@ -332,9 +332,9 @@ def load_RealESRGAN(model_name: str):
|
||||
instance.device = torch.device('cpu')
|
||||
instance.model.to('cpu')
|
||||
elif opt.extra_models_gpu:
|
||||
instance = RealESRGANer(scale=2, model_path=model_path, model=RealESRGAN_models[model_name], pre_pad=0, half=not opt.no_half, device=torch.device(f'cuda:{opt.esrgan_gpu}'))
|
||||
instance = RealESRGANer(scale=2, model_path=model_path, model=RealESRGAN_models[model_name], pre_pad=0, half=not opt.no_half, gpu_id=opt.esrgan_gpu)
|
||||
else:
|
||||
instance = RealESRGANer(scale=2, model_path=model_path, model=RealESRGAN_models[model_name], pre_pad=0, half=not opt.no_half, device=torch.device(f'cuda:{opt.gpu}'))
|
||||
instance = RealESRGANer(scale=2, model_path=model_path, model=RealESRGAN_models[model_name], pre_pad=0, half=not opt.no_half)
|
||||
instance.model.name = model_name
|
||||
return instance
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user