Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: openrail++
|
| 5 |
+
tags:
|
| 6 |
+
- stable-diffusion
|
| 7 |
+
- stable-diffusion-diffusers
|
| 8 |
+
- stable-diffusion-xl
|
| 9 |
+
- stable-diffusion-xl-lightning
|
| 10 |
+
- text-to-image
|
| 11 |
+
- art
|
| 12 |
+
- artistic
|
| 13 |
+
- diffusers
|
| 14 |
+
- anime
|
| 15 |
+
- dreamshaper
|
| 16 |
+
- turbo
|
| 17 |
+
- lcm
|
| 18 |
+
duplicated_from: lykon/dreamshaper-xl-lightning
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Dreamshaper XL Lightning
|
| 22 |
+
|
| 23 |
+
`lykon/dreamshaper-xl-lightning` is a Stable Diffusion model that has been fine-tuned on [stabilityai/stable-diffusion-xl-base-1.0](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
| 24 |
+
|
| 25 |
+
Please consider supporting me:
|
| 26 |
+
- on [Patreon](https://www.patreon.com/Lykon275)
|
| 27 |
+
- or [buy me a coffee](https://snipfeed.co/lykon)
|
| 28 |
+
|
| 29 |
+
## Diffusers
|
| 30 |
+
|
| 31 |
+
For more general information on how to run text-to-image models with 🧨 Diffusers, see [the docs](https://huggingface.co/docs/diffusers/using-diffusers/conditional_image_generation).
|
| 32 |
+
|
| 33 |
+
1. Installation
|
| 34 |
+
|
| 35 |
+
```
|
| 36 |
+
pip install diffusers transformers accelerate
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
2. Run
|
| 40 |
+
```py
|
| 41 |
+
from diffusers import AutoPipelineForText2Image, DPMSolverMultistepScheduler
|
| 42 |
+
import torch
|
| 43 |
+
|
| 44 |
+
pipe = AutoPipelineForText2Image.from_pretrained('lykon/dreamshaper-xl-lightning', torch_dtype=torch.float16, variant="fp16")
|
| 45 |
+
pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)
|
| 46 |
+
pipe = pipe.to("cuda")
|
| 47 |
+
|
| 48 |
+
prompt = "portrait photo of muscular bearded guy in a worn mech suit, light bokeh, intricate, steel metal, elegant, sharp focus, soft lighting, vibrant colors"
|
| 49 |
+
|
| 50 |
+
generator = torch.manual_seed(0)
|
| 51 |
+
image = pipe(prompt, num_inference_steps=4, guidance_scale=2).images[0]
|
| 52 |
+
image.save("./image.png")
|
| 53 |
+
```
|