TemryL / ComfyUI-IDM-VTON

ComfyUI adaptation of IDM-VTON for virtual try-on.
GNU General Public License v3.0
218 stars 26 forks source link

(IMPORT FAILED) ComfyUI-IDM-VTON from manager, even with manual install #15

Closed brudaa closed 1 month ago

brudaa commented 1 month ago

I tried to install IDM- VTON node in comfyui but I have been facing (import failed) every time and I've tried to install it manually also with manager but it just gives me the same error (import failed). PLZ HELP

gonzalu commented 1 month ago

This is the error I get from ComfyUI on startup


  File "E:\ComfyUI\ComfyUI\nodes.py", line 1866, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\__init__.py", line 1, in <module>
    from .src.nodes_mappings import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\nodes_mappings.py", line 1, in <module>
    from .nodes.pipeline_loader import PipelineLoader
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\nodes\pipeline_loader.py", line 9, in <module>
    from ..idm_vton.unet_hacked_tryon import UNet2DConditionModel
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\idm_vton\unet_hacked_tryon.py", line 35, in <module>
    from diffusers.models.embeddings import (
ImportError: cannot import name 'PositionNet' from 'diffusers.models.embeddings' (E:\ComfyUI\python_embeded\Lib\site-packages\diffusers\models\embeddings.py)

Cannot import E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON module for custom nodes: cannot import name 'PositionNet' from 'diffusers.models.embeddings' (E:\ComfyUI\python_embeded\Lib\site-packages\diffusers\models\embeddings.py)```
TemryL commented 1 month ago

I tried to install IDM- VTON node in comfyui but I have been facing (import failed) every time and I've tried to install it manually also with manager but it just gives me the same error (import failed). PLZ HELP

can you provide your error trace?

TemryL commented 1 month ago

This is the error I get from ComfyUI on startup

  File "E:\ComfyUI\ComfyUI\nodes.py", line 1866, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\__init__.py", line 1, in <module>
    from .src.nodes_mappings import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\nodes_mappings.py", line 1, in <module>
    from .nodes.pipeline_loader import PipelineLoader
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\nodes\pipeline_loader.py", line 9, in <module>
    from ..idm_vton.unet_hacked_tryon import UNet2DConditionModel
  File "E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON\src\idm_vton\unet_hacked_tryon.py", line 35, in <module>
    from diffusers.models.embeddings import (
ImportError: cannot import name 'PositionNet' from 'diffusers.models.embeddings' (E:\ComfyUI\python_embeded\Lib\site-packages\diffusers\models\embeddings.py)

Cannot import E:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-IDM-VTON module for custom nodes: cannot import name 'PositionNet' from 'diffusers.models.embeddings' (E:\ComfyUI\python_embeded\Lib\site-packages\diffusers\models\embeddings.py)```

which diffusers version do you use?

gonzalu commented 1 month ago

Hang on, I give you the whole start up log... is that what you need?

gonzalu commented 1 month ago

Is this what you were looking for?

$ pip show diffusers
Name: diffusers
Version: 0.26.2
Summary: State-of-the-art diffusion in PyTorch and JAX.
Home-page: https://github.com/huggingface/diffusers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors)
Author-email: patrick@huggingface.co
License: Apache 2.0 License
Location: c:\users\gonzalu\appdata\local\programs\python\python310\lib\site-packages
Requires: filelock, huggingface-hub, importlib-metadata, numpy, Pillow, regex, requests, safetensors
Required-by: image-reward
gonzalu commented 1 month ago

However, I run ComfyUI portable. I'll get it from that environment... hang on.

TemryL commented 1 month ago

yes! can you try using diffusers==0.25.0:

pip install diffusers==0.25.0
gonzalu commented 1 month ago

$ python.exe -m pip show diffusers
Name: diffusers
Version: 0.26.2
Summary: State-of-the-art diffusion in PyTorch and JAX.
Home-page: https://github.com/huggingface/diffusers
Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/diffusers/graphs/contributors)
Author-email: patrick@huggingface.co
License: Apache 2.0 License
Location: c:\users\gonzalu\appdata\local\programs\python\python310\lib\site-packages
Requires: filelock, huggingface-hub, importlib-metadata, numpy, Pillow, regex, requests, safetensors
Required-by: image-reward
gonzalu commented 1 month ago

yes! can you try using diffusers==0.25.0:

pip install diffusers==0.25.0

Oh I see... OK, but that may break other custom nodes, no? Or can I have multiple versions of diffusers at the same time?

TemryL commented 1 month ago

ComfyUI-IDM-VTON is built using source code from IDM-VTON that requires diffusers==0.25.0 for now. If you just want to run ComfyUI-IDM-VTON without other custom nodes I would suggest you create a new comfyui python environment with diffusers==0.25.0 until we release a new version that supports newer diffusers version.

gonzalu commented 1 month ago

OK that makes sense, thank you so much for your help and insight.

Cheers!

TemryL commented 1 month ago

My pleasure!