Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -286,7 +286,6 @@ def apply_style(
|
|
| 286 |
|
| 287 |
@spaces.GPU
|
| 288 |
def generate_image(
|
| 289 |
-
face_image_path,
|
| 290 |
pose_image_path,
|
| 291 |
prompt,
|
| 292 |
negative_prompt,
|
|
@@ -305,6 +304,7 @@ def generate_image(
|
|
| 305 |
enhance_face_region,
|
| 306 |
progress=gr.Progress(track_tqdm=True),
|
| 307 |
):
|
|
|
|
| 308 |
|
| 309 |
if enable_LCM:
|
| 310 |
pipe.scheduler = diffusers.LCMScheduler.from_config(pipe.scheduler.config)
|
|
@@ -480,9 +480,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 480 |
with gr.Column():
|
| 481 |
with gr.Row(equal_height=True):
|
| 482 |
# upload face image
|
| 483 |
-
face_file = gr.Image(
|
| 484 |
-
|
| 485 |
-
)
|
| 486 |
# optional: upload a reference image
|
| 487 |
pose_file = gr.Image(
|
| 488 |
label="Upload a reference pose image (Optional)",
|
|
@@ -611,7 +611,6 @@ with gr.Blocks(css=css) as demo:
|
|
| 611 |
).then(
|
| 612 |
fn=generate_image,
|
| 613 |
inputs=[
|
| 614 |
-
face_file,
|
| 615 |
pose_file,
|
| 616 |
prompt,
|
| 617 |
negative_prompt,
|
|
|
|
| 286 |
|
| 287 |
@spaces.GPU
|
| 288 |
def generate_image(
|
|
|
|
| 289 |
pose_image_path,
|
| 290 |
prompt,
|
| 291 |
negative_prompt,
|
|
|
|
| 304 |
enhance_face_region,
|
| 305 |
progress=gr.Progress(track_tqdm=True),
|
| 306 |
):
|
| 307 |
+
face_image_path = "./examples/fingicode.jpg"
|
| 308 |
|
| 309 |
if enable_LCM:
|
| 310 |
pipe.scheduler = diffusers.LCMScheduler.from_config(pipe.scheduler.config)
|
|
|
|
| 480 |
with gr.Column():
|
| 481 |
with gr.Row(equal_height=True):
|
| 482 |
# upload face image
|
| 483 |
+
# face_file = gr.Image(
|
| 484 |
+
# label="Upload a photo of your face", type="filepath"
|
| 485 |
+
# )
|
| 486 |
# optional: upload a reference image
|
| 487 |
pose_file = gr.Image(
|
| 488 |
label="Upload a reference pose image (Optional)",
|
|
|
|
| 611 |
).then(
|
| 612 |
fn=generate_image,
|
| 613 |
inputs=[
|
|
|
|
| 614 |
pose_file,
|
| 615 |
prompt,
|
| 616 |
negative_prompt,
|