AMAN-B commited on
Commit
bc416ca
·
1 Parent(s): 68f1895

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -13
README.md CHANGED
@@ -3,16 +3,23 @@ license: creativeml-openrail-m
3
  tags:
4
  - stable-diffusion
5
  - stable-diffusion-diffusers
6
- - text2image
7
- widget:
8
- - text: "A high tech solarpunk utopia in the Amazon rainforest"
9
- example_title: Amazon rainforest
10
- - text: "A pikachu fine dining with a view to the Eiffel Tower"
11
- example_title: Pikachu in Paris
12
- - text: "A mecha robot in a favela in expressionist style"
13
- example_title: Expressionist robot
14
- - text: "an insect robot preparing a delicious meal"
15
- example_title: Insect robot
16
- - text: "A small cabin on top of a snowy mountain in the style of Disney, artstation"
17
- example_title: Snowy disney cabin
18
- ---
 
 
 
 
 
 
 
 
3
  tags:
4
  - stable-diffusion
5
  - stable-diffusion-diffusers
6
+ - text-to-image
7
+ inference: true
8
+
9
+ ---
10
+
11
+ ### Diffusers
12
+ ```py
13
+ from diffusers import StableDiffusionPipeline
14
+ import torch
15
+
16
+ model_id = "runwayml/stable-diffusion-v1-5"
17
+ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, revision="fp16")
18
+ pipe = pipe.to("cuda")
19
+
20
+ prompt = "a photo of an astronaut riding a horse on mars"
21
+ image = pipe(prompt).images[0]
22
+
23
+ image.save("astronaut_rides_horse.png")
24
+ ```
25
+ For more detailed instructions, use-cases and examples in JAX follow the instructions [here](https://github.com/huggingface/diffusers#text-to-image-generation-with-stable-diffusion)