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

better handle noninstalled libs error during model loading #2071

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

eaidova
Copy link
Contributor

@eaidova eaidova commented Oct 21, 2024

What does this PR do?

I found an issue with loading models from extra-packages libraries (e.g. diffusers). TaskManager select and trying to load model even library is not installed in user environment and error message can be confusing for that case. This PR provides small improvement for this case.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

Who can review?

@echarlaix, @IlyasMoutawwakil

@IlyasMoutawwakil
Copy link
Member

can you give an example of the confusing error message you get with the current method ?

@eaidova
Copy link
Contributor Author

eaidova commented Oct 21, 2024

File "/home/ea/miniforge3/lib/python3.12/site-packages/optimum/exporters/tasks.py", line 2066, in get_model_from_task
config = DiffusionPipeline.load_config(model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^
NameError: name 'DiffusionPipeline' is not defined

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

Successfully merging this pull request may close these issues.

2 participants