Spaces:
Running
on
Zero
Running
on
Zero
Update src/gradio_pipeline.py
Browse files- src/gradio_pipeline.py +7 -0
src/gradio_pipeline.py
CHANGED
@@ -34,7 +34,13 @@ class GradioPipeline(LivePortraitPipeline):
|
|
34 |
flag_relative_input,
|
35 |
flag_do_crop_input,
|
36 |
flag_remap_input,
|
|
|
37 |
):
|
|
|
|
|
|
|
|
|
|
|
38 |
""" for video driven potrait animation
|
39 |
"""
|
40 |
if input_image_path is not None and input_video_path is not None:
|
@@ -44,6 +50,7 @@ class GradioPipeline(LivePortraitPipeline):
|
|
44 |
'flag_relative': flag_relative_input,
|
45 |
'flag_do_crop': flag_do_crop_input,
|
46 |
'flag_pasteback': flag_remap_input,
|
|
|
47 |
}
|
48 |
# update config from user input
|
49 |
self.args = update_args(self.args, args_user)
|
|
|
34 |
flag_relative_input,
|
35 |
flag_do_crop_input,
|
36 |
flag_remap_input,
|
37 |
+
flag_closed_lip_input
|
38 |
):
|
39 |
+
|
40 |
+
# Add for closed lip
|
41 |
+
if flag_closed_lip_input:
|
42 |
+
self.init_retargeting_image(self, retargeting_source_scale=2.5, input_image = input_image_path)
|
43 |
+
|
44 |
""" for video driven potrait animation
|
45 |
"""
|
46 |
if input_image_path is not None and input_video_path is not None:
|
|
|
50 |
'flag_relative': flag_relative_input,
|
51 |
'flag_do_crop': flag_do_crop_input,
|
52 |
'flag_pasteback': flag_remap_input,
|
53 |
+
|
54 |
}
|
55 |
# update config from user input
|
56 |
self.args = update_args(self.args, args_user)
|