add diffusers usage in model card
Browse filesadded how to use model with diffusers in model card
README.md
CHANGED
@@ -15,6 +15,27 @@ If you get too many yellow faces or you dont like the strong blue bias, simply p
|
|
15 |
|
16 |
--
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
**Characters rendered with this model:**
|
19 |
![Character Samples](https://huggingface.co/dallinmackay/Van-Gogh-diffusion/resolve/main/preview1.jpg)
|
20 |
_prompt and settings used: **lvngvncnt, [person], highly detailed** | **Steps: 25, Sampler: Euler, CFG scale: 6**_
|
|
|
15 |
|
16 |
--
|
17 |
|
18 |
+
### 🧨 Diffusers
|
19 |
+
|
20 |
+
This model can be used just like any other Stable Diffusion model. For more information,
|
21 |
+
please have a look at the [Stable Diffusion](https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion).
|
22 |
+
|
23 |
+
You can also export the model to [ONNX](https://huggingface.co/docs/diffusers/optimization/onnx), [MPS](https://huggingface.co/docs/diffusers/optimization/mps) and/or [FLAX/JAX]().
|
24 |
+
|
25 |
+
```python
|
26 |
+
from diffusers import StableDiffusionPipeline
|
27 |
+
import torch
|
28 |
+
|
29 |
+
model_id = "dallinmackay/Van-Gogh-diffusion"
|
30 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
|
31 |
+
pipe = pipe.to("cuda")
|
32 |
+
|
33 |
+
prompt = "lvngvncnt, beautiful woman at sunset"
|
34 |
+
image = pipe(prompt).images[0]
|
35 |
+
|
36 |
+
image.save("./sunset.png")
|
37 |
+
```
|
38 |
+
|
39 |
**Characters rendered with this model:**
|
40 |
![Character Samples](https://huggingface.co/dallinmackay/Van-Gogh-diffusion/resolve/main/preview1.jpg)
|
41 |
_prompt and settings used: **lvngvncnt, [person], highly detailed** | **Steps: 25, Sampler: Euler, CFG scale: 6**_
|