sczhou commited on
Commit
fbc4a80
·
1 Parent(s): 12cfcfc

update inference.

Browse files
Files changed (1) hide show
  1. inference_codeformer.py +2 -1
inference_codeformer.py CHANGED
@@ -38,7 +38,8 @@ if __name__ == '__main__':
38
  if not torch.cuda.is_available(): # CPU
39
  import warnings
40
  warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
41
- 'If you really want to use it, please modify the corresponding codes.')
 
42
  bg_upsampler = None
43
  else:
44
  from basicsr.archs.rrdbnet_arch import RRDBNet
 
38
  if not torch.cuda.is_available(): # CPU
39
  import warnings
40
  warnings.warn('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
41
+ 'If you really want to use it, please modify the corresponding codes.',
42
+ category=RuntimeWarning)
43
  bg_upsampler = None
44
  else:
45
  from basicsr.archs.rrdbnet_arch import RRDBNet