GithubHelp home page GithubHelp logo

AttributeError: module diffusers has no attribute ORTStableDiffusionXLPipeline. Did you mean: 'StableDiffusionXLPipeline about diffusers HOT 3 CLOSED

neonarc4 avatar neonarc4 commented on June 8, 2024
AttributeError: module diffusers has no attribute ORTStableDiffusionXLPipeline. Did you mean: 'StableDiffusionXLPipeline

from diffusers.

Comments (3)

fabiorigano avatar fabiorigano commented on June 8, 2024 1

I see, you should maybe ask which opset (or ONNX, ONNXRuntime and pytorch versions) has been used to export the model. Also try a different execution provider (CPU, CUDA)

from diffusers.

fabiorigano avatar fabiorigano commented on June 8, 2024

hi @neonarc4
The "How to use" documentation is definitely wrong
ORTStableDiffusionXLPipeline is not a diffusers pipeline, but a special pipeline for models in the ONNX format and belongs to the optimum library (an extension of transformers and diffusers).

Install optimum and load the pipeline as follows:

python -m pip install optimum
from optimum.onnxruntime import ORTStableDiffusionXLPipeline
pipeline = ORTStableDiffusionXLPipeline.from_pretrained("greentree/SDXL-olive-optimized")

from diffusers.

neonarc4 avatar neonarc4 commented on June 8, 2024

@fabiorigano
tried earlier just getting similar issue encounter


2024-05-12 22:48:45.277336: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-05-12 22:48:46.160987: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
WARNING:tensorflow:From Z:\software\python11\Lib\site-packages\tf_keras\src\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.

Traceback (most recent call last):
  File "X:\sad\practice\test\aii\neo.py", line 259, in <module>
    pipeline = ORTStableDiffusionXLPipeline.from_pretrained("greentree/SDXL-olive-optimized")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\optimum\onnxruntime\modeling_ort.py", line 669, in from_pretrained
    return super().from_pretrained(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\optimum\modeling_base.py", line 402, in from_pretrained
    return from_pretrained_method(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\optimum\onnxruntime\modeling_diffusion.py", line 337, in _from_pretrained    vae_decoder, text_encoder, unet, vae_encoder, text_encoder_2 = cls.load_model(
                                                                   ^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\optimum\onnxruntime\modeling_diffusion.py", line 214, in load_model
    vae_decoder = ORTModel.load_model(vae_decoder_path, provider, session_options, provider_options)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\optimum\onnxruntime\modeling_ort.py", line 375, in load_model
    return ort.InferenceSession(
           ^^^^^^^^^^^^^^^^^^^^^
  File "Z:\software\python11\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 419, in __init__
    self._create_inference_session(providers, provider_options, disabled_optimizers)
  File "Z:\software\python11\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 483, in _create_inference_session
    sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.NotImplemented: [ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an implementation for GroupNorm(1) node with name 'GroupNorm_0'

from diffusers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.