jhj0517 commited on
Commit
6bbb445
·
1 Parent(s): ba273d9

Fix device type

Browse files
modules/image_restoration/real_esrgan/real_esrgan_inferencer.py CHANGED
@@ -6,9 +6,9 @@ from typing import Optional, Literal
6
  from modules.utils.paths import *
7
  from modules.utils.image_helper import save_image
8
  from .model_downloader import download_resrgan_model, MODELS_REALESRGAN_URL, MODELS_REALESRGAN_SCALABILITY
9
- from wrapper.rrdb_net import RRDBNet
10
- from wrapper.real_esrganer import RealESRGANer
11
- from wrapper.srvgg_net_compact import SRVGGNetCompact
12
 
13
 
14
  class RealESRGANInferencer:
@@ -70,8 +70,8 @@ class RealESRGANInferencer:
70
  model_path=model_path,
71
  model=arc,
72
  half=half_precision,
 
73
  )
74
- self.model.device = torch.device(self.get_device())
75
 
76
  def restore_image(self,
77
  img_path: str,
 
6
  from modules.utils.paths import *
7
  from modules.utils.image_helper import save_image
8
  from .model_downloader import download_resrgan_model, MODELS_REALESRGAN_URL, MODELS_REALESRGAN_SCALABILITY
9
+ from .wrapper.rrdb_net import RRDBNet
10
+ from .wrapper.real_esrganer import RealESRGANer
11
+ from .wrapper.srvgg_net_compact import SRVGGNetCompact
12
 
13
 
14
  class RealESRGANInferencer:
 
70
  model_path=model_path,
71
  model=arc,
72
  half=half_precision,
73
+ device=torch.device(self.get_device())
74
  )
 
75
 
76
  def restore_image(self,
77
  img_path: str,