Skip to content

TypeError: forward() missing 1 required positional argument: 'ref_im' #3

@thakral-kartik

Description

@thakral-kartik

While running the repo. locally, I am facing the above-mentioned error in the else statement of "run.py". To run this code, a face image was copied in the "realpics" folder and align_face.py was run on that image. The detected face was saved in the input folder and finally, "run.py" was used to obtain the final result and the above-mentioned error was faced. Please suggest.

root@5c4c9f55e943:/workspace# python run.py
Loading Synthesis Network
Traceback (most recent call last):
File "run.py", line 80, in <module>
out_im = model(ref_im,**kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl result = self.forward(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py", line 161, in forward
outputs = self.parallel_apply(replicas, inputs, kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/data_parallel.py", line 171, in parallel_apply
return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)])
File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/parallel_apply.py", line 86, in parallel_apply output.reraise()
File "/usr/local/lib/python3.8/dist-packages/torch/_utils.py", line 428, in reraise raise self.exc_type(msg)
TypeError: Caught TypeError in replica 1 on device 1.
Original Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/torch/nn/parallel/parallel_apply.py", line 61, in _worker output = module(*input, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
TypeError: forward() missing 1 required positional argument: 'ref_im'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions