omerbt / TokenFlow

Official Pytorch Implementation for "TokenFlow: Consistent Diffusion Features for Consistent Video Editing" presenting "TokenFlow" (ICLR 2024)
https://diffusion-tokenflow.github.io
MIT License
1.56k stars 135 forks source link

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" #17

Open killporter opened 1 year ago

killporter commented 1 year ago

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: Notebookcolab.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 1 year ago

10

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