Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -14,7 +14,8 @@ This model is a diffusion model for text to image generation.
|
|
| 14 |
```python
|
| 15 |
from diffusers import StableDiffusionPipeline
|
| 16 |
|
| 17 |
-
pipeline = StableDiffusionPipeline.from_pretrained('MADZaMeR/stable_diffusion'
|
|
|
|
| 18 |
prompt = "a photograph of an astronaut riding a horse"
|
| 19 |
image = pipeline(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
|
| 20 |
image
|
|
|
|
| 14 |
```python
|
| 15 |
from diffusers import StableDiffusionPipeline
|
| 16 |
|
| 17 |
+
pipeline = StableDiffusionPipeline.from_pretrained('MADZaMeR/stable_diffusion', torch_dtype=torch.float16
|
| 18 |
+
).to("cuda" if torch.cuda.is_available() else "cpu")
|
| 19 |
prompt = "a photograph of an astronaut riding a horse"
|
| 20 |
image = pipeline(prompt, num_inference_steps=50, guidance_scale=7.5).images[0]
|
| 21 |
image
|