ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Error. No naistyles.csv found when connect comfyui web

Open eilinge opened this issue 9 months ago • 6 comments

"Error. No naistyles.csv found" when running comfyui, how to fix it? Since importing a production flow about clay and installing the missing nodes, comfyui can start normally, but this error will be reported when connecting to comfyui web.

eilinge avatar May 13 '24 03:05 eilinge

"naistyles.csv" is not part of comfy it is related to one of your nodes, or is saved in the workflow somehow. Please go through the nodes in your workflow and consult the github's of the appropriate creators.

shawnington avatar May 13 '24 05:05 shawnington

This problem also occurs when I clear the workflow. This error log does not indicate which node is causing it.

eilinge avatar May 13 '24 05:05 eilinge

This error indicates that naisytles.csv needs to be placed in the ComfyUI-NAI_mod/CSV node, but the custom node is not found in github.

eilinge avatar May 13 '24 05:05 eilinge

This problem also occurs when I clear the workflow. This error log does not indicate which node is causing it.

There is no "naistyles.csv" in the comfy repo. Unfortunately errors are not always helpful. It is related to one of your nodes, they are created by individual people, and not part of an official repository that adhereds to a rigorous standard. We are looking into improving this however, Ive been told.

The best we can do for you is tell you to check the github's of all nodes you are using and see if any of them have that file, and if you post which repo and the complete error text, I will try and resolve it, even though it should technically be an issue on the offending nodes GitHub.

Some times people do remove nodes from their packs without depreciating them, and if you updated, you are kinda out of luck unless you manually reinstall the previous version that had the node.

shawnington avatar May 13 '24 05:05 shawnington

this issue come from ComfyUI-Universal-Styler, uninstall it you should be fine.

mskiller avatar May 14 '24 08:05 mskiller

I am experiencing the same issue. It seems to be a message from the ComfyUI-Universal-Styler node. Here is the error output code:

https://github.com/KoreTeknology/ComfyUI-Universal-Styler/blob/main/naistyler_nodes.py#L106

The path mentioned in the error and the actual path it is trying to load are different, and it can be seen that the error message is misleading.

If you want to prevent the error, you can do the following:

  1. Create a ComfyUI-NAI-styler directory under the custom_nodes directory.
  2. Create an __init__.py file under the ComfyUI-NAI-styler directory with the following content:
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS']
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
  1. Create a CSV directory under the ComfyUI-NAI-styler directory .

  2. Create three empty files under the CSV directory:

    naifilters.csv naistyles.csv naitypes.csv

After restarting ComfyUI, the error should no longer appear.

I couldn't find out what ComfyUI-NAI-styler is. There seems to be no such node. This might need to be discussed in the ComfyUI-Universal-Styler repository.

sugarkwork avatar May 14 '24 08:05 sugarkwork

still issue going

jonnytracker avatar Jun 01 '24 18:06 jonnytracker

I'm new here so I apologize if I'm wrong on all this... I have also tried to solve these errors...
I found this link to the Guy who created this CVS issue... found in the 'ComfyUI-Universal-Styler' folder- ReadMe.md file, not sure if this helps! I must have Installed this Node---

  • Author: Uriel Deveaud - Kore Teknology
  • License: This project is released under the GPL License.
  • This work is dedicated to all ComfyUI users around the world ;)https://github.com/KoreTeknology/ComfyUI-Universal-Styler

VERSION: Pre-Alpha Release: 0.2.1 - Licensed under GNU General Public License v3.0 " !!! This project and its documentation are (always) in progress !!! stay tuned...

  • You may find some errors, please report the issue in the dedicated section, thx "

AilinTaban avatar Jun 10 '24 22:06 AilinTaban

Please report this issue to the developer of the relevant custom nodes

mcmonkey4eva avatar Jun 10 '24 23:06 mcmonkey4eva

在你的插件库中把ComfyUI-Universal-Styler文件夹中的所有ComfyUI-NAI-styler替换成ComfyUI-Universal-Styler,就可以解决。猜测是作者上传代码的时候脑子一激灵给他的工程改了个漂亮的名字,却忘记了他代码中写死的文件路径,这是一个不负责任的作者。

jokerfree avatar Jul 16 '24 21:07 jokerfree

Modify "ComfyUI-NAI-styler" in "naistyler_nodes.py" to "ComfyUI-Universal-Styler" 屏幕截图 2024-08-04 151950

屏幕截图 2024-08-04 152013

chinamaler avatar Aug 04 '24 07:08 chinamaler

chinamaler

thanks, that worked

1MB4R0SS4 avatar Aug 04 '24 09:08 1MB4R0SS4

Modify "ComfyUI-NAI-styler" in "naistyler_nodes.py" to "ComfyUI-Universal-Styler" 屏幕截图 2024-08-04 151950

