XPixelGroup / DiffBIR

Official codes of DiffBIR: Towards Blind Image Restoration with Generative Diffusion Prior
Apache License 2.0
3.13k stars 264 forks source link

PermissionError: [Errno 13] Permission denied #14

Open ffdown opened 9 months ago

ffdown commented 9 months ago

(diffbir) E:\AI>python e:\ai\diffbir\inference.py --config E:\AI\DiffBIR\configs\model\cldm.yaml --ckpt E:\AI\DiffBIR\ckpt --reload_swinir --swinir_ckpt E:\AI\DiffBIR\ckpt --steps 50 --input E:\AI\DiffBIR\lq_dir --sr_scale 1 --image_size 512 --color_fix_type wavelet --resize_back --output E:\AI\DiffBIR\hq_dirE:\AI\DiffBIR\inference.py --config E:\AI\DiffBIR\configs\model\cldm.yaml --ckpt E:\AI\DiffBIR\ckpt --reload_swinir --swinir_ckpt E:\AI\DiffBIR\ckpt --steps 50 --input E:\AI\DiffBIR\lq_dir --sr_scale 1 --image_size 512 --color_fix_type wavelet --resize_back --output E:\AI\DiffBIR\hq_dir E:\Anaconda3\envs\diffbir\lib\site-packages\torchaudio\backend\utils.py:62: UserWarning: No audio backend is available. warnings.warn("No audio backend is available.") No module 'xformers'. Proceeding without it. Global seed set to 231 ControlLDM: Running in eps-prediction mode DiffusionWrapper has 865.91 M params. making attention of type 'vanilla' with 512 in_channels Working with z of shape (1, 4, 32, 32) = 4096 dimensions. making attention of type 'vanilla' with 512 in_channels E:\Anaconda3\envs\diffbir\lib\site-packages\torch\functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\cb\pytorch_1000000000000\work\aten\src\ATen\native\TensorShape.cpp:2895.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] Setting up [LPIPS] perceptual loss: trunk [alex], v[0.1], spatial [off] E:\Anaconda3\envs\diffbir\lib\site-packages\torchvision\models_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and will be removed in 0.15, please use 'weights' instead. warnings.warn( E:\Anaconda3\envs\diffbir\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 will be removed in 0.15. The current behavior is equivalent to passing weights=AlexNet_Weights.IMAGENET1K_V1. You can also use weights=AlexNet_Weights.DEFAULT to get the most up-to-date weights. warnings.warn(msg) Loading model from: E:\Anaconda3\envs\diffbir\lib\site-packages\lpips\weights\v0.1\alex.pth Traceback (most recent call last): File "e:\ai\diffbir\inference.py", line 212, in main() File "e:\ai\diffbir\inference.py", line 140, in main load_state_dict(model, torch.load(args.ckpt, map_location="cpu"), strict=True) File "E:\Anaconda3\envs\diffbir\lib\site-packages\torch\serialization.py", line 699, in load with _open_file_like(f, 'rb') as opened_file: File "E:\Anaconda3\envs\diffbir\lib\site-packages\torch\serialization.py", line 230, in _open_file_like return _open_file(name_or_buffer, mode) File "E:\Anaconda3\envs\diffbir\lib\site-packages\torch\serialization.py", line 211, in init super(_open_file, self).init(open(name, mode)) PermissionError: [Errno 13] Permission denied: 'E:\AI\DiffBIR\ckpt'

wangxinchao-bit commented 5 months ago

When you load the model weigths,you don't have the permission for the directory.