Instructions to use kandinskylab/Kandinsky-5.0-T2V-Lite-distilled16steps-10s-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kandinskylab/Kandinsky-5.0-T2V-Lite-distilled16steps-10s-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("kandinskylab/Kandinsky-5.0-T2V-Lite-distilled16steps-10s-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md (#3)
Browse files- Update README.md (ee8cb0535284e704362ebd29eb8e37d2412ca929)
Co-authored-by: Lev Novitskiy <leffff@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -47,6 +47,9 @@ pipe = Kandinsky5T2VPipeline.from_pretrained(
|
|
| 47 |
)
|
| 48 |
pipe = pipe.to("cuda")
|
| 49 |
|
|
|
|
|
|
|
|
|
|
| 50 |
# Generate video
|
| 51 |
prompt = "A cat and a dog baking a cake together in a kitchen."
|
| 52 |
negative_prompt = "Static, 2D cartoon, cartoon, 2d animation, paintings, images, worst quality, low quality, ugly, deformed, walking backwards"
|
|
|
|
| 47 |
)
|
| 48 |
pipe = pipe.to("cuda")
|
| 49 |
|
| 50 |
+
pipe.transformer.set_attention_backend("flex")
|
| 51 |
+
pipe.transformer.compile(mode="max-autotune-no-cudagraphs", dynamic=True)
|
| 52 |
+
|
| 53 |
# Generate video
|
| 54 |
prompt = "A cat and a dog baking a cake together in a kitchen."
|
| 55 |
negative_prompt = "Static, 2D cartoon, cartoon, 2d animation, paintings, images, worst quality, low quality, ugly, deformed, walking backwards"
|