屏幕截图 2024-08-04 152013

It worked temporarily but I had to repeat this every single time i checked for updates in comfy ui... This bug causes a delay in the load time when refreshing the browser tab. I disabled this node because its such a mess and the maintainer hasn't fixed it.

rugabunda avatar Aug 17 '24 15:08 rugabunda

Here's the real workaround that works for me:

  1. Open Powershell as Administrator and go to the ComfyUI\custom_nodes folder: Set-Location "C:\CHANGE_TO_THE_PATH_TO_COMFYUI\ComfyUI\custom_nodes"

  2. Create the symlink for "ComfyUI-NAI-styler" pointing to ComfyUI-Universal-Styler New-Item -ItemType SymbolicLink -Path "ComfyUI-NAI-styler" -Target "ComfyUI-Universal-Styler"

Why is this happening? Two problems.

  1. The module called ComfyUI-Universal-Styler has the wrong path reference to load the csv files: LINE NUMBER 148: @classmethod def INPUT_TYPES(cls): cls.naistyles_csv = cls.load_naistyles_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naifilters.csv")) cls.naifilters_csv = cls.load_naifilters_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naistyles.csv")) cls.naitypes_csv = cls.load_naitypes_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naitypes.csv"))

  2. The error message in load_naistyles_csv is hard coded the wrong path location specifying "ComfyUI_NAI-styler" instead of using the variable naitypes_path in the error message, so that's why it's confusing: LINE NUMBERS 131 & 140: print(f"""Error. No naistyles.csv found. Put your naistyles.csv in the custom_nodes/ComfyUI_NAI-mod/CSV directory of ComfyUI. Then press "Refresh". Your current root directory is: {folder_paths.base_path}""")

ryanwyler avatar Aug 20 '24 05:08 ryanwyler

Do this: D:\XXXXXX\ComfyUI_windows_portable\ComfyUI\custom_nodes>git clone https://github.com/KoreTeknology/ComfyUI-Universal-Styler.git ComfyUI_NAI-mod

Then the problem will be solved.

over12come avatar Aug 22 '24 02:08 over12come

Here's the real workaround that works for me:

  1. Open Powershell as Administrator and go to the ComfyUI\custom_nodes folder: Set-Location "C:\CHANGE_TO_THE_PATH_TO_COMFYUI\ComfyUI\custom_nodes"
  2. Create the symlink for "ComfyUI-NAI-styler" pointing to ComfyUI-Universal-Styler New-Item -ItemType SymbolicLink -Path "ComfyUI-NAI-styler" -Target "ComfyUI-Universal-Styler"

Why is this happening? Two problems.

  1. The module called ComfyUI-Universal-Styler has the wrong path reference to load the csv files: LINE NUMBER 148: @classmethod def INPUT_TYPES(cls): cls.naistyles_csv = cls.load_naistyles_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naifilters.csv")) cls.naifilters_csv = cls.load_naifilters_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naistyles.csv")) cls.naitypes_csv = cls.load_naitypes_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-NAI-styler\CSV\naitypes.csv"))
  2. The error message in load_naistyles_csv is hard coded the wrong path location specifying "ComfyUI_NAI-styler" instead of using the variable naitypes_path in the error message, so that's why it's confusing: LINE NUMBERS 131 & 140: print(f"""Error. No naistyles.csv found. Put your naistyles.csv in the custom_nodes/ComfyUI_NAI-mod/CSV directory of ComfyUI. Then press "Refresh". Your current root directory is: {folder_paths.base_path}""")

Works fine! Thanks!

FerreiraArmando avatar Aug 22 '24 09:08 FerreiraArmando

I don't know why some of the answers here didn't worked for me. So i just change the file: "naistyler_nodes.py" in ComfyUI/custom_nodes/ComfyUI-Universal-Styler/naistyler_nodes.py

I change this part: " @classmethod def INPUT_TYPES(cls): cls.naistyles_csv = cls.load_naistyles_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-Universal-Styler\CSV\naifilters.csv")) cls.naifilters_csv = cls.load_naifilters_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-Universal-Styler\CSV\naistyles.csv")) cls.naitypes_csv = cls.load_naitypes_csv(os.path.join(folder_paths.base_path, "custom_nodes\ComfyUI-Universal-Styler\CSV\naitypes.csv")) return { "required": { #"mute": (["On", "Off"],), "naifilters": (list(cls.naistyles_csv.keys()),), "naistyles": (list(cls.naifilters_csv.keys()),), "naitypes": (list(cls.naitypes_csv.keys()),), #"clip": ("CLIP", ), }, } "

With this one:

