mirror of
https://github.com/facefusion/facefusion.git
synced 2026-09-15 12:05:27 +02:00
Merge branch 'master' into v4
# Conflicts: # facefusion/metadata.py # facefusion/uis/assets/overrides.css # facefusion/vision.py # facefusion/workflows/core.py # facefusion/workflows/to_video.py # tests/test_cli_age_modifier.py # tests/test_cli_background_remover.py # tests/test_cli_expression_restorer.py # tests/test_cli_face_debugger.py # tests/test_cli_face_editor.py # tests/test_cli_face_enhancer.py # tests/test_cli_face_swapper.py # tests/test_cli_frame_colorizer.py # tests/test_cli_frame_enhancer.py # tests/test_cli_lip_syncer.py # tests/test_ffmpeg.py # tests/test_vision.py
This commit is contained in:
@@ -96,11 +96,11 @@ def extract_static_video_metadata(video_path : str) -> VideoMetadata:
|
||||
|
||||
|
||||
def extract_video_metadata(video_path : str) -> VideoMetadata:
|
||||
video_entries = probe_video_entries(video_path, [ 'width', 'height', 'r_frame_rate', 'color_transfer' ])
|
||||
video_entries = probe_video_entries(video_path, [ 'width', 'height', 'avg_frame_rate', 'r_frame_rate', 'color_transfer' ])
|
||||
format_entries = probe_format_entries(video_path, [ 'duration', 'bit_rate' ])
|
||||
|
||||
duration = float(format_entries.get('duration'))
|
||||
fps = extract_video_fps(video_entries.get('r_frame_rate'))
|
||||
fps = extract_video_fps(video_entries)
|
||||
frame_total = round(duration * fps)
|
||||
width = int(video_entries.get('width'))
|
||||
height = int(video_entries.get('height'))
|
||||
@@ -120,11 +120,12 @@ def extract_video_metadata(video_path : str) -> VideoMetadata:
|
||||
return video_metadata
|
||||
|
||||
|
||||
def extract_video_fps(frame_rate : str) -> Fps:
|
||||
if frame_rate and '/' in frame_rate:
|
||||
numerator, denominator = frame_rate.split('/')
|
||||
def extract_video_fps(video_entries : Dict[str, str]) -> Fps:
|
||||
for frame_rate in [ video_entries.get('avg_frame_rate'), video_entries.get('r_frame_rate') ]:
|
||||
if frame_rate and '/' in frame_rate:
|
||||
numerator, denominator = frame_rate.split('/')
|
||||
|
||||
if int(numerator) and int(denominator):
|
||||
return int(numerator) / int(denominator)
|
||||
if int(numerator) and int(denominator):
|
||||
return int(numerator) / int(denominator)
|
||||
|
||||
return 0.0
|
||||
|
||||
@@ -19,15 +19,15 @@ LOCALES =\
|
||||
}
|
||||
ONNXRUNTIME_SET =\
|
||||
{
|
||||
'default': ('onnxruntime', '1.28.0')
|
||||
'default': ('onnxruntime', '1.29.0')
|
||||
}
|
||||
if is_windows() or is_linux():
|
||||
ONNXRUNTIME_SET['cuda@12'] = ('onnxruntime-gpu', '1.24.4')
|
||||
ONNXRUNTIME_SET['cuda@13'] = ('onnxruntime-gpu', '1.28.0')
|
||||
ONNXRUNTIME_SET['cuda@13'] = ('onnxruntime-gpu', '1.29.0')
|
||||
ONNXRUNTIME_SET['openvino'] = ('onnxruntime-openvino', '1.24.1')
|
||||
if is_windows():
|
||||
ONNXRUNTIME_SET['directml'] = ('onnxruntime-directml', '1.24.4')
|
||||
ONNXRUNTIME_SET['qnn'] = ('onnxruntime-qnn', '2.4.0')
|
||||
ONNXRUNTIME_SET['qnn'] = ('onnxruntime-qnn', '2.5.0')
|
||||
if is_linux():
|
||||
ONNXRUNTIME_SET['migraphx'] = ('onnxruntime-migraphx', '1.27.1')
|
||||
ONNXRUNTIME_SET['rocm'] = ('onnxruntime-rocm', '1.22.2.post3')
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
numpy==2.4.6
|
||||
onnx==1.22.0
|
||||
onnxruntime==1.28.0
|
||||
onnxruntime==1.29.0
|
||||
opencv-python-headless==5.0.0.93
|
||||
psutil==7.2.2
|
||||
python-multipart==0.0.28
|
||||
|
||||
Reference in New Issue
Block a user