Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program do not proceed. #837

Open
Talha-JinTech opened this issue Aug 12, 2024 · 1 comment
Open

Program do not proceed. #837

Talha-JinTech opened this issue Aug 12, 2024 · 1 comment

Comments

@Talha-JinTech
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@guyuekai @Talha-JinTech and others