Text-to-Image
Diffusers
English
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
image-to-image
aiart
anime
Instructions to use TheRafal/everything-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use TheRafal/everything-v1 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("TheRafal/everything-v1", 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
- Local Apps Settings
- Draw Things
- DiffusionBee
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 |
----
|