Skip to content

Industry leading face manipulation platform

Patch 3.6.1 (#1078)

Henry Ruhs5b7d145aa765
diff --git a/facefusion/curl_builder.py b/facefusion/curl_builder.py
index 81958580..08ac7a87 100644
--- a/facefusion/curl_builder.py
+++ b/facefusion/curl_builder.py
@@ -9,7 +9,7 @@ from facefusion.types import Command
def run(commands : List[Command]) -> List[Command]:
user_agent = metadata.get('name') + '/' + metadata.get('version')
- return [ shutil.which('curl'), '--user-agent', user_agent, '--location', '--silent' ] + commands
+ return [ shutil.which('curl'), '--user-agent', user_agent, '--location', '--silent', '--ssl-no-revoke' ] + commands
def chain(*commands : List[Command]) -> List[Command]:
diff --git a/facefusion/installer.py b/facefusion/installer.py
index 8ccf66ec..f50a0c37 100644
--- a/facefusion/installer.py
+++ b/facefusion/installer.py
@@ -19,14 +19,14 @@ LOCALES =\
}
ONNXRUNTIME_SET =\
{
- 'default': ('onnxruntime', '1.24.1')
+ 'default': ('onnxruntime', '1.24.4')
}
if is_windows() or is_linux():
- ONNXRUNTIME_SET['cuda'] = ('onnxruntime-gpu', '1.24.3')
+ ONNXRUNTIME_SET['cuda'] = ('onnxruntime-gpu', '1.24.4')
ONNXRUNTIME_SET['openvino'] = ('onnxruntime-openvino', '1.24.1')
if is_windows():
- ONNXRUNTIME_SET['directml'] = ('onnxruntime-directml', '1.24.3')
- ONNXRUNTIME_SET['qnn'] = ('onnxruntime-qnn', '1.24.3')
+ ONNXRUNTIME_SET['directml'] = ('onnxruntime-directml', '1.24.4')
+ ONNXRUNTIME_SET['qnn'] = ('onnxruntime-qnn', '1.24.4')
if is_linux():
ONNXRUNTIME_SET['migraphx'] = ('onnxruntime-migraphx', '1.24.2')
ONNXRUNTIME_SET['rocm'] = ('onnxruntime-rocm', '1.22.2.post1')
diff --git a/facefusion/metadata.py b/facefusion/metadata.py
index c90a1c89..027d5aed 100644
--- a/facefusion/metadata.py
+++ b/facefusion/metadata.py
@@ -4,7 +4,7 @@ METADATA =\
{
'name': 'FaceFusion',
'description': 'Industry leading face manipulation platform',
- 'version': '3.6.0',
+ 'version': '3.6.1',
'license': 'OpenRAIL-AS',
'author': 'Henry Ruhs',
'url': 'https://facefusion.io'
diff --git a/facefusion/sanitizer.py b/facefusion/sanitizer.py
index 791d0862..e8c7a920 100644
--- a/facefusion/sanitizer.py
+++ b/facefusion/sanitizer.py
@@ -1,5 +1,7 @@
import hashlib
-from typing import Sequence
+from typing import Any, Sequence
+
+from facefusion.common_helper import cast_int
def sanitize_job_id(job_id : str) -> str:
@@ -10,7 +12,9 @@ def sanitize_job_id(job_id : str) -> str:
return hashlib.sha1(job_id.encode()).hexdigest()
-def sanitize_int_range(value : int, int_range : Sequence[int]) -> int:
+def sanitize_int_range(value : Any, int_range : Sequence[int]) -> int:
+ value = cast_int(value)
+
if value in int_range:
return value
return int_range[0]
diff --git a/requirements.txt b/requirements.txt
index dcfe0722..ec42df17 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,8 +1,8 @@
gradio-rangeslider==0.0.8
gradio==5.44.1
numpy==2.2.1
-onnx==1.20.1
-onnxruntime==1.24.3
+onnx==1.21.0
+onnxruntime==1.24.4
opencv-python==4.13.0.92
tqdm==4.67.3
scipy==1.17.1
diff --git a/tests/test_curl_builder.py b/tests/test_curl_builder.py
index 20659c36..261e165e 100644
--- a/tests/test_curl_builder.py
+++ b/tests/test_curl_builder.py
@@ -7,7 +7,7 @@ from facefusion.curl_builder import chain, ping, run, set_timeout
def test_run() -> None:
user_agent = metadata.get('name') + '/' + metadata.get('version')
- assert run([]) == [ which('curl'), '--user-agent', user_agent, '--location', '--silent' ]
+ assert run([]) == [ which('curl'), '--user-agent', user_agent, '--location', '--silent', '--ssl-no-revoke' ]
def test_chain() -> None:
diff --git a/tests/test_vision.py b/tests/test_vision.py
index a440bab7..35bec382 100644
--- a/tests/test_vision.py
+++ b/tests/test_vision.py
@@ -1,7 +1,9 @@
+import os
import subprocess
import pytest
+from facefusion.common_helper import is_linux
from facefusion.download import conditional_download
from facefusion.vision import calculate_histogram_difference, count_trim_frame_total, count_video_frame_total, detect_image_resolution, detect_video_duration, detect_video_fps, detect_video_resolution, match_frame_color, normalize_resolution, pack_resolution, predict_video_frame_total, read_image, read_video_frame, restrict_image_resolution, restrict_trim_frame, restrict_video_fps, restrict_video_resolution, scale_resolution, unpack_resolution, write_image
from .helper import get_test_example_file, get_test_examples_directory, get_test_output_file, prepare_test_output_directory
@@ -92,11 +94,13 @@ def test_restrict_video_fps() -> None:
assert restrict_video_fps(get_test_example_file('target-1080p.mp4'), 60.0) == 25.0
[email protected](os.environ.get('CI') and is_linux(), reason = 'h264 codec not present')
def test_detect_video_duration() -> None:
assert detect_video_duration(get_test_example_file('target-240p.mp4')) == 10.8
assert detect_video_duration('invalid') == 0
[email protected](os.environ.get('CI') and is_linux(), reason = 'h264 codec not present')
def test_count_trim_frame_total() -> None:
assert count_trim_frame_total(get_test_example_file('target-240p.mp4'), 0, 200) == 200
assert count_trim_frame_total(get_test_example_file('target-240p.mp4'), 70, 270) == 200
@@ -107,6 +111,7 @@ def test_count_trim_frame_total() -> None:
assert count_trim_frame_total(get_test_example_file('target-240p.mp4'), None, None) == 270
[email protected](os.environ.get('CI') and is_linux(), reason = 'h264 codec not present')
def test_restrict_trim_frame() -> None:
assert restrict_trim_frame(get_test_example_file('target-240p.mp4'), 0, 200) == (0, 200)
assert restrict_trim_frame(get_test_example_file('target-240p.mp4'), 70, 270) == (70, 270)
@@ -117,6 +122,7 @@ def test_restrict_trim_frame() -> None:
assert restrict_trim_frame(get_test_example_file('target-240p.mp4'), None, None) == (0, 270)
[email protected](os.environ.get('CI') and is_linux(), reason = 'h264 codec not present')
def test_detect_video_resolution() -> None:
assert detect_video_resolution(get_test_example_file('target-240p.mp4')) == (426, 226)
assert detect_video_resolution(get_test_example_file('target-240p-90deg.mp4')) == (226, 426)