Skip to content

Extend Start Loop so it allows input types like Latent, Image, Audio and what not. #16648

Description

@OcBuddy

Feature Idea

It seems when input for the StartLoop doesn't like some types. Image/Latent i know of.
It appears to accept only str.

[ERROR] Traceback (most recent call last):
  File "/comfyui/execution.py", line 547, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/comfyui/execution.py", line 352, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/comfyui/custom_nodes/comfyui-lora-manager/py/metadata_collector/metadata_hook.py", line 177, in async_map_node_over_list_with_metadata
    results = await original_map_node_over_list(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/comfyui/execution.py", line 326, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "/comfyui/execution.py", line 314, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "/comfyui/comfy_api/internal/__init__.py", line 149, in wrapped_func
    return method(locked_class, **inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/comfyui/comfy_api/latest/_io.py", line 2053, in EXECUTE_NORMALIZED
    to_return = cls.execute(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/comfyui/comfy_extras/nodes_string.py", line 59, in execute
    return io.NodeOutput(delimiter.join((string_a, string_b)))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: sequence item 0: expected str instance, Tensor found

This is my testing WF, abstract, do not conduce any meaning from it.
My goal is to pass a list with: a latent, an image collection, audio , an image collection, audio
Image

Existing Solutions

No response

Other

I think it will open up great possibilities if any type could pass as a member of a list, including lists, long as the list going into the initial_iteration_value has the same types and in same index position as going into next_iteration_value and output_value.

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

    FeatureA new feature to add to ComfyUI.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions