catch more specific errors

This commit is contained in:
Xintao
2021-11-24 00:14:05 +08:00
parent 35ee6f781e
commit 7dd860a881
4 changed files with 4 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ def main():
_, _, output = face_enhancer.enhance(img, has_aligned=False, only_center_face=False, paste_back=True)
else:
output, _ = upsampler.enhance(img, outscale=args.outscale)
except Exception as error:
except RuntimeError as error:
print('Error', error)
print('If you encounter CUDA out of memory, try to set --tile with a smaller number.')
else: