ZHO-ZHO-ZHO / ComfyUI-InstantID

Unofficial implementation of InstantID for ComfyUI
1.22k stars 67 forks source link

ImportError: cannot import name 'ControlNetModel' from 'diffusers.models' #100

Open alexdoroga opened 4 months ago

alexdoroga commented 4 months ago

Does anyone know how to fix this?

0.1 seconds (IMPORT FAILED): C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID

Traceback (most recent call last): File "C:\AI\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1893, 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 "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID__init__.py", line 1, in from .InstantIDNode import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 3, in from diffusers.models import ControlNetModel ImportError: cannot import name 'ControlNetModel' from 'diffusers.models' (C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\models__init__.py)

Cannot import C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID module for custom nodes: cannot import name 'ControlNetModel' from 'diffusers.models' (C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\models__init__.py)

Loading: ComfyUI-Manager (V2.7.2)

ComfyUI Revision: 1965 [f44225fd] | Released on '2024-02-09'

packaging is already installed. cpuinfo is already installed. git is already installed. moviepy is already installed. cv2 is already installed. skbuild is already installed. typing is already installed. diskcache is already installed. llama_cpp is already installed.

picobyte commented 4 months ago

I had the same issue. vid2vid has this in comfy_vid2vid/requirements.txt: diffusers[torch]==0.11.1 which is quite old. after pip install -U diffusers the vid2vid node is out, but ComfyUI-InstantID did load.