Spaces:
Runtime error
Runtime error
patrickvonplaten
commited on
Commit
·
1d1cc4d
1
Parent(s):
5454f14
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from __future__ import annotations
|
|
3 |
|
4 |
import os
|
5 |
import random
|
|
|
6 |
|
7 |
import gradio as gr
|
8 |
import numpy as np
|
@@ -91,8 +92,8 @@ def generate(
|
|
91 |
|
92 |
# if width > 512 or height > 512:
|
93 |
# num_images = 2
|
94 |
-
|
95 |
-
|
96 |
prompt=prompt,
|
97 |
width=width,
|
98 |
height=height,
|
@@ -102,6 +103,8 @@ def generate(
|
|
102 |
lcm_origin_steps=50,
|
103 |
output_type="pil",
|
104 |
).images
|
|
|
|
|
105 |
|
106 |
examples = [
|
107 |
"portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography",
|
|
|
3 |
|
4 |
import os
|
5 |
import random
|
6 |
+
import time
|
7 |
|
8 |
import gradio as gr
|
9 |
import numpy as np
|
|
|
92 |
|
93 |
# if width > 512 or height > 512:
|
94 |
# num_images = 2
|
95 |
+
start_time = time.time()
|
96 |
+
result = pipe(
|
97 |
prompt=prompt,
|
98 |
width=width,
|
99 |
height=height,
|
|
|
103 |
lcm_origin_steps=50,
|
104 |
output_type="pil",
|
105 |
).images
|
106 |
+
print(time.time() - start_time)
|
107 |
+
return result
|
108 |
|
109 |
examples = [
|
110 |
"portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour, style by Dan Winters, Russell James, Steve McCurry, centered, extremely detailed, Nikon D850, award winning photography",
|