chflame163 / ComfyUI_LayerStyle

A set of nodes for ComfyUI that can composite layer and mask to achieve Photoshop like functionality.
MIT License
670 stars 33 forks source link

got below error restarting comfyui (import failed) #126

Closed 36590798 closed 6 days ago

36590798 commented 2 weeks ago

Traceback (most recent call last): File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1535, in _get_module return importlib.import_module("." + module_name, self.name) File "/opt/conda/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/opt/conda/lib/python3.10/site-packages/transformers/models/auto/processing_auto.py", line 27, in from ...image_processing_utils import ImageProcessingMixin File "/opt/conda/lib/python3.10/site-packages/transformers/image_processing_utils.py", line 28, in from .image_transforms import center_crop, normalize, rescale File "/opt/conda/lib/python3.10/site-packages/transformers/image_transforms.py", line 47, in import tensorflow as tf File "/opt/conda/lib/python3.10/site-packages/tensorflow/init.py", line 38, in from tensorflow.python.tools import module_util as _module_util File "/opt/conda/lib/python3.10/site-packages/tensorflow/python/init.py", line 42, in from tensorflow.python.saved_model import saved_model File "/opt/conda/lib/python3.10/site-packages/tensorflow/python/saved_model/saved_model.py", line 20, in from tensorflow.python.saved_model import builder File "/opt/conda/lib/python3.10/site-packages/tensorflow/python/saved_model/builder.py", line 23, in from tensorflow.python.saved_model.builder_impl import _SavedModelBuilder File "/opt/conda/lib/python3.10/site-packages/tensorflow/python/saved_model/builder_impl.py", line 26, in from tensorflow.python.framework import dtypes File "/opt/conda/lib/python3.10/site-packages/tensorflow/python/framework/dtypes.py", line 39, in _np_float8_e5m2 = pywrap_ml_dtypes.float8_e5m2() TypeError: Unable to convert function return value to a Python type! The signature was () -> handle

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/mnt/data/software/comfyui/nodes.py", line 1890, in load_custom_node module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/mnt/data/software/comfyui/custom_nodes/ComfyUI_LayerStyle/init.py", line 60, in imported_module = importlib.import_module(".py.{}".format(name), name) File "/opt/conda/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1006, in _find_and_load_unlocked File "", line 688, in _load_unlocked File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/mnt/data/software/comfyui/custom_nodes/ComfyUI_LayerStyle/py/Qwen_image2prompt.py", line 3, in from transformers import AutoModel, AutoProcessor, StoppingCriteria, StoppingCriteriaList File "", line 1075, in _handle_fromlist File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1526, in getattr value = getattr(module, name) File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1525, in getattr module = self._get_module(self._class_to_module[name]) File "/opt/conda/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1537, in _get_module raise RuntimeError( RuntimeError: Failed to import transformers.models.auto.processing_auto because of the following error (look up to see its traceback): Unable to convert function return value to a Python type! The signature was () -> handle

Cannot import /mnt/data/software/comfyui/custom_nodes/ComfyUI_LayerStyle module for custom nodes: Failed to import transformers.models.auto.processing_auto because of the following error (look up to see its traceback): Unable to convert function return value to a Python type! The signature was

chflame163 commented 2 weeks ago

Try upgrade transformers dependency package

36590798 commented 2 weeks ago

Try upgrade transformers dependency package

Thanks for post, transformers has already been updated to the latest. I doubt if the version is too new?

-- Name: transformers Version: 4.41.2 Summary: State-of-the-art Machine Learning for JAX, PyTorch and TensorFlow Home-page: https://github.com/huggingface/transformers Author: The Hugging Face team (past and future) with the help of all our contributors (https://github.com/huggingface/transformers/graphs/contributors) Author-email: transformers@huggingface.co License: Apache 2.0 License Location: /opt/conda/lib/python3.10/site-packages Requires: filelock, huggingface-hub, numpy, packaging, pyyaml, regex, requests, safetensors, tokenizers, tqdm Required-by: adaseq, auto-gptq, clip-interrogator, compel, image-reward, ms-swift, optimum, pai-easycv, peft, text2sql-lgesql, transformers-stream-generator, vllm

chflame163 commented 2 weeks ago

Thanks for post, transformers has already been updated to the latest. I doubt if the version is too new?

Perhaps the version is too high? The 4.40.2 I am currently using is working properly.