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

[REQUEST] Documentation/Tips on using the Looping Functions #19

Closed
Gerkinfeltser opened this issue Jan 12, 2024 · 6 comments
Closed

[REQUEST] Documentation/Tips on using the Looping Functions #19

Gerkinfeltser opened this issue Jan 12, 2024 · 6 comments

Comments

@Gerkinfeltser
Copy link

Hello Trung0246,

I'm reaching out to express my appreciation for your work on comfyui! I'm currently delving into the looping functionality which seems unique and super powerful, and find myself needing a bit more guidance to fully utilize them.

Could you provide additional documentation or examples that clarify the intended use-cases, practical implementation, and any best practices for these looping functions? I've looked through your example workflow in the repository but still can't quite wrap my head around it honestly.

Your insights would be invaluable to me and others in the community looking to deepen our understanding of these features! Thank you for your time and for the invaluable resource you've created. Your expertise and assistance are greatly appreciated!

@Trung0246
Copy link
Owner

Trung0246 commented Jan 13, 2024

I'm planning on rework the Hold node soon so stay tuned :)

@Trung0246
Copy link
Owner

Trung0246 commented Jan 20, 2024

workflow_loop_demo

The latest patch I have reworked the Hold node. This workflow example (embedded in the image) should be the starting point for messing around with Loop :)

@Gerkinfeltser
Copy link
Author

Hello again, I actually updated the extension & ran the workflow above again. I'm still getting an error but it seems different. You also asked for the node number. I'm attaching an image of that as well! Both attached images are from the top chain of the workflow. I notice there is a "key: 44" (first image) as well as a node with #44. Not sure if that means anything (second image).

got prompt
ERROR:root:Failed to validate prompt for output 37:
ERROR:root:* (prompt):
ERROR:root:  - Required input is missing: data
ERROR:root:* 0246.Beautify 37:
ERROR:root:  - Required input is missing: data
ERROR:root:Output will be ignored
ERROR:root:Failed to validate prompt for output 41:
ERROR:root:* (prompt):
ERROR:root:  - Required input is missing: data
ERROR:root:* 0246.Beautify 41:
ERROR:root:  - Required input is missing: data
ERROR:root:Output will be ignored
Prompt executor has been patched by Job Iterator!
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "C:\ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 84, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ai\ComfyUI_windows_portable\ComfyUI\execution.py", line 68, in map_node_over_list
    results.append(getattr(obj, func)(**input_data_all))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ai\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-0246\nodes.py", line 933, in execute
    lib0246.hijack(execution, "map_node_over_list", map_node_over_list_param_handle)
        ^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '44'

Prompt executed in 0.01 seconds

image
image

@Trung0246
Copy link
Owner

Trung0246 commented Jan 25, 2024

Can you download the latest patch and run the workflow again (if that does not fix then you can directly download this repo and place the content to be in the same folder)? Also you can try to update ComfyUI itself and see if it's help.

Honestly this bug is extremely weird and I have no idea why it could cause this at all.

If there's some weird problem with workflow serialization then you probably could try to delete everything and starting from scratch, placing nodes manually 1:1 with the _key_id to be exact same configuration and see if that work.

If you don't mind we could chat about this in discord and see how the issue on your side since for my side I cannot replicate the bug at all.

@Gerkinfeltser
Copy link
Author

Starting out, I'll just update my comfy (& the 0246 extension) & see if that fixes it. I'll get back to you. 😄

@Gerkinfeltser
Copy link
Author

Yep, it must have been comfy being out of date! Seems to be working fine after doing an "Update All" via manager. Sorry for the false alarm!

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