yumingj / Text2Human

Code for Text2Human (SIGGRAPH 2022). Paper: Text2Human: Text-Driven Controllable Human Image Generation
https://yumingj.github.io/projects/Text2Human.html
Other
826 stars 90 forks source link

RuntimeError: Index put requires the source and destination dtypes match, got Int for the destination and Long for the source. #1

Closed Pavankunchala closed 2 years ago

Pavankunchala commented 2 years ago

I have been trying to get the python ui_demo.py running

when I am trying to generate the image, after loading the pose and generating the shape

I get it no matter what kind of prompt i am giving i even tried to give the ones that are same in the demo

I am getting this error

RuntimeError: Index put requires the source and destination dtypes match, got Int for the destination and Long for the source.

yumingj commented 2 years ago

Hi, thanks for your interest in our work!

May I know which PyTorch version you use? Have you installed the environment by strictly following the ReadMe? We don't have a problem with the UI demo from our side.

Thanks!

Pavankunchala commented 2 years ago

1.11.0

yumingj commented 2 years ago

Could you please kindly show me which line of the code causes the error so that it would be easy for me to track the error? Thanks!

etomasic commented 2 years ago

I also got this error when using pytorch 1.7.1. I fixed it by putting "int(...)" around the right sides of the code in lines 458, 462 and 466 of models/sample_model.py. (The error only appeared for line 458, but I figured I should put it around the other lines given their similarity.)