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

fix SD XL ONNX export for img2img task #1194

Merged
merged 3 commits into from
Jul 18, 2023
Merged

fix SD XL ONNX export for img2img task #1194

merged 3 commits into from
Jul 18, 2023

Conversation

echarlaix
Copy link
Collaborator

@echarlaix echarlaix commented Jul 17, 2023

In this PR we use StableDiffusionXLImg2ImgPipeline to load a SD XL pipeline by default before exporting each component as it will allow some components to be optional during loading.
Depending on the value of requires_aesthetics_score we create a dummy input of the corresponding expected shape https://github.com/huggingface/diffusers/blob/v0.18.2/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py#L571 when exporting the U-NET component

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jul 17, 2023

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

@echarlaix echarlaix requested a review from fxmarty July 18, 2023 08:53
@echarlaix echarlaix marked this pull request as ready for review July 18, 2023 08:53
@echarlaix echarlaix merged commit f26e5b1 into main Jul 18, 2023
64 of 66 checks passed
@echarlaix echarlaix deleted the fix-sd-xl-img2img branch July 18, 2023 12:06
baskrahmer pushed a commit to baskrahmer/optimum that referenced this pull request Jul 22, 2023
* fix SD XL ONNX export for img2img task

* fix pipeline
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