Skip to content

Allow passing session_options for ORT backend #620

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

Merged
merged 1 commit into from
Sep 23, 2022
Merged

Allow passing session_options for ORT backend #620

merged 1 commit into from
Sep 23, 2022

Conversation

cloudhan
Copy link
Contributor

@cloudhan cloudhan commented Sep 23, 2022

ONNXRuntime accepts a session_options during session creation. It enables a lot of configuration and tuning.

To use it, for example, enable verbose level log

import onnxruntime as ort
ort.set_default_logger_severity(args.log_severity)

sess_options = ort.SessionOptions()
sess_options.log_severity_level = 0  # Verbose 

pipe = StableDiffusionOnnxPipeline.from_pretrained(
    "<the-model>",
    provider=args.provider,
    sess_options=sess_options,
)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 23, 2022

The documentation is not available anymore as the PR was closed or merged.

@cloudhan
Copy link
Contributor Author

@anton-l @pcuenca could you take a look?

@pcuenca
Copy link
Member

pcuenca commented Sep 23, 2022

This sounds interesting, what do you think @anton-l ?

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, wanted to add these for easier debugging too, thanks @cloudhan!

@anton-l anton-l merged commit 8211b62 into huggingface:main Sep 23, 2022
@cloudhan cloudhan deleted the ort-pass-sess-options branch September 23, 2022 13:38
prathikr pushed a commit to prathikr/diffusers that referenced this pull request Oct 26, 2022
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
1. Update the models to 8 dec.
2. precision is default to `fp16` in CLI.
3. version is default to `v2.1base` in CLI as well as web.
4. The default scheduler is set to `EulerDiscrete` now.

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>

Signed-off-by: Gaurav Shukla <gaurav@nod-labs.com>
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
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.

4 participants