Real-ESRGAN icon indicating copy to clipboard operation
Real-ESRGAN copied to clipboard

ValueError: Number of processes must be at least 1 [On windows]

Open Milor123 opened this issue 2 years ago • 5 comments

Hi guys, i am trying use Real-ESRGAN on windows 10 x64. I've installed anaconda and pytorch within anaconda [✔️], I've follow the steps of the installation, >>> 1. Clone repo and 2. Install dependent packages [✔️] I've cuda developer toolkit of nvidia in my pc, tested with Hashcat tool [✔️]

But when it run the command for render video dont work - Tested in gtx 1050ti and RX 6600 xt [❌] I also tested change the sintax for windows and test all suggested commands python inference_realesrgan_video.py -i .\inputs\video\onepiece_demo.mp4 -n realesr-animevideov3 -s 2 --suffix outx2 --num_process_per_gpu 2 but not work [❌]

And about of CUDA_VISIBLE_DEVICES=0 what should i do with it in windows? [❓] Thank you very much for this great project !! image

Milor123 avatar Sep 07 '22 22:09 Milor123

I have the same problem, if someone has an idea, you're welcome to guide us :)

BankaiNoJutsu avatar Sep 11 '22 20:09 BankaiNoJutsu

I have the same problem, if someone has an idea, you're welcome to guide us :)

You could edit manually the interference_realsrgan_video.py in the 275 line image

Then if you get ffmpeg error, you probably need download ffmpeg.exe binarie and put in the folder or in the Path (Enviroment variable on windows)

And about of torch, i was reading and for the Cuda not work with AMD GPU cards, the alternative is ROCm, but only works over linux, in windows i think that need install torch in Only CPU mode

image

or maybe if you know like use a Docker, docker pull amdih/pytorch:rocm5.0_ubuntu18.04_py3.7_pytorch_1.10.0 but i am not sure about it. (FOR AMD GPU USERS in windows)

Greetings!

Milor123 avatar Sep 11 '22 21:09 Milor123

Thank you a lot! Much appreciated 😊

BankaiNoJutsu avatar Sep 11 '22 22:09 BankaiNoJutsu

日本語で失礼しますが、この問題の本質は、 torch.cuda.device_count()が0であるシステムが存在することのようです。 グラフィックボードが1枚で有る場合は、 num_gpus = torch.cuda.device_count() を num_gpus = 1 に書き換えることで動作します。 SnapCrab_NoName_2023-3-13_0-10-59_No-00

kotaro5487 avatar Mar 12 '23 15:03 kotaro5487

Line 290 change num_process = num_gpus * args.num_process_per_gpu to num_process = num_gpus * args.num_process_per_gpu if num_gpus > 0 else 1 It works for me.

vtc94 avatar Jan 15 '24 03:01 vtc94