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

Enable Latent Consistency models OpenVINO export and inference #463

Merged
merged 6 commits into from
Nov 7, 2023

Conversation

echarlaix
Copy link
Collaborator

@echarlaix echarlaix commented Oct 26, 2023

Add Latent Consistency models (added in diffusers in huggingface/diffusers#5438 and huggingface/diffusers#5448 ) OpenVINO export + inference

from optimum.intel import OVLatentConsistencyModelPipeline

pipeline= OVLatentConsistencyModelPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", export=True)
prompt = "sailing ship in storm by Leonardo da Vinci"
images = pipeline(prompt=prompt, num_inference_steps=4, guidance_scale=8.0).images

with static shapes :

batch_size, num_images, height, width = 1, 1, 512, 512
pipeline.reshape(batch_size=batch_size, height=height, width=width, num_images_per_prompt=num_images)

Following ONNX integration huggingface/optimum#1469

Comment on lines 35 to 36
pip install git+https://github.com/huggingface/diffusers
pip install git+https://github.com/huggingface/optimum
Copy link
Collaborator Author

@echarlaix echarlaix Oct 26, 2023

Choose a reason for hiding this comment

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

used to trigger tests with skip decorator, will remove before merging

@echarlaix echarlaix marked this pull request as draft October 26, 2023 08:58
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 26, 2023

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

@echarlaix echarlaix marked this pull request as ready for review November 6, 2023 22:36
@echarlaix echarlaix merged commit e138878 into main Nov 7, 2023
11 of 12 checks passed
@echarlaix echarlaix deleted the latent-consistency branch November 7, 2023 11:30
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