Saying "no motion length are specified" for python gen_t2m.py --gpu_id 1 --ext exp2 --text_path ./assets/text_prompt.txt as long as the text_prompt.txt file contains the new line character \n.
for line in lines:
infos = line.split('#')
prompt_list.append(infos[0])
if len(infos) == 1 or (not infos[1].isdigit()):
est_length = True
length_list = []
else:
length_list.append(int(infos[-1]))
The problem here is that infos[1] is going to be <Number>\n after the split by '#' and therefore never pass the isdigit() check. Adding line.strip() before the split should fix this.
for line in lines:
line = line.strip()
infos = line.split('#')
Saying "no motion length are specified" for
python gen_t2m.py --gpu_id 1 --ext exp2 --text_path ./assets/text_prompt.txt
as long as thetext_prompt.txt
file contains the new line character\n
.The problem here is that
infos[1]
is going to be<Number>\n
after the split by '#' and therefore never pass theisdigit()
check. Addingline.strip()
before the split should fix this.