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

Error importing OmniGen: cannot import name 'PeftAdapterMixin' from 'diffusers.loaders' #12

Open
g2dbot opened this issue Nov 7, 2024 · 1 comment

Comments

@g2dbot
Copy link

g2dbot commented Nov 7, 2024

Hello,

I got this error trying to use your Omnigen node after installation.

Thank you in advance for your help.

Best regards,

Error importing OmniGen: cannot import name 'PeftAdapterMixin' from 'diffusers.loaders' (C:\Program Files\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\loaders.py)
!!! Exception during processing !!! Failed to import OmniGen. Please check if the code was downloaded correctly.
Traceback (most recent call last):
File "C:\Program Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-OmniGen\ailab_OmniGen.py", line 32, in init
from OmniGen import OmniGenPipeline
File "C:\Program Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-OmniGen\OmniGen_init_.py", line 1, in
from .model import OmniGen
File "C:\Program Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-OmniGen\OmniGen\model.py", line 9, in
from diffusers.loaders import PeftAdapterMixin
ImportError: cannot import name 'PeftAdapterMixin' from 'diffusers.loaders' (C:\Program Files\ComfyUI_windows_portable\python_embeded\Lib\site-packages\diffusers\loaders.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in execute
obj = class_def()
^^^^^^^^^^^
File "C:\Program Files\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-OmniGen\ailab_OmniGen.py", line 36, in init
raise RuntimeError("Failed to import OmniGen. Please check if the code was downloaded correctly.")
RuntimeError: Failed to import OmniGen. Please check if the code was downloaded correctly.

@AI421
Copy link

AI421 commented Nov 7, 2024

It looks like you're encountering an import error due to a missing or incompatible component, specifically PeftAdapterMixin from diffusers.loaders. This could be due to either an outdated or incompatible version of the diffusers library.
Update the diffusers library: Make sure you're using the latest version of diffusers by running:
pip install --upgrade diffusers

i was have the same issue, after update the diffusers, the error gone.

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

2 participants