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

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

Open
kaykay-drills opened this issue Nov 4, 2024 · 1 comment

Comments

@kaykay-drills
Copy link

I encountered this error while generating

got prompt
Loading safetensors
two beautiful slavic curvaceous sisters smiling and hugging each other
!!! Exception during processing !!! total images must be the same as the number of image tags, got 0 image tags and 1 images
Traceback (most recent call last):
  File "F:\COMFY-UI\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\COMFY-UI\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\COMFY-UI\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "F:\COMFY-UI\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\COMFY-UI\ComfyUI\custom_nodes\OmniGen-ComfyUI\__init__.py", line 108, in gen
    output = pipe(
             ^^^^^
  File "F:\COMFY-UI\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "F:\COMFY-UI\ComfyUI\custom_nodes\OmniGen-ComfyUI\OmniGen\pipeline.py", line 214, 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 "F:\COMFY-UI\ComfyUI\custom_nodes\OmniGen-ComfyUI\OmniGen\processor.py", line 130, in __call__
    mllm_input = self.process_multi_modal_prompt(cur_instruction, cur_input_images)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "F:\COMFY-UI\ComfyUI\custom_nodes\OmniGen-ComfyUI\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 0 image tags and 1 images

Prompt executed in 57.33 seconds
Screenshot 2024-11-04 210440
@PrometheusDante
Copy link

The images need to be referenced within the prompt like:

"two beautiful slavic curvaceous sisters, as seen in image_1 and image_2, smiling and hugging each other"

You should also update the pack and reload/fix the node, because the latent in your screenshot is still optional (optional:⭕, mandatory:🔴), and it is mandatory now. The control_after_generate has an invalid value as well

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

2 participants