" @classmethod def INPUT_TYPES(cls): base_path = Path(folder_paths.base_path) # Use of Path to ensure path compatibility cls.naistyles_csv = cls.load_naistyles_csv(base_path / "custom_nodes/ComfyUI-Universal-Styler/CSV/naistyles.csv") cls.naifilters_csv = cls.load_naifilters_csv(base_path / "custom_nodes/ComfyUI-Universal-Styler/CSV/naifilters.csv") cls.naitypes_csv = cls.load_naitypes_csv(base_path / "custom_nodes/ComfyUI-Universal-Styler/CSV/naitypes.csv") return { "required": { "naifilters": (list(cls.naistyles_csv.keys()),), "naistyles": (list(cls.naifilters_csv.keys()),), "naitypes": (list(cls.naitypes_csv.keys()),), }, } "

You can add some print in the method to check if everything's working:

" print(f"naistyles.csv Path: {base_path / 'custom_nodes/ComfyUI-Universal-Styler/CSV/naistyles.csv'}") print(f"naifilters.csv Path: {base_path / 'custom_nodes/ComfyUI-Universal-Styler/CSV/naifilters.csv'}") print(f"naitypes.csv Path: {base_path / 'custom_nodes/ComfyUI-Universal-Styler/CSV/naitypes.csv'}") "

And that worked fine for me !

adrienchristiaen avatar Aug 22 '24 11:08 adrienchristiaen

This worked for me when nothing else would....strangely the error (for me anyways) appeared when using marascott upscaling node and it impacting rendering times. Thanks a bunch! :-)

Suka4GitHub avatar Aug 26 '24 10:08 Suka4GitHub

修改“naistyler_nodes.py”中的“ComfyUI-NAI-styler”为“ComfyUI-Universal-Styler” 屏幕截图 2024-08-04 151950

屏幕截图 2024-08-04 152013

This is really a master among the people.

933127 avatar Aug 27 '24 14:08 933127

Solution found on reddit in post: https://www.reddit.com/r/comfyui/comments/1cqpjkf/comment/ligc0ie/

---------------QUOTE:----------------------- in \custom_nodes\ComfyUI_NAI-mod

Modify "ComfyUI-NAI-styler" in "naistyler_nodes.py" to "ComfyUI-Universal-Styler"

Search and replace... should be 4 entries

restart comfyui - solved ;-)

mrlunk avatar Sep 03 '24 08:09 mrlunk

My Solution was slightly different, because I'm updated with ConfyUI (last commit) and already has "ComfyUI-Universal-Styler". But somehow DATAPATH = BASE_DIR.joinpath("custom_nodes","ComfyUI-NAI-styler","CSV") from naistyler_nodes.py inside ComfyUI-Universal-Styler was pointing to ComfyUI-NAI-styler.

So:

---------------QUOTE:----------------------- in \custom_nodes\ComfyUI-Universal-Styler

Modify "ComfyUI-NAI-styler" in "naistyler_nodes.py" to "ComfyUI-Universal-Styler"

Line 11 of naistyler_nodes.py

restart comfyui - solved :D

GitLeandroHub avatar Sep 11 '24 18:09 GitLeandroHub

just in custom-nodes with CMD

mklink /D ComfyUI-NAI-styler ComfyUI-Universal-Styler

mklink /D ComfyUI_NAI-mod ComfyUI-Universal-Styler

occultskyrong avatar Sep 26 '24 07:09 occultskyrong

just in custom-nodes with CMD

mklink /D ComfyUI-NAI-styler ComfyUI-Universal-Styler

mklink /D ComfyUI_NAI-mod ComfyUI-Universal-Styler

I see your solution, and may be dumb to ask, but what to do with these cmds? what is mklink? obviously have to use correct drive letter but how to apply? TIA

offmybach avatar Oct 08 '24 15:10 offmybach

The above https://github.com/comfyanonymous/ComfyUI/issues/3463#issuecomment-2231823297 and https://github.com/comfyanonymous/ComfyUI/issues/3463#issuecomment-2267394860 work for me.

The original code also specifies Windows only paths, which causes errors on my linux:

cls.naistyles_csv = cls.load_naistyles_csv(os.path.join(folder_paths.base_path, "custom_nodes\\ComfyUI-Universal-Styler\\CSV\\naifilters.csv"))
cls.naifilters_csv = cls.load_naifilters_csv(os.path.join(folder_paths.base_path, "custom_nodes\\ComfyUI-Universal-Styler\\CSV\\naistyles.csv"))
cls.naitypes_csv = cls.load_naitypes_csv(os.path.join(folder_paths.base_path, "custom_nodes\\ComfyUI-Universal-Styler\\CSV\\naitypes.csv"))

We can change the lines to generic paths:

