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

Improve default compilation arguments for stable diffusion #182

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

JingyaHuang
Copy link
Collaborator

  • With experiment, casting matmul operations from FP32 to BF16 can get a reasonable trade-off between inference performance and models' accuracy. Currently default does no cast which is slower than some GPU and might mislead users.
  • Set default device ids to [0, 1] as we want automatically load the compiled unet to both neuron cores.

@JingyaHuang
Copy link
Collaborator Author

FYI @oOraph.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

optimum/neuron/modeling_diffusion.py Outdated Show resolved Hide resolved
@JingyaHuang JingyaHuang merged commit 57317d0 into main Aug 21, 2023
11 of 13 checks passed
@JingyaHuang JingyaHuang deleted the improve_sd_default_comp_args branch August 21, 2023 15:19
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.

3 participants