Jannchie / ComfyUI-J

Jannchie's ComfyUI custom nodes.
64 stars 13 forks source link

ModuleNotFoundError: No module named 'diffusers.models.autoencoders' #1

Open Grawler opened 3 months ago

Grawler commented 3 months ago

I'm getting this error when loading:

File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-J\__init__.py", line 17, in <module>
    from .pipelines import ControlNetUnit, ControlNetUnits, PipelineWrapper, schedulers
  File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-J\pipelines\__init__.py", line 17, in <module>
    from .jannchie import *
  File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-J\pipelines\jannchie.py", line 14, in <module>
    from diffusers.models.autoencoders import AutoencoderKL
ModuleNotFoundError: No module named 'diffusers.models.autoencoders'

Cannot import C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-J module for custom nodes: No module named 'diffusers.models.autoencoders'

However, diffusers is installed. Log when running pip -install diffusers:

Requirement already satisfied: diffusers in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (0.27.2)
Requirement already satisfied: importlib-metadata in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (7.0.1)
Requirement already satisfied: filelock in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (3.9.0)
Requirement already satisfied: huggingface-hub>=0.20.2 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (0.20.3)
Requirement already satisfied: numpy in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (1.26.3)
Requirement already satisfied: regex!=2019.12.17 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (2023.12.25)
Requirement already satisfied: requests in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (2.31.0)
Requirement already satisfied: safetensors>=0.3.1 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (0.4.2)
Requirement already satisfied: Pillow in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from diffusers) (10.2.0)
Requirement already satisfied: fsspec>=2023.5.0 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from huggingface-hub>=0.20.2->diffusers) (2024.3.1)
Requirement already satisfied: tqdm>=4.42.1 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from huggingface-hub>=0.20.2->diffusers) (4.66.1)
Requirement already satisfied: pyyaml>=5.1 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from huggingface-hub>=0.20.2->diffusers) (6.0.1)
Requirement already satisfied: typing-extensions>=3.7.4.3 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from huggingface-hub>=0.20.2->diffusers) (4.8.0)
Requirement already satisfied: packaging>=20.9 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from huggingface-hub>=0.20.2->diffusers) (23.2)
Requirement already satisfied: zipp>=0.5 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from importlib-metadata->diffusers) (3.17.0)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from requests->diffusers) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from requests->diffusers) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from requests->diffusers) (2.1.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from requests->diffusers) (2023.11.17)
Requirement already satisfied: colorama in c:\users\arjen\appdata\local\programs\python\python310\lib\site-packages (from tqdm>=4.42.1->huggingface-hub>=0.20.2->diffusers) (0.4.6)
Jannchie commented 3 months ago

It's weird. I'm using diffusers from this version 0.27.2 as well.

You can try:

  1. reinstall diffusers
  2. check that the virtual environment in which you started comfy matches the environment in which pip is running.
AnyKillAtor commented 3 months ago

can you teach me how to install?

AnyKillAtor commented 3 months ago

Yoloworld_ModelLoader_Zho πŸ”— ESAM_ModelLoader_Zho πŸ”— Yoloworld_ESAM_Zho πŸ”—

cant manage to install this

AnyKillAtor commented 3 months ago

[!] Getting requirements to build wheel did not run successfully. [!] exit code: 1 [!] [!] [3 lines of output] [!] :8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html [!] Could not find geos-config executable. Either append the path to geos-config to PATH or manually provide the include_dirs, library_dirs, libraries and other link args for compiling against a GEOS version >=3.5. [!] ERROR: Cython is required to build shapely from source. [!] [end of output] [!] [!] note: This error originates from a subprocess, and is likely not a problem with pip. [!] error: subprocess-exited-with-error [!] [!] Getting requirements to build wheel did not run successfully. [!] exit code: 1 [!] [!] See above for output. [!] [!] note: This error originates from a subprocess, and is likely not a problem with pip.

Grawler commented 3 months ago

In the end I just nuked my install and started fresh. Some custom node must have been conflicting with yours.

Jannchie commented 3 months ago

@AnyKillAtor You can install ComfyUI Manager first and then use it to install these nodes.

AnyKillAtor commented 3 months ago

Now i need to install diffusers, how do i do this?

ItsDyze commented 3 months ago

You should have a path "\YourOwnPath\ComfyUI\python_embeded\Lib\site-packages". In here you have a "diffusers" folder, you can remove it and try pip install diffusers

AnyKillAtor commented 3 months ago

almost done!! Now i got this: ot prompt Failed to validate prompt for output 61:

Jannchie commented 3 months ago

@AnyKillAtor This should be because the node was updated (an option was added), but workflow uses the old node. You can right-click the node and there should be a fix (recreate) or something to sync to the new node.

ivanoff13 commented 3 months ago

make a video instruction the nodes are not working

AnyKillAtor commented 3 months ago

@AnyKillAtor You can install ComfyUI Manager first and then use it to install these nodes.

do you have that workflow? I saw that is not here! .)