You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I need to use this preparing model "006_CAR_DFWB_s126w7_SwinIR-M_jpeg10.pth" to enhance the image quality, I update on the code in the Collab to be like this:
/content/Real-ESRGAN/Real-ESRGAN/BSRGAN
LogHandlers setup!
24-12-21 22:50:56.006 : Model Name : BSRGAN
24-12-21 22:50:56.023 : GPU ID : 0
[3, 3, 64, 23, 32, 4]
/content/Real-ESRGAN/Real-ESRGAN/BSRGAN/main_test_bsrgan.py:77: 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.
model.load_state_dict(torch.load(model_path), strict=True)
24-12-21 22:50:56.598 : Input Path : testsets/RealSRSet
24-12-21 22:50:56.598 : Output Path : testsets/RealSRSet_results_x4
24-12-21 22:50:56.598 : ---1 --> BSRGAN --> x4--> img_004x2.png
/content/Real-ESRGAN/Real-ESRGAN
Traceback (most recent call last):
File "/content/Real-ESRGAN/Real-ESRGAN/inference_realesrgan.py", line 5, in <module>
from basicsr.archs.rrdbnet_arch import RRDBNet
File "/usr/local/lib/python3.10/dist-packages/basicsr/__init__.py", line 4, in <module>
from .data import *
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/__init__.py", line 22, in <module>
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/__init__.py", line 22, in <listcomp>
_dataset_modules = [importlib.import_module(f'basicsr.data.{file_name}') for file_name in dataset_filenames]
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/realesrgan_dataset.py", line 11, in <module>
from basicsr.data.degradations import circular_lowpass_kernel, random_mixed_kernels
File "/usr/local/lib/python3.10/dist-packages/basicsr/data/degradations.py", line 8, in <module>
from torchvision.transforms.functional_tensor import rgb_to_grayscale
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor'
/usr/local/lib/python3.10/dist-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
loading model from /content/Real-ESRGAN/experiments/pretrained_models/006_CAR_DFWB_s126w7_SwinIR-M_jpeg10.pth
/usr/local/lib/python3.10/dist-packages/torch/functional.py:534: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3595.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py:189: 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.
pretrained_model = torch.load(args.model_path)
Traceback (most recent call last):
File "/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py", line 309, in <module>
main()
File "/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py", line 60, in main
for idx, path in enumerate(sorted(glob.glob(os.path.join(folder, '*')))):
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
/usr/local/lib/python3.10/dist-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
loading model from /content/Real-ESRGAN/experiments/pretrained_models/006_CAR_DFWB_s126w7_SwinIR-M_jpeg20.pth
/usr/local/lib/python3.10/dist-packages/torch/functional.py:534: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3595.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py:189: 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.
pretrained_model = torch.load(args.model_path)
Traceback (most recent call last):
File "/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py", line 309, in <module>
main()
File "/content/Real-ESRGAN/Real-ESRGAN/SwinIR/main_test_swinir.py", line 60, in main
for idx, path in enumerate(sorted(glob.glob(os.path.join(folder, '*')))):
File "/usr/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The text was updated successfully, but these errors were encountered:
Hello,
I need to use this preparing model "006_CAR_DFWB_s126w7_SwinIR-M_jpeg10.pth" to enhance the image quality, I update on the code in the Collab to be like this:
But I have this error, any advice please?
The text was updated successfully, but these errors were encountered: