xinntao / Real-ESRGAN

Real-ESRGAN aims at developing Practical Algorithms for General Image/Video Restoration.
BSD 3-Clause "New" or "Revised" License
27.7k stars 3.48k forks source link

Program do not proceed. #837

Open Talha-JinTech opened 1 month ago

Talha-JinTech commented 1 month ago

I have cloned the project installed the required dependencies. I'm using python 3.12 and PyCharm

After i run these scripts: any of the below ones.

python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance python inference_realesrgan.py -n RealESRGAN_x4plus -i test6.jpeg --face_enhance

I get few warnings and then my program is stuck

C:\Users\Talha\PycharmProjects\Real-ESRGAN\realesrgan\utils.py:63: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. loadnet = torch.load(model_path, map_location=torch.device('cpu')) C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead. warnings.warn( C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\torchvision\models_utils.py:223: UserWarning: Arguments other than a weight enum or None for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing weights=None. warnings.warn(msg) C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\facexlib\detection__init.py:22: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a futu re release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they a re explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. load_net = torch.load(model_path, map_location=lambda storage, loc: storage) C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\facexlib\parsing\init__.py:20: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle mo dule implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. load_net = torch.load(model_path, map_location=lambda storage, loc: storage) C:\Users\Talha\PycharmProjects\Real-ESRGAN\venv\Lib\site-packages\gfpgan\utils.py:92: FutureWarning: You are using torch.load with weights_only=False (the current default value), which uses the default pickle module implicit ly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for weights_only will be flipped to True. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly a llowlisted by the user via torch.serialization.add_safe_globals. We recommend you start setting weights_only=True for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. loadnet = torch.load(model_path)

Testing 0 00003

So the above line Testing 0 0003 or if i provide my own image it is Testing 0 test6 and then its stuck there and do not do anything i had waited around 45 minutes

guyuekai commented 3 weeks ago

我也遇到同样的问题,请问解决了吗