wujunqiang
commited on
Commit
•
960755b
1
Parent(s):
a9345aa
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,10 @@ import json
|
|
9 |
import time
|
10 |
|
11 |
|
12 |
-
def character_gen(prompt, person_img, seed, randomize_seed, height, width
|
|
|
|
|
|
|
13 |
post_start_time = time.time()
|
14 |
if person_img is None:
|
15 |
gr.Warning("Empty Person image")
|
@@ -240,23 +243,23 @@ with gr.Blocks(css=css) as Character:
|
|
240 |
)
|
241 |
|
242 |
|
243 |
-
with gr.Row():
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
|
261 |
# face_scale = 0.8
|
262 |
# ref_scale = 0.8
|
@@ -280,7 +283,7 @@ with gr.Blocks(css=css) as Character:
|
|
280 |
|
281 |
button.click(
|
282 |
fn = character_gen,
|
283 |
-
inputs = [ prompt, image, seed, randomize_seed, height, width
|
284 |
outputs = [result, seed_used, result_info]
|
285 |
)
|
286 |
|
|
|
9 |
import time
|
10 |
|
11 |
|
12 |
+
def character_gen(prompt, person_img, seed, randomize_seed, height, width):
|
13 |
+
faceFidelity = 0.8
|
14 |
+
refFidelity = 0.8
|
15 |
+
|
16 |
post_start_time = time.time()
|
17 |
if person_img is None:
|
18 |
gr.Warning("Empty Person image")
|
|
|
243 |
)
|
244 |
|
245 |
|
246 |
+
# with gr.Row():
|
247 |
+
# face_scale = gr.Slider(
|
248 |
+
# label="Face_scale",
|
249 |
+
# minimum=0.3,
|
250 |
+
# maximum=1.0,
|
251 |
+
# step=0.05,
|
252 |
+
# value=0.8,
|
253 |
+
# interactive=False,
|
254 |
+
# )
|
255 |
+
# ref_scale = gr.Slider(
|
256 |
+
# label="Ref_scale",
|
257 |
+
# minimum=0.3,
|
258 |
+
# maximum=1.0,
|
259 |
+
# step=0.05,
|
260 |
+
# value=0.8,
|
261 |
+
# interactive=False,
|
262 |
+
# )
|
263 |
|
264 |
# face_scale = 0.8
|
265 |
# ref_scale = 0.8
|
|
|
283 |
|
284 |
button.click(
|
285 |
fn = character_gen,
|
286 |
+
inputs = [ prompt, image, seed, randomize_seed, height, width ],
|
287 |
outputs = [result, seed_used, result_info]
|
288 |
)
|
289 |
|