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

ON compile LCM-SD broken with cannot import NeuronLatentConsistencyModelPipeline error #489

Closed
1 of 4 tasks
kct22aws opened this issue Feb 16, 2024 · 3 comments
Closed
1 of 4 tasks
Labels
bug Something isn't working

Comments

@kct22aws
Copy link

System Info

optimum                       1.17.0
optimum-neuron                0.0.13
Python 3.10
Ubuntu 22.04
Neuron 2.17.0

Who can help?

@JingyaHuang Official code snippet in https://huggingface.co/docs/optimum-neuron/tutorials/stable_diffusion#compile-lcm is broken with following error:

    from optimum.neuron import NeuronLatentConsistencyModelPipeline
ImportError: cannot import name 'NeuronLatentConsistencyModelPipeline' from 'optimum.neuron' (/home/ubuntu/aws_neuron_venv_pytorch/lib/python3.10/site-packages/optimum/neuron/__init__.py)

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

Use AWS inf2 instance, install Neuron 2.17.0, then install current version of transformers, accelerate, diffusers, evaluate, datasets. Then install ON via pip install optimum[neuronx]. Then run code as a Python script.

Expected behavior

Expect the code to complete the run.

@kct22aws kct22aws added the bug Something isn't working label Feb 16, 2024
@JingyaHuang
Copy link
Collaborator

Hi @kct22aws, thanks fore reporting the issue. The error is introduced by the refactoring of the model registration mechanism in Optimum 1.17.0, it is fixed by #414, and we are planning for a release for it. In the future we will also pin optimum version to avoid breaking changes from Optimum's side.

If you are testing something, you could use optimum < 1.17 until the new release of Optimum Neuron.

@JingyaHuang
Copy link
Collaborator

Optimum Neuron 0.0.19 is out, could you try if the issue is solved? Thanks!
https://pypi.org/project/optimum-neuron/0.0.19/

@JingyaHuang
Copy link
Collaborator

Close as it should have been solved with the latest release. Feel free to reopen if there are any follow-up questions.

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

2 participants