comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
57k stars 6.04k forks source link

ImportError: cannot import name 'Phi3Config' from 'transformers' #5665

Closed hkapavarapu closed 2 hours ago

hkapavarapu commented 3 hours ago

Your question

I am getting below error when I run first time. Releated to Phi3Config, anyone faced similar issue? Help is appreciated. Thank You.

Error importing OmniGen: cannot import name 'Phi3Config' from 'transformers' (C:\ComfyUI\python_embeded\Lib\site-packages\transformers__init.py) !!! Exception during processing !!! Failed to import OmniGen. Please check if the code was downloaded correctly. Traceback (most recent call last): File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-OmniGen\ailab_OmniGen.py", line 53, in init from OmniGen import OmniGenPipeline File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-OmniGen\OmniGen__init__.py", line 1, in from .model import OmniGen File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-OmniGen\OmniGen\model.py", line 14, in from OmniGen.transformer import Phi3Config, Phi3Transformer File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-OmniGen\OmniGen\transformer.py", line 18, in from transformers import Phi3Config, Phi3Model ImportError: cannot import name 'Phi3Config' from 'transformers' (C:\ComfyUI\python_embeded\Lib\site-packages\transformers\init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\ComfyUI\ComfyUI\execution.py", line 289, in execute obj = class_def() ^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\custom_nodes\ComfyUI-OmniGen\ailab_OmniGen.py", line 57, 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.

Logs

No response

Other

No response

LukeG89 commented 3 hours ago

This is not a ComfyUI error, you need to find a solution or open a bug report here: ComfyUI-OmniGen