Skip to content

Removing Truncation/Padding during Prefix Tokenization #83

Description

@tsrikris

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').

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions