-
Notifications
You must be signed in to change notification settings - Fork 6.6k
[Community Pipelines] K-Diffusion Pipeline #1360
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
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
|  | ||
|
|
||
| **K Diffusion**: | ||
| ```python | ||
| from diffusers import DiffusionPipeline, EulerDiscreteScheduler | ||
|
|
||
| seed = 33 | ||
|
|
||
| pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", custom_pipeline="sd_text2img_k_diffusion") | ||
| pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config) | ||
| pipe = pipe.to("cuda") | ||
|
|
||
| pipe.set_sampler("sample_euler") | ||
| generator = torch.Generator(device="cuda").manual_seed(seed) | ||
| image = pipe(prompt, generator=generator, num_inference_steps=50).images[0] | ||
| ``` | ||
|
|
||
|  | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell the visual difference of generated images in this README example:
I suppose there would be something different to compare?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @pingren,
All I wanted to show here is that it "works" 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw this PR in v0.8 a release notes and want to see what's the new k-diffusion, and it confuses me by showing “almost identical” results of K-diffusion and original diffusion.
Do you like the idea to tweak the parameters and show the difference? Reduce steps from 50 to 20 will show visual differences significantly.



This PR adds a pipeline that supports k-diffusion