Remove default values
This commit is contained in:
@@ -11,7 +11,7 @@ from facefusion.typing import Audio, AudioFrame, Fps, Mel, MelFilterBank, Spectr
|
||||
from 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)
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -9,7 +9,7 @@ from facefusion.typing import Content
|
||||
def 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:
|
||||
pass
|
||||
|
||||
@@ -13,6 +13,6 @@ def implode_pixel_boost(crop_vision_frame : VisionFrame, pixel_boost_total : int
|
||||
|
||||
|
||||
def 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_frame
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -11,7 +11,7 @@ from facefusion.filesystem import get_file_extension, is_image, is_video
|
||||
from 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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user