patrickhul commited on
Commit
6c10dd3
·
1 Parent(s): 75bb1b2

Instructions on how to run

Browse files
Files changed (1) hide show
  1. README.md +20 -7
README.md CHANGED
@@ -13,14 +13,27 @@ library_name: diffusers
13
  A model from [Playground](https://playground.com)
14
  </center>
15
 
16
- # How to Run
 
 
17
 
18
- 1. Install requirements (`diffusers` and `torch`)
19
  ```bash
20
- pip install -r requirements.txt
21
  ```
22
 
23
- 2. Run demo script
24
- ```bash
25
- python demo.py
26
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  A model from [Playground](https://playground.com)
14
  </center>
15
 
16
+ ## Run Playground v1
17
+
18
+ First, install dependencies:
19
 
 
20
  ```bash
21
+ pip install diffusers torch accelerate transformers
22
  ```
23
 
24
+ Run the model:
25
+
26
+ ```python
27
+ from diffusers import DiffusionPipeline
28
+ import torch
29
+
30
+ pipe = DiffusionPipeline.from_pretrained("playgroundai/playground-v1")
31
+
32
+ if torch.cuda.is_available():
33
+ pipe.to("cuda")
34
+
35
+ prompt = "An Astronaut in a jungle, photorealistic"
36
+ image = pipe(prompt=prompt).images[0]
37
+
38
+ image.save("playground-v1.png")
39
+ ```