Industry leading face manipulation platform
Remove default values
henryruhs2d95e409cbd9
diff --git a/facefusion/audio.py b/facefusion/audio.pyindex 383e2251..bf5418af 100644--- a/facefusion/audio.py+++ b/facefusion/audio.py@@ -11,7 +11,7 @@ from facefusion.typing import Audio, AudioFrame, Fps, Mel, MelFilterBank, Spectrfrom facefusion.voice_extractor import batch_extract_voice-@lru_cache(maxsize = 128)+@lru_cache()def read_static_audio(audio_path : str, fps : Fps) -> Optional[List[AudioFrame]]:return read_audio(audio_path, fps)@@ -31,7 +31,7 @@ def read_audio(audio_path : str, fps : Fps) -> Optional[List[AudioFrame]]:return None-@lru_cache(maxsize = 128)+@lru_cache()def read_static_voice(audio_path : str, fps : Fps) -> Optional[List[AudioFrame]]:return read_voice(audio_path, fps)diff --git a/facefusion/hash_helper.py b/facefusion/hash_helper.pyindex f326ecfa..5259edb9 100644--- a/facefusion/hash_helper.py+++ b/facefusion/hash_helper.py@@ -13,7 +13,7 @@ def validate_hash(validate_path : str) -> bool:hash_path = get_hash_path(validate_path)if is_file(hash_path):- with open(hash_path, 'r') as hash_file:+ with open(hash_path) as hash_file:hash_content = hash_file.read().strip()with open(validate_path, 'rb') as validate_file:diff --git a/facefusion/json.py b/facefusion/json.pyindex dcb182c0..e1ba2ae4 100644--- a/facefusion/json.py+++ b/facefusion/json.py@@ -9,7 +9,7 @@ from facefusion.typing import Contentdef read_json(json_path : str) -> Optional[Content]:if is_file(json_path):try:- with open(json_path, 'r') as json_file:+ with open(json_path) as json_file:return json.load(json_file)except JSONDecodeError:passdiff --git a/facefusion/processors/pixel_boost.py b/facefusion/processors/pixel_boost.pyindex 13665c01..8282f359 100644--- a/facefusion/processors/pixel_boost.py+++ b/facefusion/processors/pixel_boost.py@@ -13,6 +13,6 @@ def implode_pixel_boost(crop_vision_frame : VisionFrame, pixel_boost_total : intdef explode_pixel_boost(temp_vision_frames : List[VisionFrame], pixel_boost_total : int, model_size : Size, pixel_boost_size : Size) -> VisionFrame:- crop_vision_frame = numpy.stack(temp_vision_frames, axis = 0).reshape(pixel_boost_total, pixel_boost_total, model_size[0], model_size[1], 3)+ crop_vision_frame = numpy.stack(temp_vision_frames).reshape(pixel_boost_total, pixel_boost_total, model_size[0], model_size[1], 3)crop_vision_frame = crop_vision_frame.transpose(2, 0, 3, 1, 4).reshape(pixel_boost_size[0], pixel_boost_size[1], 3)return crop_vision_framediff --git a/facefusion/program.py b/facefusion/program.pyindex 7e7a42c9..db85bb7e 100755--- a/facefusion/program.py+++ b/facefusion/program.py@@ -291,7 +291,7 @@ def create_program() -> ArgumentParser:sub_program.add_parser('job-run-all', help = wording.get('help.job_run_all'), parents = [ create_config_path_program(), create_temp_path_program(), create_jobs_path_program(), collect_job_program() ], formatter_class = create_help_formatter_large)sub_program.add_parser('job-retry', help = wording.get('help.job_retry'), parents = [ create_job_id_program(), create_config_path_program(), create_temp_path_program(), create_jobs_path_program(), collect_job_program() ], formatter_class = create_help_formatter_large)sub_program.add_parser('job-retry-all', help = wording.get('help.job_retry_all'), parents = [ create_config_path_program(), create_temp_path_program(), create_jobs_path_program(), collect_job_program() ], formatter_class = create_help_formatter_large)- return ArgumentParser(parents = [ program ], formatter_class = create_help_formatter_small, add_help = True)+ return ArgumentParser(parents = [ program ], formatter_class = create_help_formatter_small)def apply_config_path(program : ArgumentParser) -> None:diff --git a/facefusion/uis/core.py b/facefusion/uis/core.pyindex 806f004a..a7a5469c 100644--- a/facefusion/uis/core.py+++ b/facefusion/uis/core.py@@ -194,4 +194,4 @@ def get_theme() -> gradio.Theme:def get_css() -> str:overrides_css_path = resolve_relative_path('uis/assets/overrides.css')- return open(overrides_css_path, 'r').read()+ return open(overrides_css_path).read()diff --git a/facefusion/vision.py b/facefusion/vision.pyindex 2ca36625..06773e32 100644--- a/facefusion/vision.py+++ b/facefusion/vision.py@@ -11,7 +11,7 @@ from facefusion.filesystem import get_file_extension, is_image, is_videofrom facefusion.typing import Duration, Fps, Orientation, Resolution, VisionFrame-@lru_cache(maxsize = 128)+@lru_cache()def read_static_image(image_path : str) -> Optional[VisionFrame]:return read_image(image_path)