omerbt/TokenFlow

Tried to build a colab notebook, but got "ValueError: attempt to get argmax of an empty sequence" when running "!python /content/TokenFlow/run_tokenflow_pnp.py"

killporter opened this issue · 1 comments

Tried to build a colab notebook, but got "ValueError: attempt to get argmax of an empty sequence" when running "!python /content/TokenFlow/run_tokenflow_pnp.py"

i tried to build the sequent notebook:
Notebook_colab_.txt

but even if i have my preprocessed data corretly in "/content/TokenFlow/data/test5" the frames, and in "/content/TokenFlow/latents/sd_ControlNet/test5" frames, latent etc, i still get an error trying with both paths, what is wrong?

szriru commented

#10

for windows,
change
n_frames = [int([x for x in latents_path[i].split('/') if 'nframes' in x][0].split('')[1]) for i in range(len(latents_path))]
to
n_frames = [int(os.path.basename(x).split('
')[1]) for x in latents_path if 'nframes_' in x]