GFPGAN icon indicating copy to clipboard operation
GFPGAN copied to clipboard

when uses V1 model error

Open sicoll opened this issue 3 years ago • 3 comments

D:\GFPGANclean>python inference_gfpgan.py -i inputs/whole_imgs -o f:/results -v 1 -s 1 D:\SOFT\Python38\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( D:\SOFT\Python38\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=None. warnings.warn(msg) Processing 000001.png ... Traceback (most recent call last): File "inference_gfpgan.py", line 155, in main() File "inference_gfpgan.py", line 119, in main cropped_faces, restored_faces, restored_img = restorer.enhance( File "D:\SOFT\Python38\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "D:\GFPGANclean\gfpgan\utils.py", line 121, in enhance output = self.gfpgan(cropped_face_t, return_rgb=False)[0] File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\GFPGANclean\gfpgan\archs\gfpganv1_arch.py", line 367, in forward feat = self.conv_body_first(x) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\container.py", line 139, in forward input = module(input) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 91, in forward return fused_leaky_relu(input, self.bias, self.negative_slope, self.scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 95, in fused_leaky_relu return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 65, in forward out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale) NameError: name 'fused_act_ext' is not defined

D:\GFPGANclean>python inference_gfpgan.py -i inputs/whole_imgs -o f:/results -v 1 D:\SOFT\Python38\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( D:\SOFT\Python38\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=None. warnings.warn(msg) Processing 000001.png ... Traceback (most recent call last): File "inference_gfpgan.py", line 155, in main() File "inference_gfpgan.py", line 119, in main cropped_faces, restored_faces, restored_img = restorer.enhance( File "D:\SOFT\Python38\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "D:\GFPGANclean\gfpgan\utils.py", line 121, in enhance output = self.gfpgan(cropped_face_t, return_rgb=False)[0] File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\GFPGANclean\gfpgan\archs\gfpganv1_arch.py", line 367, in forward feat = self.conv_body_first(x) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\container.py", line 139, in forward input = module(input) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 91, in forward return fused_leaky_relu(input, self.bias, self.negative_slope, self.scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 95, in fused_leaky_relu return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 65, in forward out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale) NameError: name 'fused_act_ext' is not defined

D:\GFPGANclean>python inference_gfpgan.py -i inputs/whole_imgs -o results -v 1 D:\SOFT\Python38\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( D:\SOFT\Python38\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=None. warnings.warn(msg) Processing 000001.png ... Traceback (most recent call last): File "inference_gfpgan.py", line 155, in main() File "inference_gfpgan.py", line 119, in main cropped_faces, restored_faces, restored_img = restorer.enhance( File "D:\SOFT\Python38\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "D:\GFPGANclean\gfpgan\utils.py", line 121, in enhance output = self.gfpgan(cropped_face_t, return_rgb=False)[0] File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\GFPGANclean\gfpgan\archs\gfpganv1_arch.py", line 367, in forward feat = self.conv_body_first(x) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\container.py", line 139, in forward input = module(input) File "D:\SOFT\Python38\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 91, in forward return fused_leaky_relu(input, self.bias, self.negative_slope, self.scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 95, in fused_leaky_relu return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale) File "D:\SOFT\Python38\lib\site-packages\basicsr\ops\fused_act\fused_act.py", line 65, in forward out = fused_act_ext.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale) NameError: name 'fused_act_ext' is not defined

sicoll avatar Jul 13 '22 02:07 sicoll

got the same

linyia01 avatar Apr 03 '23 11:04 linyia01

Any solution for this error

SamPse avatar May 31 '23 08:05 SamPse