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

ModuleNotFoundError: No module named 'inference_core_nodes' #16

Open
POWERFULMOVES opened this issue Apr 28, 2024 · 16 comments
Open

ModuleNotFoundError: No module named 'inference_core_nodes' #16

POWERFULMOVES opened this issue Apr 28, 2024 · 16 comments

Comments

@POWERFULMOVES
Copy link

Prestartup times for custom nodes:
0.6 seconds: L:\Comfyui\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 24564 MB, total RAM 32529 MB
xformers version: 0.0.25.post1
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3090 Ti : cudaMallocAsync
VAE dtype: torch.bfloat16
Using xformers cross attention
Traceback (most recent call last):
File "L:\Comfyui\ComfyUI\ComfyUI\nodes.py", line 1866, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "L:\Comfyui\ComfyUI\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes_init
.py", line 1, in
from inference_core_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
ModuleNotFoundError: No module named 'inference_core_nodes'

@tmprabubiz
Copy link

Same Problem


File "J:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes_init_.py", line 1, in
from inference_core_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
ModuleNotFoundError: No module named 'inference_core_nodes'

Cannot import J:\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes module for custom nodes: No module named 'inference_core_nodes'


@foxmale007
Copy link

foxmale007 commented Apr 30, 2024

I tried to change the first row in init.py:

from .src.inference_core_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS

but get another error:

ModuleNotFoundError: No module named 'diffusers.models.unets'

and then the errors gone when I upgrade diffusers from 0.25 to 0.27.2

@GzuPark
Copy link

GzuPark commented May 4, 2024

@foxmale007 well, I've done with your trying aka fix init.
I use portable windows version of comfyui.

@Rachellaw888
Copy link

same problem

@abess96
Copy link

abess96 commented May 7, 2024

Same issue

@ultimatech-cn
Copy link

As readme ,try to install node by
"python install.py" or"..\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes>......\python_embeded\python.exe install.py

@randykoala
Copy link

tried all the approaches above but still get modulenotfound error

@zjs820
Copy link

zjs820 commented May 12, 2024

As readme ,try to install node by "python install.py" or"..\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes>......\python_embeded\python.exe install.py

I can do it for the portable version but when it's the non-portable version it become like this:

(venv) E:\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes>e:\comfyui\venv\scripts\python.exe install.py
Traceback (most recent call last):
  File "E:\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes\install.py", line 16, in <module>
    def try_get_cuda_version() -> str | None:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

@Stone-dielianhua
Copy link

企业微信截图_1715605680314
Same issue

@farhang0
Copy link

SAME here

File "...\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes\__init__.py", line 1, in <module>
    from inference_core_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
ModuleNotFoundError: No module named 'inference_core_nodes'

Cannot import ...\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes module for custom nodes: No module named 'inference_core_nodes'

@ultimatech-cn
Copy link

Before running install.py, may install fllit-core first. In portable version,
F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes>......\python_embeded\python.exe -m pip install flit-core

@farhang0
Copy link

Before running install.py, may install fllit-core first. In portable version, F:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes>......\python_embeded\python.exe -m pip install flit-core

thanks for your response , I've already tried this approach, but it hasn't been successful and the issue remains.😞

@jjandnn
Copy link

jjandnn commented May 23, 2024

我发现很多伙伴是没把解决这个问题的步骤看清楚。
我来详细说明一遍:

首先造成这个错误的原因:
ComfyUI-Inference-Core-Nodes 这个包看上去是在 custom_nodes 文件夹中,但其实没有自动编译安装。
安装时缺少flit-core这个依赖。
如果你没有 custom_nodes 目录中没有 ComfyUI-Inference-Core-Nodes 文件夹,那请你先
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes,然后把文件夹复制进 ComfyUI-Inference-Core-Nodes 文件夹中。

接着我们来解决:

1,打开你电脑的cmd窗口。
2,把你的 ComfyUI_windows_portable 程序包根目录下的 python_embeded 文件夹中的 python.exe 拖拽到cmd窗口中,则窗口中自动填入了这个python程序的路径,如:
xxx:\ComfyUI_windows_portable\python_embeded\python.exe
xxx指的是你的具体硬盘盘符,比如D,E或F
3,然后,我们来补全并一个个执行命令,分别是:
xxx:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install flit-core
回车
cd xxx:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes
回车
xxx:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install -e .
回车
注意啊,上面这句最后有个“.”

ok。

EN:
I realized that a lot of partners are not reading the steps to solve this problem clearly.
Let me explain it in detail:

First of all, the cause of this error:
The package ComfyUI-Inference-Core-Nodes appears to be in the custom_nodes folder, but it is not automatically compiled and installed.
The flit-core dependency is missing from the installation.
If you don't have a ComfyUI-Inference-Core-Nodes folder in your custom_nodes directory, then please first
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes and copy the folder into the ComfyUI-Inference-Core-Nodes folder.

Then let's solve it:

1, open the cmd window of your computer.
2, drag and drop python.exe from the python_embedded folder in the root directory of your ComfyUI_windows_portable package into the cmd window, and the path to the python program will be automatically filled in the window, e.g.:
xxx:\ComfyUI_windows_portable\python_embedded\python.exe
xxx refers to your specific hard disk drive letter, such as D, E or F.
3, then, let's complement and execute the commands one by one, respectively:
xxx:\ComfyUI_windows_portable\python_embedded\python.exe -m pip install flit-core
Enter
cd xxx:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inference-Core-Nodes
Enter
xxx:\ComfyUI_windows_portable\python_embedded\python.exe -m pip install -e .
Enter
Notice the "." at the end of the above sentence.

OK.

Translated with DeepL.com ,my EN is so pure!

@boblapo
Copy link

boblapo commented May 30, 2024

ERROR: Package 'inference-core-nodes' requires a different Python: 3.12.3 not in '<3.12,>=3.10'
jjandnn fix still work but if you have newer Python you have to modify the pyproject.toml file line 9:
requires-python = ">=3.10,<=3.12.3"
install worked.

@KristoAI
Copy link

Ok I finally solved this issue. This is merge from another solution but with a final resolution.

Someone Else I tried to change the first row in init.py:

from .src.inference_core_nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS

but get another error:

ModuleNotFoundError: No module named 'diffusers.models.unets'

My resolution*

Open \pathto\ComfyUI\venv\Scripts in cmd.

use these commands:
activate
pip install diffusers (It should install a new diffusers or update)
pip install torch transformers (Likely wont do anything new)
python -c "import diffusers; print(diffusers.version)" (Should display the current version. For me it was 0.29.0.)

Launch comfyui. For me I did this for Stability Matrix's install of comfyui which I suspect has some bugs. I needed this for ControlNet to stop giving me an error in the inference tab of Stability Matrix.
My error was : Cannot execute because node Inference_Core_AIO_Preprocessor does not exist.

This fixed all of that.

@Donghongzi
Copy link

I was able to solve the problem by reinstalling the ComfyUI-Inference-Core-Nodes extension.

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