Skip to content

Conversation

@eaidova
Copy link
Contributor

@eaidova eaidova commented Jan 13, 2025

What does this PR do?

  • provided opportunity to select model checkpoint variant for loading
  • supported Sana image generation model family

Example of usage:

import torch

from optimum.intel.openvino import OVDiffusionPipeline


pipe = OVDiffusionPipeline.from_pretrained("Efficient-Large-Model/Sana_600M_512px_diffusers", variant="fp16")
prompt = 'a cyberpunk cat in neon style'
image = pipe(
    prompt=prompt,
    generator=torch.Generator(device="cpu").manual_seed(142),
)[0]

image[0].save("sana_fp16.png")

Generated image:
sana_fp16

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@eaidova eaidova changed the title Ea/sana support sana support Jan 13, 2025
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@eaidova eaidova marked this pull request as ready for review January 17, 2025 08:10
@andrei-kochin
Copy link

@echarlaix @IlyasMoutawwakil could you please take a look?

@eaidova
Copy link
Contributor Author

eaidova commented Jan 30, 2025

@IlyasMoutawwakil all comments applied (failed test is not related and already fixed on main), could you please take a look one more time?
Thanks!

Co-authored-by: Ilyas Moutawwakil <[email protected]>
Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

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

Thanks for the addition @eaidova

@echarlaix echarlaix merged commit 78a74ce into huggingface:main Jan 30, 2025
22 checks passed
[
(OVStableDiffusion3Pipeline, "stable-diffusion-3", 9, 65),
(OVFluxPipeline, "flux", 7, 56),
(OVSanaPipeline, "sana", 19, 53),
Copy link
Contributor

Choose a reason for hiding this comment

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

@nikita-savelyevv any idea to get these predefined num of quantized node ?

Copy link
Collaborator

@nikita-savelyevv nikita-savelyevv Jul 8, 2025

Choose a reason for hiding this comment

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

@openvino-dev-samples For example, you can run the newly added test locally and see how many reference nodes there are based on an assertion error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet