simonschoe
commited on
Commit
•
25fd4c9
1
Parent(s):
5da1560
edit usage section
Browse files
README.md
CHANGED
@@ -108,8 +108,19 @@ This model was created as part of the DreamBooth Hackathon 🔥. Visit the [orga
|
|
108 |
|
109 |
```python
|
110 |
from diffusers import StableDiffusionPipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
-
pipeline = StableDiffusionPipeline.from_pretrained('simonschoe/pokeball-machine')
|
113 |
-
image = pipeline().images[0]
|
114 |
image
|
115 |
```
|
|
|
108 |
|
109 |
```python
|
110 |
from diffusers import StableDiffusionPipeline
|
111 |
+
import torch
|
112 |
+
|
113 |
+
device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')
|
114 |
+
pipeline = StableDiffusionPipeline.from_pretrained('simonschoe/pokeball-machine').to(device)
|
115 |
+
|
116 |
+
prompt = "a pkblz ball in the middle of a miniature jungle"
|
117 |
+
|
118 |
+
image = pipeline(
|
119 |
+
prompt,
|
120 |
+
num_inference_steps=50,
|
121 |
+
guidance_scale=10,
|
122 |
+
num_images_per_prompt=1
|
123 |
+
).images[0]
|
124 |
|
|
|
|
|
125 |
image
|
126 |
```
|