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

[BUG] Failed to import transformers.models.fuyu.processing_fuyu #95

Closed
vyomakesh09 opened this issue Nov 5, 2023 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@vyomakesh09
Copy link
Contributor

vyomakesh09 commented Nov 5, 2023

Traceback (most recent call last):
File "/home/v/swarms/fuyu.py", line 1, in
from swarms.models.fuyu import Fuyu
File "/home/v/swarms/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'>.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@vyomakesh09 vyomakesh09 added the bug Something isn't working label Nov 5, 2023
@evelynmitchell
Copy link
Contributor

This doesn't appear to be a complete traceback.

When I run

pip install --update swarms
from transformers import (
    FuyuForCausalLM,
    AutoTokenizer,
    FuyuProcessor,
    FuyuImageProcessor,
)

I do not get a traceback.

@kyegomez
Copy link
Owner

kyegomez commented Nov 8, 2023

@evelynmitchell @vyomakesh09 This issue has been fixed by just specifying from transformers import Fuyu

@kyegomez kyegomez closed this as completed Nov 8, 2023
@evelynmitchell
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants