Spaces:
Runtime error
Runtime error
Dhruv Diddi
commited on
Commit
·
6356404
1
Parent(s):
f7072bd
fix gpu params
Browse files
app.py
CHANGED
@@ -7,13 +7,15 @@ from PIL import Image
|
|
7 |
import re
|
8 |
import os
|
9 |
|
|
|
|
|
10 |
auth_token = os.getenv("auth_token")
|
11 |
model_id = "CompVis/stable-diffusion-v1-4"
|
12 |
device = "cpu"
|
13 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=auth_token
|
14 |
pipe = pipe.to(device)
|
15 |
|
16 |
-
def infer(prompt, samples, steps, scale, seed):
|
17 |
generator = torch.Generator(device=device).manual_seed(seed)
|
18 |
images_list = pipe(
|
19 |
[prompt] * samples,
|
|
|
7 |
import re
|
8 |
import os
|
9 |
|
10 |
+
|
11 |
+
|
12 |
auth_token = os.getenv("auth_token")
|
13 |
model_id = "CompVis/stable-diffusion-v1-4"
|
14 |
device = "cpu"
|
15 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, use_auth_token=auth_token)
|
16 |
pipe = pipe.to(device)
|
17 |
|
18 |
+
def infer(prompt, samples, steps, scale, seed):
|
19 |
generator = torch.Generator(device=device).manual_seed(seed)
|
20 |
images_list = pipe(
|
21 |
[prompt] * samples,
|