Spaces:
Sleeping
Sleeping
create new
Browse files- app.py +3 -0
- inference.py +0 -3
- requirements.txt +3 -1
app.py
CHANGED
@@ -3,9 +3,12 @@ import os
|
|
3 |
import datetime
|
4 |
import inference
|
5 |
|
|
|
|
|
6 |
example1 = ["sample_data/ref1.jpg", "sample_data/ano.mp3"]
|
7 |
example2 = ["sample_data/ref2.jpg", "sample_data/rakugo.mp3"]
|
8 |
|
|
|
9 |
def fix_face_video(input_image, input_audio):
|
10 |
|
11 |
dt = datetime.datetime.now() + datetime.timedelta(hours=9)
|
|
|
3 |
import datetime
|
4 |
import inference
|
5 |
|
6 |
+
import spaces
|
7 |
+
|
8 |
example1 = ["sample_data/ref1.jpg", "sample_data/ano.mp3"]
|
9 |
example2 = ["sample_data/ref2.jpg", "sample_data/rakugo.mp3"]
|
10 |
|
11 |
+
@spaces.GPU
|
12 |
def fix_face_video(input_image, input_audio):
|
13 |
|
14 |
dt = datetime.datetime.now() + datetime.timedelta(hours=9)
|
inference.py
CHANGED
@@ -19,8 +19,6 @@ from pipelines import VExpressPipeline
|
|
19 |
from pipelines.utils import draw_kps_image, save_video
|
20 |
from pipelines.utils import retarget_kps
|
21 |
|
22 |
-
import spaces
|
23 |
-
|
24 |
# 引数用ダミークラス
|
25 |
class args_dum:
|
26 |
|
@@ -164,7 +162,6 @@ def get_scheduler():
|
|
164 |
scheduler = DDIMScheduler(**scheduler_kwargs)
|
165 |
return scheduler
|
166 |
|
167 |
-
@spaces.GPU
|
168 |
def fix_face(image, audio, out_path):
|
169 |
# args = parse_args()
|
170 |
args = args_dum()
|
|
|
19 |
from pipelines.utils import draw_kps_image, save_video
|
20 |
from pipelines.utils import retarget_kps
|
21 |
|
|
|
|
|
22 |
# 引数用ダミークラス
|
23 |
class args_dum:
|
24 |
|
|
|
162 |
scheduler = DDIMScheduler(**scheduler_kwargs)
|
163 |
return scheduler
|
164 |
|
|
|
165 |
def fix_face(image, audio, out_path):
|
166 |
# args = parse_args()
|
167 |
args = args_dum()
|
requirements.txt
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
torch==2.0.1
|
2 |
xformers==0.0.22
|
3 |
diffusers==0.24.0
|
@@ -12,4 +14,4 @@ transformers==4.30.2
|
|
12 |
einops==0.4.1
|
13 |
tqdm==4.66.1
|
14 |
av==11.0.0
|
15 |
-
opencv-python
|
|
|
1 |
+
accelerate
|
2 |
+
gradio==4.32.1
|
3 |
torch==2.0.1
|
4 |
xformers==0.0.22
|
5 |
diffusers==0.24.0
|
|
|
14 |
einops==0.4.1
|
15 |
tqdm==4.66.1
|
16 |
av==11.0.0
|
17 |
+
opencv-python
|