Traceback (most recent call last):
File "/home/v/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1345, in _get_module
return importlib.import_module("." + module_name, self.name)
File "/usr/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 "/home/v/.local/lib/python3.10/site-packages/transformers/models/fuyu/processing_fuyu.py", line 29, in
from .image_processing_fuyu import FuyuBatchFeature
File "/home/v/.local/lib/python3.10/site-packages/transformers/models/fuyu/image_processing_fuyu.py", line 180, in
class FuyuImageProcessor(BaseImageProcessor):
File "/home/v/.local/lib/python3.10/site-packages/transformers/models/fuyu/image_processing_fuyu.py", line 365, in FuyuImageProcessor
resample: Optional[PILImageResampling] = None,
File "/usr/lib/python3.10/typing.py", line 312, in inner
return func(*args, **kwds)
File "/usr/lib/python3.10/typing.py", line 403, in getitem
return self._getitem(self, parameters)
File "/usr/lib/python3.10/typing.py", line 529, in Optional
arg = _type_check(parameters, f"{self} requires a single type.")
File "/usr/lib/python3.10/typing.py", line 176, in _type_check
raise TypeError(f"{msg} Got {arg!r:.100}.")
TypeError: typing.Optional requires a single type. Got <module 'PIL.Image' from '/usr/lib/python3/dist-packages/PIL/Image.py'>.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/v/inhouse/fuyu.py", line 1, in
from swarms.models.fuyu import Fuyu
File "/home/v/.local/lib/python3.10/site-packages/swarms/models/fuyu.py", line 2, in
from transformers import (
File "", line 1075, in _handle_fromlist
File "/home/v/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1336, in getattr
value = getattr(module, name)
File "/home/v/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1335, in getattr
module = self._get_module(self._class_to_module[name])
File "/home/v/.local/lib/python3.10/site-packages/transformers/utils/import_utils.py", line 1347, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.models.fuyu.processing_fuyu because of the following error (look up to see its traceback):
typing.Optional requires a single type. Got <module 'PIL.Image' from '/usr/lib/python3/dist-packages/PIL/Image.py'>.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too