Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ except Exception as e:
|
|
| 15 |
os.environ["GRADIO_TEMP_DIR"] = "./tmp"
|
| 16 |
|
| 17 |
pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
|
| 18 |
-
@spaces.GPU(duration=
|
| 19 |
def generate_video(
|
| 20 |
image_path,
|
| 21 |
audio_path,
|
|
@@ -157,7 +157,7 @@ def create_args(
|
|
| 157 |
parser.add_argument(
|
| 158 |
"--max_num_frames",
|
| 159 |
type=int,
|
| 160 |
-
default=
|
| 161 |
required=False,
|
| 162 |
help="The maximum frames for generating videos, the audio part exceeding max_num_frames/fps will be truncated.",
|
| 163 |
)
|
|
@@ -170,7 +170,7 @@ def create_args(
|
|
| 170 |
parser.add_argument(
|
| 171 |
"--fps",
|
| 172 |
type=int,
|
| 173 |
-
default=
|
| 174 |
required=False,
|
| 175 |
)
|
| 176 |
parser.add_argument(
|
|
@@ -221,25 +221,6 @@ with gr.Blocks(title="FantasyTalking Video Generation") as demo:
|
|
| 221 |
gr.Markdown(
|
| 222 |
"""
|
| 223 |
# FantasyTalking: Realistic Talking Portrait Generation via Coherent Motion Synthesis
|
| 224 |
-
|
| 225 |
-
<div align="center">
|
| 226 |
-
<strong> Mengchao Wang1* Qiang Wang1* Fan Jiang1†
|
| 227 |
-
Yaqi Fan2 Yunpeng Zhang1,2 YongGang Qi2‡
|
| 228 |
-
Kun Zhao1. Mu Xu1 </strong>
|
| 229 |
-
</div>
|
| 230 |
-
|
| 231 |
-
<div align="center">
|
| 232 |
-
<strong>1AMAP,Alibaba Group 2Beijing University of Posts and Telecommunications</strong>
|
| 233 |
-
</div>
|
| 234 |
-
|
| 235 |
-
<div style="display:flex;justify-content:center;column-gap:4px;">
|
| 236 |
-
<a href="https://github.com/Fantasy-AMAP/fantasy-talking">
|
| 237 |
-
<img src='https://img.shields.io/badge/GitHub-Repo-blue'>
|
| 238 |
-
</a>
|
| 239 |
-
<a href="https://arxiv.org/abs/2504.04842">
|
| 240 |
-
<img src='https://img.shields.io/badge/ArXiv-Paper-red'>
|
| 241 |
-
</a>
|
| 242 |
-
</div>
|
| 243 |
"""
|
| 244 |
)
|
| 245 |
|
|
|
|
| 15 |
os.environ["GRADIO_TEMP_DIR"] = "./tmp"
|
| 16 |
|
| 17 |
pipe,fantasytalking,wav2vec_processor,wav2vec = None,None,None,None
|
| 18 |
+
@spaces.GPU(duration=120)
|
| 19 |
def generate_video(
|
| 20 |
image_path,
|
| 21 |
audio_path,
|
|
|
|
| 157 |
parser.add_argument(
|
| 158 |
"--max_num_frames",
|
| 159 |
type=int,
|
| 160 |
+
default=241,
|
| 161 |
required=False,
|
| 162 |
help="The maximum frames for generating videos, the audio part exceeding max_num_frames/fps will be truncated.",
|
| 163 |
)
|
|
|
|
| 170 |
parser.add_argument(
|
| 171 |
"--fps",
|
| 172 |
type=int,
|
| 173 |
+
default=24,
|
| 174 |
required=False,
|
| 175 |
)
|
| 176 |
parser.add_argument(
|
|
|
|
| 221 |
gr.Markdown(
|
| 222 |
"""
|
| 223 |
# FantasyTalking: Realistic Talking Portrait Generation via Coherent Motion Synthesis
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
"""
|
| 225 |
)
|
| 226 |
|