You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update readme to instruct how to run using virtualenv on windows.
Add some file's patterns to .gitignore file.
Add kornia and av dependencies to requirements.txt
Add requirements-torch.txt with cuda support.
Why
I was getting an error when the function tried to get the number of frames.
Description
Traceback (most recent call last):
File "C:\Projetos\TokenFlow\run_tokenflow_pnp.py", line 304, in <module>
run(config)
File "C:\Projetos\TokenFlow\run_tokenflow_pnp.py", line 283, in run
editor = TokenFlow(config)
File "C:\Projetos\TokenFlow\run_tokenflow_pnp.py", line 61, in __init__
self.latents_path = self.get_latents_path()
File "C:\Projetos\TokenFlow\run_tokenflow_pnp.py", line 122, in get_latents_path
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))]
File "C:\Projetos\TokenFlow\run_tokenflow_pnp.py", line 122, in<listcomp>
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))]
ValueError: invalid literal for int() with base 10: '2.1\\woman-running\\steps'
This is the corrected code for Windows OS in
"run_tokenflow_pnp.py"
instead of
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))]
write this:
n_frames = [int(os.path.basename(x).split('')[1]) for x in latents_path if 'nframes' in x]
This is the corrected code for Windows OS in "run_tokenflow_pnp.py" instead of 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))] write this: n_frames = [int(os.path.basename(x).split('')[1]) for x in latents_path if 'nframes' in x]
Thanks, That works. I guess I can remove regular expressions to make it simple.
Traceback (most recent call last):
File "D:\TokenFlow\run_tokenflow_pnp.py", line 302, in
run(config)
File "D:\TokenFlow\run_tokenflow_pnp.py", line 281, in run
editor = TokenFlow(config)
File "D:\TokenFlow\run_tokenflow_pnp.py", line 60, in init
self.latents_path = self.get_latents_path()
File "D:\TokenFlow\run_tokenflow_pnp.py", line 119, in get_latents_path
n_frames = [int(os.path.basename(x).split('')[1]) for x in latents_path if 'nframes' in x]
File "D:\TokenFlow\run_tokenflow_pnp.py", line 119, in
n_frames = [int(os.path.basename(x).split('')[1]) for x in latents_path if 'nframes' in x]
ValueError: empty separator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Why
I was getting an error when the function tried to get the number of frames.
Description