Patch 3.6.1 (#1078)

* Avast intercepts ssl cert and breaks curl

* modernize dependencies

* fix sanitizer for int range

* comment out tests

* disable testing for CI

* disable testing for CI
This commit is contained in:
Henry Ruhs
2026-04-19 21:17:39 +02:00
committed by GitHub
parent 519360bcd6
commit 5b7d145aa7
7 changed files with 21 additions and 11 deletions
+1 -1
View File
@@ -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]:
+4 -4
View File
@@ -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')
+1 -1
View File
@@ -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'
+6 -2
View File
@@ -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]
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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:
+6
View File
@@ -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
@pytest.mark.skipif(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
@pytest.mark.skipif(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
@pytest.mark.skipif(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)
@pytest.mark.skipif(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)