HR-VITON icon indicating copy to clipboard operation
HR-VITON copied to clipboard

TypeError - Missing Required Positional Argument in Custom PyTorch Model Training

Open Zhangzqing opened this issue 1 year ago • 7 comments

I am attempting to train a condition generator model using the train_condition.py script from the HR-VITON project, but I am encountering the following error:

TypeError: forward() missing 1 required positional argument: 'input2'

The error occurs when executing the command:

python train_condition.py --cuda True --gpu_ids 0 --Ddownx2 --Ddropout --lasttvonly --interflowloss --occlusion

I have confirmed that the parameters input1 and input2 passed to the forward() method of the tocg model are correctly initialized and contain the correct data. I am using PyTorch version [Your PyTorch version] and Python version [Your Python version].

Does anyone have any suggestions on how to resolve this issue?

Zhangzqing avatar Nov 10 '23 12:11 Zhangzqing

I am also facing the same issue, did you solved it ??

meetncl avatar Nov 29 '23 11:11 meetncl

It's not resolved yet, can I have your contact information? Which chat tool do you usually use? I would like to ask you some questions.

发自我的iPhone

------------------ Original ------------------ From: meetncl @.> Date: Wed,Nov 29,2023 7:10 PM To: sangyun884/HR-VITON @.> Cc: Zhangzqing @.>, Author @.> Subject: Re: [sangyun884/HR-VITON] TypeError - Missing Required PositionalArgument in Custom PyTorch Model Training (Issue #82)

Zhangzqing avatar Nov 29 '23 11:11 Zhangzqing

Hey you contact me on X: @MeetNagadia or Mail: [email protected]

meetncl avatar Nov 30 '23 07:11 meetncl

Have you solved this problem? my friends!

a-meal-is-not-enough avatar Jan 04 '24 12:01 a-meal-is-not-enough

https://colab.research.google.com/drive/1BG-4G6MYmwRZlqctbVVSMC-lj27Cycoh?usp=sharing

Manish989927 avatar Apr 05 '24 12:04 Manish989927

this help you to understand the problems

Manish989927 avatar Apr 05 '24 12:04 Manish989927

thx!I’ll go check it out now.

发自我的iPhone

------------------ Original ------------------ From: Manish @.> Date: Fri,Apr 5,2024 8:24 PM To: sangyun884/HR-VITON @.> Cc: Zhangzqing @.>, Author @.> Subject: Re: [sangyun884/HR-VITON] TypeError - Missing Required PositionalArgument in Custom PyTorch Model Training (Issue #82)

Zhangzqing avatar Apr 05 '24 12:04 Zhangzqing