Skip to content

AssertionError: total images must be the same as the number of image tags, got 1 image tags and 2 images #214

@susht3

Description

@susht3

i use 2 images as input, and get this error:
Traceback (most recent call last):
File "/mnt/afs/OmniGen/demo.py", line 45, in
gen(prompt, input_images, saved_path)
File "/mnt/afs/OmniGen/demo.py", line 21, in gen
images = pipe(
File "/mnt/afs/conda/envs/controlplus/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/mnt/afs/OmniGen/OmniGen/pipeline.py", line 221, in call
input_data = self.processor(prompt, input_images, height=height, width=width, use_img_cfg=use_img_guidance, separate_cfg_input=separate_cfg_infer, use_input_image_size_as_output=use_input_image_size_as_output)
File "/mnt/afs/OmniGen/OmniGen/processor.py", line 130, in call
mllm_input = self.process_multi_modal_prompt(cur_instruction, cur_input_images)
File "/mnt/afs/OmniGen/OmniGen/processor.py", line 76, in process_multi_modal_prompt
assert len(unique_image_ids) == len(input_images), f"total images must be the same as the number of image tags, got {len(unique_image_ids)} image tags and {len(input_images)} images"
AssertionError: total images must be the same as the number of image tags, got 1 image tags and 2 images

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