Skip to content

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
@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