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

Getting 'list index out of range' Error in ComfyUI on Mac Studio - Any Tips?" #7096

Open
Nullnosis opened this issue Mar 6, 2025 · 2 comments
Labels
User Support A user needs help with something, probably not a bug.

Comments

@Nullnosis
Copy link

Nullnosis commented Mar 6, 2025

Image

Image

Getting 'IndexError: list index out of range' in ComfyUI - Help with LoRA Caption Save Node

Image

Hi all,

I’m using ComfyUI on a Mac Studio (M1 Ultra, 64GB) and running into a "list index out of range" error. I'm connecting the LoRA Caption Load node to the WD14 Tagger, and then to the LoRA Caption Save node. I'm pointing to a folder with both .png images and .txt caption files within my ComfyUI folder.

Am I doing something wrong in this setup, or is there something specific I need to watch out for? Any tips or alternative techniques for creating my own LoRA model?

Thanks in advance!

Logs

File "/Users/XUSERY/ComfyUI/execution.py", line 327, 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 "/Users/XUSERY/ComfyUI/execution.py", line 202, 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 "/Users/XUSERY/ComfyUI/execution.py", line 174, in _map_node_over_list
    process_inputs(input_dict, i)

  File "/Users/XUSERY/ComfyUI/execution.py", line 163, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/XUSERY/ComfyUI/custom_nodes/Image-Captioning-in-ComfyUI/LoRAcaption.py", line 53, in save_text_file
    filename = self.generate_filename(path, namelistsplit, file_extension)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/Users/XUSERY/ComfyUI/custom_nodes/Image-Captioning-in-ComfyUI/LoRAcaption.py", line 65, in generate_filename
    filename = f"{namelistsplit[counter-1]}{extension}"
                  ~~~~~~~~~~~~~^^^^^^^^^^^

Other

No response

@Nullnosis Nullnosis added the User Support A user needs help with something, probably not a bug. label Mar 6, 2025
@yitao2020
Copy link

Why don't you upload screenshots of your workflow? It's a system info image, and it's not possible to fully understand the problem by simply reading the error log.

@Nullnosis
Copy link
Author

Sorry about that .I updated screen shots to my Lora Setup for Training . Im still learning all of this , and using Gbt to get a better grasp , It seems like something is up with my Loracaption.py file . I keep hitting this brick wall. Any help is much appreciated!

#7096 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
User Support A user needs help with something, probably not a bug.
Projects
None yet
Development

No branches or pull requests

2 participants