Update README.md
Browse files
README.md
CHANGED
@@ -74,19 +74,20 @@ please have a look at the [Stable Diffusion](https://huggingface.co/docs/diffuse
|
|
74 |
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]().
|
75 |
|
76 |
```python
|
77 |
-
from diffusers import StableDiffusionPipeline
|
78 |
import torch
|
|
|
|
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
pipe = pipe.to("cuda")
|
85 |
|
86 |
prompt = "1girl, monika \(doki doki literature club\)"
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
90 |
```
|
91 |
|
92 |
----
|
|
|
74 |
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]().
|
75 |
|
76 |
```python
|
|
|
77 |
import torch
|
78 |
+
from torch import autocast
|
79 |
+
from diffusers import StableDiffusionPipeline
|
80 |
|
81 |
+
pipe = StableDiffusionPipeline.from_pretrained(
|
82 |
+
'TheRafal/everything-v1',
|
83 |
+
torch_dtype=torch.float32
|
84 |
+
).to('cuda')
|
|
|
85 |
|
86 |
prompt = "1girl, monika \(doki doki literature club\)"
|
87 |
+
with autocast("cuda"):
|
88 |
+
image = pipe(prompt, guidance_scale=6)["sample"][0]
|
89 |
+
|
90 |
+
image.save("test.png")
|
91 |
```
|
92 |
|
93 |
----
|