|
--- |
|
license: creativeml-openrail-m |
|
tags: |
|
- pytorch |
|
- diffusers |
|
- Stable-Diffusion-Model |
|
- diffusion-models-class |
|
--- |
|
|
|
This model is a diffusion model for text to image generation. |
|
|
|
## Usage |
|
|
|
```python |
|
from diffusers import StableDiffusionPipeline |
|
import torch |
|
|
|
pipeline = StableDiffusionPipeline.from_pretrained('MADZaMeR/stable_diffusion', torch_dtype=torch.float16 |
|
).to("cuda" if torch.cuda.is_available() else "cpu") |
|
prompt = "a photograph of an astronaut riding a horse" |
|
image = pipeline(prompt, num_inference_steps=50, guidance_scale=7.5).images[0] |
|
image |
|
``` |
|
|