ComfyUI_Comfyroll_CustomNodes icon indicating copy to clipboard operation
ComfyUI_Comfyroll_CustomNodes copied to clipboard

Error loading 'CR Load Prompt Style'

Open jquintanilla4 opened this issue 2 years ago • 5 comments

I just updated comfyui and all the custom nodes from within comfyui manager, and now I got this error on the terminal window. Never had that before. It seems to be looking for a styles folder that I never had before. How do I fix this? should I just create an empty styles folder?

Here's the error:

[ERROR] An error occurred while retrieving information for the 'CR Load Prompt Style' node.
Traceback (most recent call last):
  File "C:\sd\ComfyUI_windows_portable\ComfyUI\server.py", line 418, in get_object_info
    out[x] = node_info(x)
  File "C:\sd\ComfyUI_windows_portable\ComfyUI\server.py", line 396, in node_info
    info['input'] = obj_class.INPUT_TYPES()
  File "C:\sd\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\animation_nodes\prompt.py", line 296, in INPUT_TYPES
    self.json_data, styles = load_styles_from_directory(style_directory)
  File "C:\sd\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes\animation_nodes\json_functions.py", line 38, in load_styles_from_directory
    json_files = [os.path.join(directory, file) for file in os.listdir(directory) if file.endswith('.json') and os.path.isfile(os.path.join(directory, file))]
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\sd\\ComfyUI_windows_portable\\ComfyUI\\styles'

jquintanilla4 avatar Nov 30 '23 08:11 jquintanilla4

Hi, Apologies for this error. I think I know what is causing this. The node is looking for a missing folder. As a workaround, until a fix is ready, add a folder in \ComfyUI_windows_portable\ComfyUI called 'styles'. Please let me know if this works. Suzie

Suzie1 avatar Nov 30 '23 09:11 Suzie1

It wo

Hi, Apologies for this error. I think I know what is causing this. The node is looking for a missing folder. As a workaround, until a fix is ready, add a folder in \ComfyUI_windows_portable\ComfyUI called 'styles'. Please let me know if this works. Suzie

It works on linux

mdimitrovg avatar Nov 30 '23 13:11 mdimitrovg

same issue on linux. If I add the style folder then it complains it doesn't find the styles.csv file

segalinc avatar Nov 30 '23 16:11 segalinc

Hi, I disabled CR Load Prompt Style until a solution can be found. @segalinc hopefully this will work for you now.

Suzie1 avatar Nov 30 '23 18:11 Suzie1

Hi, sorry for the late reply. I added the 'styles' folder to my comfyui directory as you suggested. It worked. This is on windows 11.

jquintanilla4 avatar Dec 01 '23 04:12 jquintanilla4