Spaces:
Paused
Paused
Update src/facerender/animate.py
Browse files
src/facerender/animate.py
CHANGED
@@ -194,7 +194,7 @@ class AnimateFromCoeff():
|
|
194 |
video_name_full = x['video_name'] + '_full.mp4'
|
195 |
full_video_path = os.path.join(video_save_dir, video_name_full)
|
196 |
return_path = full_video_path
|
197 |
-
paste_pic(path, pic_path, crop_info, new_audio_path, full_video_path)
|
198 |
print(f'The generated video is named {video_save_dir}/{video_name_full}')
|
199 |
else:
|
200 |
full_video_path = av_path
|
@@ -205,7 +205,7 @@ class AnimateFromCoeff():
|
|
205 |
enhanced_path = os.path.join(video_save_dir, 'temp_'+video_name_enhancer)
|
206 |
av_path_enhancer = os.path.join(video_save_dir, video_name_enhancer)
|
207 |
return_path = av_path_enhancer
|
208 |
-
enhanced_images = face_enhancer(
|
209 |
|
210 |
imageio.mimsave(enhanced_path, enhanced_images, fps=float(25))
|
211 |
|
|
|
194 |
video_name_full = x['video_name'] + '_full.mp4'
|
195 |
full_video_path = os.path.join(video_save_dir, video_name_full)
|
196 |
return_path = full_video_path
|
197 |
+
base64_video,temp_file_path = paste_pic(path, pic_path, crop_info, new_audio_path, full_video_path)
|
198 |
print(f'The generated video is named {video_save_dir}/{video_name_full}')
|
199 |
else:
|
200 |
full_video_path = av_path
|
|
|
205 |
enhanced_path = os.path.join(video_save_dir, 'temp_'+video_name_enhancer)
|
206 |
av_path_enhancer = os.path.join(video_save_dir, video_name_enhancer)
|
207 |
return_path = av_path_enhancer
|
208 |
+
enhanced_images = face_enhancer(temp_file_path, method=enhancer, bg_upsampler=background_enhancer)
|
209 |
|
210 |
imageio.mimsave(enhanced_path, enhanced_images, fps=float(25))
|
211 |
|