Instructions to use Kwai-Kolors/Kolors-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Kwai-Kolors/Kolors-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("Kwai-Kolors/Kolors-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
Browse files
README.md
CHANGED
|
@@ -41,7 +41,7 @@ image = pipe(
|
|
| 41 |
width=1024,
|
| 42 |
num_inference_steps=50,
|
| 43 |
guidance_scale=5.0,
|
| 44 |
-
generator=
|
| 45 |
).images[0]
|
| 46 |
image.show()
|
| 47 |
```
|
|
|
|
| 41 |
width=1024,
|
| 42 |
num_inference_steps=50,
|
| 43 |
guidance_scale=5.0,
|
| 44 |
+
generator=torch.Generator(pipe.device).manual_seed(66),
|
| 45 |
).images[0]
|
| 46 |
image.show()
|
| 47 |
```
|