mirror of
https://github.com/TencentARC/GFPGAN.git
synced 2026-02-17 23:04:33 +00:00
NameError: name 'fused_act_ext' is not defined #104
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @YaZlob on GitHub (Nov 12, 2021).
im finetune model on my data with docker and have error NameError: name 'fused_act_ext' is not defined, Im downloaded all files from Installation part.
start command: python -m torch.distributed.launch --nproc_per_node=2 --master_port=22021 gfpgan/train.py -opt options/train_gfpgan_v1.yml --launcher pytorch and all models sucessfuly crated but after INFO: Start training from epoch: 0, iter: 0 i have:
Traceback (most recent call last):
File "gfpgan/train.py", line 11, in
train_pipeline(root_path)
File "/opt/conda/lib/python3.8/site-packages/basicsr/train.py", line 169, in train_pipeline
model.optimize_parameters(current_iter)
File "/home/gfpgan/models/gfpgan_model.py", line 305, in optimize_parameters
self.output, out_rgbs = self.net_g(self.lq, return_rgb=True)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 619, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/gfpgan/archs/gfpganv1_arch.py", line 347, in forward
Traceback (most recent call last):
File "gfpgan/train.py", line 11, in
feat = self.conv_body_first(x)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
train_pipeline(root_path)
File "/opt/conda/lib/python3.8/site-packages/basicsr/train.py", line 169, in train_pipeline
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
model.optimize_parameters(current_iter)
File "/home/gfpgan/models/gfpgan_model.py", line 305, in optimize_parameters
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/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 "/opt/conda/lib/python3.8/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
self.output, out_rgbs = self.net_g(self.lq, return_rgb=True)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
File "/opt/conda/lib/python3.8/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
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/distributed.py", line 619, in forward
output = self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/gfpgan/archs/gfpganv1_arch.py", line 347, in forward
feat = self.conv_body_first(x)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/container.py", line 117, in forward
input = module(input)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/opt/conda/lib/python3.8/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 "/opt/conda/lib/python3.8/site-packages/basicsr/ops/fused_act/fused_act.py", line 95, in fused_leaky_relu
return FusedLeakyReLUFunction.apply(input, bias, negative_slope, scale)
File "/opt/conda/lib/python3.8/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
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/conda/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/conda/lib/python3.8/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/opt/conda/lib/python3.8/site-packages/torch/distributed/launch.py", line 255, in main
raise subprocess.CalledProcessError(returncode=process.returncode,
subprocess.CalledProcessError: Command '['/opt/conda/bin/python', '-u', 'gfpgan/train.py', '--local_rank=1', '-opt', 'options/train_gfpgan_v1.yml', '--launcher', 'pytorch']' returned non-zero exit status 1.
@JohnW2all commented on GitHub (Mar 5, 2023):
I meet the same question, too.
@ggsddu7 commented on GitHub (Apr 20, 2023):
env BASICSR_JIT=True