Spaces:
Runtime error
Runtime error
juancopi81
commited on
Commit
•
5fa5bfe
1
Parent(s):
e3b820b
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ sd_dreambooth_model_1.diffusion_model.load_weights("dreambooth_riffusion_model_c
|
|
14 |
|
15 |
|
16 |
def generate_images(prompt: str, num_steps: int, unconditional_guidance_scale: int, temperature: int):
|
17 |
-
|
18 |
prompt,
|
19 |
num_steps=num_steps,
|
20 |
unconditional_guidance_scale=unconditional_guidance_scale,
|
@@ -22,9 +22,9 @@ def generate_images(prompt: str, num_steps: int, unconditional_guidance_scale: i
|
|
22 |
batch_size=1,
|
23 |
)
|
24 |
|
25 |
-
|
26 |
|
27 |
-
return
|
28 |
|
29 |
|
30 |
# pass function, input type for prompt, the output for multiple images
|
|
|
14 |
|
15 |
|
16 |
def generate_images(prompt: str, num_steps: int, unconditional_guidance_scale: int, temperature: int):
|
17 |
+
img = sd_dreambooth_model_1.generate(
|
18 |
prompt,
|
19 |
num_steps=num_steps,
|
20 |
unconditional_guidance_scale=unconditional_guidance_scale,
|
|
|
22 |
batch_size=1,
|
23 |
)
|
24 |
|
25 |
+
pil_img = Image.fromarray(img[0])
|
26 |
|
27 |
+
return pil_img
|
28 |
|
29 |
|
30 |
# pass function, input type for prompt, the output for multiple images
|