M3D-VTON icon indicating copy to clipboard operation
M3D-VTON copied to clipboard

Error when train the model

Open hanchaoyuan opened this issue 3 years ago • 5 comments

During training, this error occurs!Do you know how to solve? 154000356-60f0c911-7e81-41ad-9716-766b80650ac5 After I declared the variable I got another error 154394009-75ce6375-6c4a-41fa-b2f4-b94e7e2016cf

hanchaoyuan avatar Feb 17 '22 02:02 hanchaoyuan

Facing the same problem. For the first one, I set imfd_initial to '' and trained the MTM model. Next when I try to train the DRM model, it fails since input['person_fdepth'] is not a torch tensor, instead it's a list which looks like ['', '', '']. How can I fix this? CC: @fyviezhao

captain-pool avatar Feb 19 '22 15:02 captain-pool

This is most likely happening because, the data loader is setting imfd to '' in case of DRM or TFM training and returning it.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/data/aligned_MPV3dDataset.py#L184-L187

This data dictionary is being sent to DRM model's set_input() function, where it is being loaded as a torch tensor and being used to compute gradients.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/models/DRM_model.py#L142-L152

captain-pool avatar Feb 19 '22 15:02 captain-pool

This is most likely happening because, the data loader is setting imfd to '' in case of DRM or TFM training and returning it.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/data/aligned_MPV3dDataset.py#L184-L187

This data dictionary is being sent to DRM model's set_input() function, where it is being loaded as a torch tensor and being used to compute gradients.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/models/DRM_model.py#L142-L152 I think so, but I have not found a suitable solution, do you have a good solution?

hanchaoyuan avatar Mar 15 '22 00:03 hanchaoyuan

I face the same problem, so could you tell me how you solve the problem in MTM model?

jasmine-97 avatar Mar 20 '22 10:03 jasmine-97

Sorry for the late reply. Please check the latest code for training, which should now work well.

fyviezhao avatar Mar 20 '22 10:03 fyviezhao