Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing Truncation/Padding during Prefix Tokenization #83

Open
tsrikris opened this issue Sep 6, 2024 · 0 comments
Open

Removing Truncation/Padding during Prefix Tokenization #83

tsrikris opened this issue Sep 6, 2024 · 0 comments

Comments

@tsrikris
Copy link

tsrikris commented Sep 6, 2024

In lwm/vision_generation.py, the max_input_length is capped to 128 characters img_enc, img = generate_first_frame(prompts, max_input_length=128). In this case, any longer prompts provided via 'scripts/run_sample_image.sh' will be truncated to 128 characters. The suggestion here is to update the 'generate_first_frame' function to use the tokenizer's 'longest' padding mode to dynamically set the length instead of padding/truncation, i.e inputs = prefix_tokenizer(prompts, padding='longest',return_tensors='np').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant