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

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

Open
cardenluo opened this issue Nov 7, 2024 · 4 comments

Comments

@cardenluo
Copy link

image
ComfyUI Error Report

Error Details

  • Node ID: 11
  • Node Type: dzOmniGenWrapper
  • Exception Type: AssertionError
  • Exception Message: total images must be the same as the number of image tags, got 1 image tags and 2 images

Stack Trace

  File "F:\ComfyUI_windows_portable\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:\ComfyUI_windows_portable\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:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-0246\utils.py", line 353, in new_func
    res_value = old_func(*final_args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\omnigen.py", line 130, in run_omnigen
    output = self.model.pipe(
             ^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\OmniGen\pipeline.py", line 220, 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:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\OmniGen\processor.py", line 130, in __call__
    mllm_input = self.process_multi_modal_prompt(cur_instruction, cur_input_images)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\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"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

System Information

  • ComfyUI Version: v0.2.6-7-gfabf449
  • Arguments: F:\ComfyUI_windows_portable\ComfyUI\main.py --auto-launch --preview-method auto --disable-cuda-malloc
  • OS: nt
  • Python Version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.4.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 25769279488
    • VRAM Free: 16340273220
    • Torch VRAM Total: 8086618112
    • Torch VRAM Free: 1361988

Logs

@chflame163
Copy link
Owner

The description of {image} in prompt should match the input image

@adamreading
Copy link

image ComfyUI Error Report

Error Details

  • Node ID: 11
  • Node Type: dzOmniGenWrapper
  • Exception Type: AssertionError
  • Exception Message: total images must be the same as the number of image tags, got 1 image tags and 2 images

Stack Trace

  File "F:\ComfyUI_windows_portable\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:\ComfyUI_windows_portable\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:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-0246\utils.py", line 353, in new_func
    res_value = old_func(*final_args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "F:\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\omnigen.py", line 130, in run_omnigen
    output = self.model.pipe(
             ^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\utils\_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\OmniGen\pipeline.py", line 220, 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:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\OmniGen\processor.py", line 130, in __call__
    mllm_input = self.process_multi_modal_prompt(cur_instruction, cur_input_images)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_OmniGen_Wrapper\py\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"
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

System Information

  • ComfyUI Version: v0.2.6-7-gfabf449
  • Arguments: F:\ComfyUI_windows_portable\ComfyUI\main.py --auto-launch --preview-method auto --disable-cuda-malloc
  • OS: nt
  • Python Version: 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.4.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync

    • Type: cuda
    • VRAM Total: 25769279488
    • VRAM Free: 16340273220
    • Torch VRAM Total: 8086618112
    • Torch VRAM Free: 1361988

Logs

I think if you have 2 images attached you need to reference them both in the prompt - “Place the girl from {image_1} and the girl from {image_2} into a night club with dancing and flashing lights”

@cardenluo
Copy link
Author

@adamreading @chflame163 Understood,thank you

@adamreading
Copy link

@adamreading @chflame163 Understood,thank you

I have been testing every version of Omnigen for 2 weeks lol. I have a lot of experience now. Can’t make yours load yet but will get there. I’m in a cloud server with limited ability to run commands. I have access to the install Pip packages in comfyui manager menu, Can you pip install requirements.text like this? python -s -m pip install -r ComfyUI/custom_nodes/ComfyUI_OmniGen_Wrapper/requirements.txt in that place? What’s the exact words?

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

3 participants