when uses V1 model error #206

Open
opened 2026-01-29 21:45:41 +00:00 by claunia · 3 comments
Owner

Originally created by @sicoll on GitHub (Jul 13, 2022).

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

Originally created by @sicoll on GitHub (Jul 13, 2022). 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 <module> 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 <module> 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 <module> 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
Author
Owner

@linyia01 commented on GitHub (Apr 3, 2023):

got the same

@linyia01 commented on GitHub (Apr 3, 2023): got the same
Author
Owner

@SamPse commented on GitHub (May 31, 2023):

Any solution for this error

@SamPse commented on GitHub (May 31, 2023): Any solution for this error
Author
Owner

@AlionSSS commented on GitHub (Sep 2, 2023):

There is a solution. https://github.com/TencentARC/GFPGAN/issues/190#issuecomment-1132299349

@AlionSSS commented on GitHub (Sep 2, 2023): There is a solution. [https://github.com/TencentARC/GFPGAN/issues/190#issuecomment-1132299349](https://github.com/TencentARC/GFPGAN/issues/190#issuecomment-1132299349)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: TencentARC/GFPGAN#206