@@ -60,6 +60,31 @@ def main():
6060 if args .bg_upsampler == 'realesrgan' :
6161 if not torch .cuda .is_available (): # CPU
6262 import warnings
63+
64+ warnings .warn ('Here is going to run `--bg_upsampler=realesrgan` in CPU (not CUDA) power.' )
65+
66+ if torch .__version__ .endswith ('+cpu' ):
67+ warnings .warn ('This is because installed version of '
68+ 'PyTorch is `%s`.' % (torch .__version__ , ))
69+ warnings .warn ('If PyTorch has Compute Platform `CUDA 11.6` support, '
70+ 'the version will be displayed like `1.12.1+cu116`' )
71+ warnings .warn ('If you are sure to have CUDA enabled device, '
72+ 'you can try to install CUDA capable PyTorch. '
73+ 'Visit https://pytorch.org/get-started/locally/ '
74+ 'and check START LOCALLY section.' )
75+ warnings .warn ('In 12 Nov 2022, this is useful to install CUDA powered PyTorch: '
76+ 'pip3 install torch==1.12.1+cu116 --index-url https://download.pytorch.org/whl/cu116' )
77+ warnings .warn ('If you already have PyTorch installed, it needs to be uninstalled. try: '
78+ 'pip3 uninstall torch' )
79+ else :
80+ warnings .warn ('This is because no CUDA capable device is detected.' )
81+
82+ warnings .warn ('To print PyTorch version by yourself, try: '
83+ 'python -c "import torch; print(torch.__version__)"' )
84+
85+ warnings .warn ('To verify if PyTorch can detect CUDA, try: '
86+ 'python -c "import torch; print(torch.cuda.is_available())"' )
87+
6388 warnings .warn ('The unoptimized RealESRGAN is slow on CPU. We do not use it. '
6489 'If you really want to use it, please modify the corresponding codes.' )
6590 bg_upsampler = None
0 commit comments