Text-to-Image
Diffusers
Safetensors
StableDiffusionPipeline
stable-diffusion
stable-diffusion-diffusers
Instructions to use CompVis/stable-diffusion-v1-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use CompVis/stable-diffusion-v1-4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4", dtype=torch.bfloat16, device_map="cuda") prompt = "A high tech solarpunk utopia in the Amazon rainforest" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Commit ·
e175af9
1
Parent(s): 48a1bd8
Update README.md
Browse files
README.md
CHANGED
|
@@ -79,7 +79,7 @@ pipe = pipe.to(device)
|
|
| 79 |
|
| 80 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 81 |
with autocast("cuda"):
|
| 82 |
-
image = pipe(prompt, guidance_scale=7.5)[
|
| 83 |
|
| 84 |
image.save("astronaut_rides_horse.png")
|
| 85 |
```
|
|
@@ -96,7 +96,7 @@ pipe = pipe.to(device)
|
|
| 96 |
|
| 97 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 98 |
with autocast("cuda"):
|
| 99 |
-
image = pipe(prompt, guidance_scale=7.5)[
|
| 100 |
|
| 101 |
image.save("astronaut_rides_horse.png")
|
| 102 |
```
|
|
@@ -114,7 +114,7 @@ pipe = pipe.to("cuda")
|
|
| 114 |
|
| 115 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 116 |
with autocast("cuda"):
|
| 117 |
-
image = pipe(prompt, guidance_scale=7.5)[
|
| 118 |
|
| 119 |
image.save("astronaut_rides_horse.png")
|
| 120 |
```
|
|
|
|
| 79 |
|
| 80 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 81 |
with autocast("cuda"):
|
| 82 |
+
image = pipe(prompt, guidance_scale=7.5).images[0]
|
| 83 |
|
| 84 |
image.save("astronaut_rides_horse.png")
|
| 85 |
```
|
|
|
|
| 96 |
|
| 97 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 98 |
with autocast("cuda"):
|
| 99 |
+
image = pipe(prompt, guidance_scale=7.5).images[0]
|
| 100 |
|
| 101 |
image.save("astronaut_rides_horse.png")
|
| 102 |
```
|
|
|
|
| 114 |
|
| 115 |
prompt = "a photo of an astronaut riding a horse on mars"
|
| 116 |
with autocast("cuda"):
|
| 117 |
+
image = pipe(prompt, guidance_scale=7.5).images[0]
|
| 118 |
|
| 119 |
image.save("astronaut_rides_horse.png")
|
| 120 |
```
|