Next (#544)
* Modernize CI * Modernize CI * Modernize CI * Implement dynamic config (#518) * Implement dynamic config * Fix apply config * Move config to general * Move config to general * Move config to general * Add Windows installer * Add --open-browser * Add Windows installer part2 * Use non-commercial license for the installer * Fix create environment in installer * Fix openvino for installer * Fix conda for installer * Fix conda for installer, Remove python and pip as it is part of conda * Improve installer - guess the path * Fix CI * Add missing accept-source-agreements to installer * Install WinGet * Improve WinGet installation steps * Use absolute path for winget * More installer polishing * Add final page to installer, disable version check for Gradio * Remove finish page again * Use NEXT for metadata * Support for /S mode * Use winget-less approach * Improve Conda uninstall * Improve code using platform helpers (#529) * Update dependencies * Feat/fix windows unicode paths (#531) * Fix the Windows unicode path dilemma * Update dependencies * Fix the Windows unicode path dilemma part2 * Remove conda environment on uninstall * Fix uninstall command * Install apps for local user only * Add ultra sharp * Add clear reality * Update README and FUNDING * Update FUNDING.yml * Prevent preview of large videos in Gradio (#540) * Fix order * Refactor temporary file management, Use temporary file for image processing (#542) * Allow webm on target component * Reduce mosaic effect for frame processors * clear static faces on trim frame changes * Fix trim frame component * Downgrade openvino dependency * Prepare next release * Move get_short_path to filesystem, Add/Improve some testing * Prepare installer, Prevent infinite loop for sanitize_path_for_windows * Introduce execution device id * Introduce execution device id * Seems like device id can be a string * Seems like device id can be a string * Make Intel Arc work with OpenVINOExecution * Use latest Git * Update wording * Fix create_float_range * Update preview * Fix Git link
This commit is contained in:
@@ -12,5 +12,4 @@ def test_create_int_range() -> None:
|
||||
|
||||
def test_create_float_range() -> None:
|
||||
assert create_float_range(0.0, 1.0, 0.5) == [ 0.0, 0.5, 1.0 ]
|
||||
assert create_float_range(0.0, 0.2, 0.05) == [ 0.0, 0.05, 0.10, 0.15, 0.20 ]
|
||||
|
||||
assert create_float_range(0.0, 1.0, 0.05) == [ 0.0, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.0 ]
|
||||
|
||||
@@ -15,7 +15,8 @@ def test_multiple_execution_providers() -> None:
|
||||
'CPUExecutionProvider',
|
||||
('CUDAExecutionProvider',
|
||||
{
|
||||
'device_id': '1',
|
||||
'cudnn_conv_algo_search': 'DEFAULT'
|
||||
})
|
||||
]
|
||||
assert apply_execution_provider_options([ 'CPUExecutionProvider', 'CUDAExecutionProvider' ]) == execution_provider_with_options
|
||||
assert apply_execution_provider_options('1', [ 'CPUExecutionProvider', 'CUDAExecutionProvider' ]) == execution_provider_with_options
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import shutil
|
||||
import pytest
|
||||
|
||||
from facefusion.common_helper import is_windows
|
||||
from facefusion.download import conditional_download
|
||||
from facefusion.filesystem import is_file, is_directory, is_audio, has_audio, is_image, has_image, is_video, filter_audio_paths, filter_image_paths, list_directory
|
||||
from facefusion.filesystem import get_file_size, is_file, is_directory, is_audio, has_audio, is_image, has_image, is_video, filter_audio_paths, filter_image_paths, list_directory, sanitize_path_for_windows
|
||||
|
||||
|
||||
@pytest.fixture(scope = 'module', autouse = True)
|
||||
@@ -12,6 +14,12 @@ def before_all() -> None:
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples/source.mp3',
|
||||
'https://github.com/facefusion/facefusion-assets/releases/download/examples/target-240p.mp4'
|
||||
])
|
||||
shutil.copyfile('.assets/examples/source.jpg', '.assets/examples/söurce.jpg')
|
||||
|
||||
|
||||
def test_get_file_size() -> None:
|
||||
assert get_file_size('.assets/examples/source.jpg') > 0
|
||||
assert get_file_size('invalid') == 0
|
||||
|
||||
|
||||
def test_is_file() -> None:
|
||||
@@ -74,3 +82,9 @@ def test_list_directory() -> None:
|
||||
assert list_directory('.assets/examples')
|
||||
assert list_directory('.assets/examples/source.jpg') is None
|
||||
assert list_directory('invalid') is None
|
||||
|
||||
|
||||
def test_sanitize_path_for_windows() -> None:
|
||||
if is_windows():
|
||||
assert sanitize_path_for_windows('.assets/examples/söurce.jpg') == 'ASSETS~1/examples/SURCE~1.JPG'
|
||||
assert sanitize_path_for_windows('invalid') is None
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import platform
|
||||
|
||||
from facefusion.common_helper import is_linux, is_macos
|
||||
from facefusion.memory import limit_system_memory
|
||||
|
||||
|
||||
def test_limit_system_memory() -> None:
|
||||
assert limit_system_memory(4) is True
|
||||
if platform.system().lower() == 'darwin' or platform.system().lower() == 'linux':
|
||||
if is_linux() or is_macos():
|
||||
assert limit_system_memory(1024) is False
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import platform
|
||||
|
||||
from facefusion.common_helper import is_linux, is_macos
|
||||
from facefusion.normalizer import normalize_output_path, normalize_padding, normalize_fps
|
||||
|
||||
|
||||
def test_normalize_output_path() -> None:
|
||||
if platform.system().lower() == 'linux' or platform.system().lower() == 'darwin':
|
||||
if is_linux() or is_macos():
|
||||
assert normalize_output_path('.assets/examples/target-240p.mp4', '.assets/examples/target-240p.mp4') == '.assets/examples/target-240p.mp4'
|
||||
assert normalize_output_path('.assets/examples/target-240p.mp4', '.assets/examples').startswith('.assets/examples/target-240p')
|
||||
assert normalize_output_path('.assets/examples/target-240p.mp4', '.assets/examples').endswith('.mp4')
|
||||
|
||||
Reference in New Issue
Block a user