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

Add latent consistency #5438

Merged
merged 6 commits into from
Oct 18, 2023
Merged

Add latent consistency #5438

merged 6 commits into from
Oct 18, 2023

Conversation

patrickvonplaten
Copy link
Contributor

@patrickvonplaten patrickvonplaten commented Oct 18, 2023

What does this PR do?

This PR adds: https://latent-consistency-models.github.io/ from https://github.com/luosiallen .

@luosiallen feel free to suggest any changes to the wording. Once this PR is merged the following code will work out of the box for existing PyPi versions:

from diffusers import DiffusionPipeline
import torch

pipe = DiffusionPipeline.from_pretrained("SimianLuo/LCM_Dreamshaper_v7", custom_pipeline="latent_consistency_txt2img")
pipe.to(torch_device="cuda", torch_dtype=torch.float16)

prompt = "Self-portrait oil painting, a beautiful cyborg with golden hair, 8k"
num_inference_steps = 4  # can be changed to 1, 2 or 4

images = pipe(prompt=prompt, num_inference_steps=num_inference_steps, guidance_scale=8.0, lcm_origin_steps=50, output_type="pil").images

@patrickvonplaten patrickvonplaten merged commit 85dccab into main Oct 18, 2023
13 checks passed
mhetrerajat pushed a commit to mhetrerajat/diffusers that referenced this pull request Oct 23, 2023
* Add latent consistency

* Update examples/community/README.md

* Add latent consistency

* make fix copies

* Apply suggestions from code review
@kashif kashif deleted the add_latent_consistency branch November 1, 2023 17:23
AmericanPresidentJimmyCarter pushed a commit to AmericanPresidentJimmyCarter/diffusers that referenced this pull request Apr 26, 2024
* Add latent consistency

* Update examples/community/README.md

* Add latent consistency

* make fix copies

* Apply suggestions from code review
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.

1 participant