cls.naistyles_csv = cls.load_naistyles_csv(os.path.join(folder_paths.base_path, "custom_nodes", "ComfyUI-Universal-Styler", "CSV", "naifilters.csv"))
cls.naifilters_csv = cls.load_naifilters_csv(os.path.join(folder_paths.base_path, "custom_nodes", "ComfyUI-Universal-Styler", "CSV", "naistyles.csv"))
cls.naitypes_csv = cls.load_naitypes_csv(os.path.join(folder_paths.base_path, "custom_nodes", "ComfyUI-Universal-Styler", "CSV", "naitypes.csv"))

beijingrong avatar Oct 08 '24 18:10 beijingrong

2. init.py

Thanks, I just searched this file for the wrong path and replaced it with ComfyUI-Universal-Styler. you can even see the error message with the wrong path :P kind of obvious issue. surprised not fixed yet.

Replace: ComfyUI-NAI-styler with: ComfyUI-Universal-Styler

image Screenshot 2024-10-16 004700

Agiltech-com-au avatar Oct 15 '24 13:10 Agiltech-com-au

Better make this one (answer for total noobs):

Windows+R > CMD replace "X:\Comfy_UI" to what your patch to folder:

mklink /J "X:\Comfy_UI\Comfy-UI-Manager\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-NAI-styler" "X:\Comfy_UI\Comfy-UI-Manager\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Universal-Styler"

p.s. This one big line command, not two. And this will create not shortcut, but a hard linked folder 'ComfyUI-NAI-styler' (that don't exist before) to 'ComfyUI-Universal-Styler'

Oni4kage avatar Oct 15 '24 21:10 Oni4kage

I investigated why this incomplete ComfyUI-Universal-Styler custom node is needed, and I found one thing:

https://github.com/KoreTeknology/ComfyUI-Universal-Styler/blob/main/naistyler_nodes.py

This code includes the following node definition:

"ShowText|pysssss": "✴️ U-NAI Get Text"

Looking at this code, it's clear that it's a copy of the following code:

https://github.com/pythongosssss/ComfyUI-Custom-Scripts/blob/main/py/show_text.py

It seems that the author of ComfyUI-Universal-Styler copied and pasted the node from ComfyUI-Custom-Scripts and only changed the display name of the node.

If a workflow using ShowText from ComfyUI-Custom-Scripts was distributed, ComfyUI-Universal-Styler might be found as a dependency before the original ComfyUI-Custom-Scripts. As a result, it gets installed as a dependency, leading to encounters with ComfyUI-Universal-Styler errors.

In other words, if you're not explicitly using ComfyUI-Universal-Styler nodes, you could probably uninstall ComfyUI-Universal-Styler and install ComfyUI-Custom-Scripts instead. This should allow the workflow to function normally.

sugarkwork avatar Oct 16 '24 06:10 sugarkwork

Better make this one (answer for total noobs):

Windows+R > CMD replace "X:\Comfy_UI" to what your patch to folder:

mklink /J "X:\Comfy_UI\Comfy-UI-Manager\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-NAI-styler" "X:\Comfy_UI\Comfy-UI-Manager\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Universal-Styler"

p.s. This one big line command, not two. And this will create not shortcut, but a hard linked folder 'ComfyUI-NAI-styler' (that don't exist before) to 'ComfyUI-Universal-Styler'

Actually yeah junction points could be better. Because as soon as I update the styler it's going to possibly put in the wrong directories in the config file again 🤣

Agiltech-com-au avatar Oct 16 '24 12:10 Agiltech-com-au

I investigated why this incomplete ComfyUI-Universal-Styler custom node is needed, and I found one thing:

https://github.com/KoreTeknology/ComfyUI-Universal-Styler/blob/main/naistyler_nodes.py

This code includes the following node definition:

"ShowText|pysssss": "✴️ U-NAI Get Text"

Looking at this code, it's clear that it's a copy of the following code:

https://github.com/pythongosssss/ComfyUI-Custom-Scripts/blob/main/py/show_text.py

It seems that the author of ComfyUI-Universal-Styler copied and pasted the node from ComfyUI-Custom-Scripts and only changed the display name of the node.

If a workflow using ShowText from ComfyUI-Custom-Scripts was distributed, ComfyUI-Universal-Styler might be found as a dependency before the original ComfyUI-Custom-Scripts. As a result, it gets installed as a dependency, leading to encounters with ComfyUI-Universal-Styler errors.

In other words, if you're not explicitly using ComfyUI-Universal-Styler nodes, you could probably uninstall ComfyUI-Universal-Styler and install ComfyUI-Custom-Scripts instead. This should allow the workflow to function normally.

1000%

KINGLIFER avatar Oct 28 '24 05:10 KINGLIFER