CodeFormer
CodeFormer copied to clipboard
Issue with GPU Utilization in inference_codeformer.py Script
Dear sczhou,
I hope this message finds you well. I am writing to report a potential issue with the inference_codeformer.py script in the [Project/Tool Name] repository.
Description of the Issue:
When running the script with the following command:
css Copy code python inference_codeformer.py --bg_upsampler realesrgan --face_upsample -w 1.0 --input_path e:\temp\2.mp4 I received a RuntimeWarning indicating that the script is running on the CPU and not utilizing the GPU. The warning message is:
vbnet
Copy code
RuntimeWarning: Running on CPU now! Make sure your PyTorch version matches your CUDA. The unoptimized RealESRGAN is slow on CPU. If you want to disable it, please remove --bg_upsampler and --face_upsample in command.
Steps Taken:
Verified PyTorch and CUDA Compatibility: I have installed PyTorch version 2.1.0+cu118, which is compatible with my system's CUDA version 11.8. Checked GPU Availability in PyTorch: Using torch.cuda.is_available(), it returned True, confirming that PyTorch can detect and access the GPU. System Configuration: I am running Python version 3.11.5 on a Windows system. Considering that PyTorch recognizes the GPU and the installed version is compatible with my CUDA version, I suspect the script might not be leveraging the GPU capabilities, or there might be some specific parameters or settings that need to be enabled.
I would greatly appreciate it if you could provide some guidance on how to ensure the script utilizes the GPU or if there are any additional steps or configurations that I might have missed.
Thank you for your time and consideration. Looking forward to your feedback.
Best regards, Rober z