Skip to content

ValueError: The following model_kwargs are not used by the model: ['images', 'image_sizes'] #25

@an287-git

Description

@an287-git

Thank you for your awesome work! When I using the MLLM with UniTok, I met some problems:
When run:

with torch.inference_mode():
                output_ids = model.generate(
                    input_ids,
                    image=image_tensor.unsqueeze(0).half().cuda(),
                    image_sizes=[image.size],
                    do_sample=True if args.temperature > 0 else False,
                    temperature=args.temperature,
                    top_p=args.top_p,
                    num_beams=args.num_beams,
                    # no_repeat_ngram_size=3,
                    max_new_tokens=1024,
                    use_cache=True)

Got:
ValueError: The following model_kwargs are not used by the model: ['images', 'image_sizes'] (note: typos in the generate arguments will also show up in this list)

Could you give me some idea?Thank!

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