mirror of
https://github.com/facefusion/facefusion.git
synced 2026-07-24 11:00:59 +02:00
a2cbfd73b1
* mark as next, introduce dynamic scale for face debugger * use latest onnxruntime * update within Gradio 5 * Remove system memory limit (#986) * remove system memory limit from ui * remove system memory limit from args.py * flatten the face store * prevent countless importlib.import_module calls * remove --onnxruntime from install.py * remove --onnxruntime from install.py * resolve static inference providers to fix macos (#1127) * resolve static inference providers to fix macos * fix lint * restore old behaviour * restore old behaviour * handle ghost and uniface as well * adjust condition for ghost and uniface * fix Gradio gallery styles * remove face store (#1132) * fix dataflow in streamer * Face selector auto mode (#1137) * introduce face selector auto mode * introduce face selector auto mode * introduce face selector auto mode * correct way is to pass source_vision_frames * make the world a better place * fix dataflow in faceswapper, no read of files withing inner methods (#1148) * fix dataflow in faceswapper, no read of files withing inner methods * fix lint * adjust code more * adjust code more * bring back the face store but for source and reference only (#1149) * bring back the face store but for source and reference only * fix ci * minor improvement * guard for tobytes() * drop condition in select_faces() * Replace CONFIG_PARSER global with @lru_cache (#1147) * remove global config_parser * fix import order * remove lambda * remove unused block * optimize app context detection * decouple common modules from core (#1152) * decouple common modules from core * remove that nonsense * remove that nonsense * minor adjustment to workflows * Tag HEVC output as hvc1 and move moov atom to the front (#1153) * Tag HEVC output as hvc1 and move moov atom to the front ffmpeg defaults HEVC in MP4 to the 'hev1' sample entry and leaves the moov atom at the tail. Apple players (QuickTime, Finder QuickLook) refuse to decode 'hev1' and stall reading a tail-placed moov on large files, so hevc_nvenc / libx265 renders cannot be previewed on macOS. - add ffmpeg_builder.set_video_tag(): emit `-tag:v hvc1` for every HEVC encoder (libx265, hevc_nvenc, hevc_amf, hevc_qsv, hevc_videotoolbox). Applied in merge_video where the encoder is known; `-c:v copy` in the audio mux / concat steps preserves the tag. - add ffmpeg_builder.set_faststart(): emit `-movflags +faststart`, applied in restore_audio / replace_audio / concat_video which write the final output. H.264 and other codecs are left untouched. Verified on a real hevc_nvenc render: hev1 hung QuickLook (no thumbnail); after the patch the file is hvc1 with a front-placed moov and QuickLook generates a thumbnail. * Restrict hvc1 tag and faststart to quicktime containers Gate set_video_tag / set_faststart on the output container format (m4v, mov, mp4) via get_file_format(), so non-quicktime muxers no longer receive -tag:v hvc1 / -movflags +faststart. Trim test_set_video_tag to a single positive and negative assertion. Addresses review on #1153. * Move hvc1 tag and faststart gates into ffmpeg_builder Rename set_video_tag / set_faststart to conditional_* and push the container-format gate (m4v, mov, mp4) inside the builders, keeping ffmpeg.py free of inline conditionals. Matches the set_image_quality pattern. Addresses review on #1153. * post cleanup after merge * Pack target frames (#1158) * pack target frames * add todos * add todos, resolve todos * resolve todos * change names * revert to single target frame for select faces * fix lint * return empty frame * get() have no default * Fix trim (#1162) * fix trim * fix trim * rename ffmpeg builder method * rename to temp_frame_set and temp_frame_pattern --------- Co-authored-by: harisreedhar <h4harisreedhar.s.s@gmail.com> Co-authored-by: Harisreedhar <46858047+harisreedhar@users.noreply.github.com> * Implement face tracker (#1163) * add face tracker * change get_nearest_track_face -> get_nearest_track_index * create face_creator.py and move methods around * add type FaceTrack * naming * remove iou test, don't belong there * fix spaces * rename to interpolate_points * rename to find_best_face_track * just track_faces * cleanp * previous next naming * remove >= and >= * rename * remove helper from test and use face from source.jpg * make get_anchor_indices more readable * track_faces() call before and is forwarded to select_faces * change to interpolate_faces * rename methods * rename methods * rename variables * remove dtype * move face_anlyser -> face_creator * claenup face_creator.py * move tests to dedicated test face detector * move tracking inside select_faces * simplify face_tracker (#1165) * minor renaming * improve face_tracker test (#1166) * improve face_tracker test * cleanup * Add target frame amount (#1167) * introduce --target-frame-amount * add ui * make track_faces conditional * update choices.py * fix [] * rename component file to frame_process.py * fix track preview (#1168) * introduce face origin (#1169) * add guard to prevent failure * show and hide voice extractor according to lip syncer * rename average_face_coordinates to average_face_geometry * use static faces for select_faces() * face store with lock (#1171) * face store with lock * face store with lock * remove refill color from bbox * adjust tests and handle frame_position proper way * enforce similar naming * introduce face tracker score * introduce face tracker score * fix/audio-trim-alignment (#1173) * fix audio offset * fix audio offset * remove reference_frame_number check --------- Co-authored-by: harisreedhar <h4harisreedhar.s.s@gmail.com> * reduce face tracker score from 0 to 0.5 * mark as 3.7.0 * make face tracker stateless --------- Co-authored-by: Harisreedhar <46858047+harisreedhar@users.noreply.github.com> Co-authored-by: kazuki nakai <kazuki.nakai@agiletec.net> Co-authored-by: harisreedhar <h4harisreedhar.s.s@gmail.com>
276 lines
15 KiB
Python
276 lines
15 KiB
Python
from facefusion.types import Locales
|
|
|
|
LOCALES : Locales =\
|
|
{
|
|
'en':
|
|
{
|
|
'conda_not_activated': 'conda is not activated',
|
|
'python_not_supported': 'python version is not supported, upgrade to {version} or higher',
|
|
'curl_not_installed': 'curl is not installed',
|
|
'ffmpeg_not_installed': 'ffmpeg is not installed',
|
|
'creating_temp': 'creating temporary resources',
|
|
'extracting_frames': 'extracting frames with a resolution of {resolution} and {fps} frames per second',
|
|
'extracting_frames_succeeded': 'extracting frames succeeded',
|
|
'extracting_frames_failed': 'extracting frames failed',
|
|
'analysing': 'analysing',
|
|
'extracting': 'extracting',
|
|
'streaming': 'streaming',
|
|
'processing': 'processing',
|
|
'merging': 'merging',
|
|
'downloading': 'downloading',
|
|
'temp_frames_not_found': 'temporary frames not found',
|
|
'copying_image': 'copying image with a resolution of {resolution}',
|
|
'copying_image_succeeded': 'copying image succeeded',
|
|
'copying_image_failed': 'copying image failed',
|
|
'finalizing_image': 'finalizing image with a resolution of {resolution}',
|
|
'finalizing_image_succeeded': 'finalizing image succeeded',
|
|
'finalizing_image_skipped': 'finalizing image skipped',
|
|
'merging_video': 'merging video with a resolution of {resolution} and {fps} frames per second',
|
|
'merging_video_succeeded': 'merging video succeeded',
|
|
'merging_video_failed': 'merging video failed',
|
|
'skipping_audio': 'skipping audio',
|
|
'replacing_audio_succeeded': 'replacing audio succeeded',
|
|
'replacing_audio_skipped': 'replacing audio skipped',
|
|
'restoring_audio_succeeded': 'restoring audio succeeded',
|
|
'restoring_audio_skipped': 'restoring audio skipped',
|
|
'clearing_temp': 'clearing temporary resources',
|
|
'processing_stopped': 'processing stopped',
|
|
'processing_image_succeeded': 'processing to image succeeded in {seconds} seconds',
|
|
'processing_image_failed': 'processing to image failed',
|
|
'processing_video_succeeded': 'processing to video succeeded in {seconds} seconds',
|
|
'processing_video_failed': 'processing to video failed',
|
|
'choose_image_source': 'choose an image for the source',
|
|
'choose_audio_source': 'choose an audio for the source',
|
|
'choose_video_target': 'choose a video for the target',
|
|
'choose_image_or_video_target': 'choose an image or video for the target',
|
|
'specify_image_or_video_output': 'specify the output image or video within a directory',
|
|
'match_target_and_output_extension': 'match the target and output extension',
|
|
'no_source_face_detected': 'no source face detected',
|
|
'processor_not_loaded': 'processor {processor} could not be loaded',
|
|
'processor_not_implemented': 'processor {processor} not implemented correctly',
|
|
'ui_layout_not_loaded': 'ui layout {ui_layout} could not be loaded',
|
|
'ui_layout_not_implemented': 'ui layout {ui_layout} not implemented correctly',
|
|
'stream_not_loaded': 'stream {stream_mode} could not be loaded',
|
|
'stream_not_supported': 'stream not supported',
|
|
'job_created': 'job {job_id} created',
|
|
'job_not_created': 'job {job_id} not created',
|
|
'job_submitted': 'job {job_id} submitted',
|
|
'job_not_submitted': 'job {job_id} not submitted',
|
|
'job_all_submitted': 'jobs submitted',
|
|
'job_all_not_submitted': 'jobs not submitted',
|
|
'job_deleted': 'job {job_id} deleted',
|
|
'job_not_deleted': 'job {job_id} not deleted',
|
|
'job_all_deleted': 'jobs deleted',
|
|
'job_all_not_deleted': 'jobs not deleted',
|
|
'job_step_added': 'step added to job {job_id}',
|
|
'job_step_not_added': 'step not added to job {job_id}',
|
|
'job_remix_step_added': 'step {step_index} remixed from job {job_id}',
|
|
'job_remix_step_not_added': 'step {step_index} not remixed from job {job_id}',
|
|
'job_step_inserted': 'step {step_index} inserted to job {job_id}',
|
|
'job_step_not_inserted': 'step {step_index} not inserted to job {job_id}',
|
|
'job_step_removed': 'step {step_index} removed from job {job_id}',
|
|
'job_step_not_removed': 'step {step_index} not removed from job {job_id}',
|
|
'running_job': 'running queued job {job_id}',
|
|
'running_jobs': 'running all queued jobs',
|
|
'retrying_job': 'retrying failed job {job_id}',
|
|
'retrying_jobs': 'retrying all failed jobs',
|
|
'processing_job_succeeded': 'processing of job {job_id} succeeded',
|
|
'processing_jobs_succeeded': 'processing of all jobs succeeded',
|
|
'processing_job_failed': 'processing of job {job_id} failed',
|
|
'processing_jobs_failed': 'processing of all jobs failed',
|
|
'processing_step': 'processing step {step_current} of {step_total}',
|
|
'validating_hash_succeeded': 'validating hash for {hash_file_name} succeeded',
|
|
'validating_hash_failed': 'validating hash for {hash_file_name} failed',
|
|
'validating_source_succeeded': 'validating source for {source_file_name} succeeded',
|
|
'validating_source_failed': 'validating source for {source_file_name} failed',
|
|
'deleting_corrupt_source': 'deleting corrupt source for {source_file_name}',
|
|
'loading_model_succeeded': 'loading model {model_name} succeeded in {seconds} seconds',
|
|
'loading_model_failed': 'loading model {model_name} failed',
|
|
'time_ago_now': 'just now',
|
|
'time_ago_minutes': '{minutes} minutes ago',
|
|
'time_ago_hours': '{hours} hours and {minutes} minutes ago',
|
|
'time_ago_days': '{days} days, {hours} hours and {minutes} minutes ago',
|
|
'point': '.',
|
|
'comma': ',',
|
|
'colon': ':',
|
|
'question_mark': '?',
|
|
'exclamation_mark': '!',
|
|
'help':
|
|
{
|
|
'install_dependency': 'choose the variant of {dependency} to install',
|
|
'skip_conda': 'skip the conda environment check',
|
|
'config_path': 'choose the config file to override defaults',
|
|
'temp_path': 'specify the directory for the temporary resources',
|
|
'jobs_path': 'specify the directory to store jobs',
|
|
'source_paths': 'choose the image or audio paths',
|
|
'target_path': 'choose the image or video path',
|
|
'output_path': 'specify the image or video within a directory',
|
|
'source_pattern': 'choose the image or audio pattern',
|
|
'target_pattern': 'choose the image or video pattern',
|
|
'output_pattern': 'specify the image or video pattern',
|
|
'face_detector_model': 'choose the model responsible for detecting the faces',
|
|
'face_detector_size': 'specify the frame size provided to the face detector',
|
|
'face_detector_margin': 'apply top, right, bottom and left margin to the frame',
|
|
'face_detector_angles': 'specify the angles to rotate the frame before detecting faces',
|
|
'face_detector_score': 'filter the detected faces based on the confidence score',
|
|
'face_landmarker_model': 'choose the model responsible for detecting the face landmarks',
|
|
'face_landmarker_score': 'filter the detected face landmarks based on the confidence score',
|
|
'face_selector_mode': 'use reference based tracking or simple matching',
|
|
'face_selector_order': 'specify the order of the detected faces',
|
|
'face_selector_age_start': 'filter the detected faces based on the starting age',
|
|
'face_selector_age_end': 'filter the detected faces based on the ending age',
|
|
'face_selector_gender': 'filter the detected faces based on their gender',
|
|
'face_selector_race': 'filter the detected faces based on their race',
|
|
'reference_face_position': 'specify the position used to create the reference face',
|
|
'reference_face_distance': 'specify the similarity between the reference face and target face',
|
|
'reference_frame_number': 'specify the frame used to create the reference face',
|
|
'face_tracker_score': 'specify the minimum score to track a face',
|
|
'face_occluder_model': 'choose the model responsible for the occlusion mask',
|
|
'face_parser_model': 'choose the model responsible for the region mask',
|
|
'face_mask_types': 'mix and match different face mask types (choices: {choices})',
|
|
'face_mask_areas': 'choose the items used for the area mask (choices: {choices})',
|
|
'face_mask_regions': 'choose the items used for the region mask (choices: {choices})',
|
|
'face_mask_blur': 'specify the degree of blur applied to the box mask',
|
|
'face_mask_padding': 'apply top, right, bottom and left padding to the box mask',
|
|
'voice_extractor_model': 'choose the model responsible for extracting the voices',
|
|
'trim_frame_start': 'specify the starting frame of the target video',
|
|
'trim_frame_end': 'specify the ending frame of the target video',
|
|
'temp_frame_format': 'specify the temporary resources format',
|
|
'keep_temp': 'keep the temporary resources after processing',
|
|
'target_frame_amount': 'specify the amount of frames around the target frame',
|
|
'output_image_quality': 'specify the image quality which translates to the image compression',
|
|
'output_image_scale': 'specify the image scale based on the target image',
|
|
'output_audio_encoder': 'specify the encoder used for the audio',
|
|
'output_audio_quality': 'specify the audio quality which translates to the audio compression',
|
|
'output_audio_volume': 'specify the audio volume based on the target video',
|
|
'output_video_encoder': 'specify the encoder used for the video',
|
|
'output_video_preset': 'balance fast video processing and video file size',
|
|
'output_video_quality': 'specify the video quality which translates to the video compression',
|
|
'output_video_scale': 'specify the video scale based on the target video',
|
|
'output_video_fps': 'specify the video fps based on the target video',
|
|
'processors': 'load a single or multiple processors (choices: {choices}, ...)',
|
|
'background-remover-model': 'choose the model responsible for removing the background',
|
|
'background-remover-color': 'apply red, green blue and alpha values of the background',
|
|
'open_browser': 'open the browser once the program is ready',
|
|
'ui_layouts': 'launch a single or multiple UI layouts (choices: {choices}, ...)',
|
|
'ui_workflow': 'choose the ui workflow',
|
|
'download_providers': 'download using different providers (choices: {choices}, ...)',
|
|
'download_scope': 'specify the download scope',
|
|
'benchmark_mode': 'choose the benchmark mode',
|
|
'benchmark_resolutions': 'choose the resolutions for the benchmarks (choices: {choices}, ...)',
|
|
'benchmark_cycle_count': 'specify the amount of cycles per benchmark',
|
|
'execution_device_ids': 'specify the devices used for processing',
|
|
'execution_providers': 'inference using different providers (choices: {choices}, ...)',
|
|
'execution_thread_count': 'specify the amount of parallel threads while processing',
|
|
'video_memory_strategy': 'balance fast processing and low VRAM usage',
|
|
'log_level': 'adjust the message severity displayed in the terminal',
|
|
'halt_on_error': 'halt the program once an error occurred',
|
|
'run': 'run the program',
|
|
'headless_run': 'run the program in headless mode',
|
|
'batch_run': 'run the program in batch mode',
|
|
'force_download': 'force automate downloads and exit',
|
|
'benchmark': 'benchmark the program',
|
|
'job_id': 'specify the job id',
|
|
'job_status': 'specify the job status',
|
|
'step_index': 'specify the step index',
|
|
'job_list': 'list jobs by status',
|
|
'job_create': 'create a drafted job',
|
|
'job_submit': 'submit a drafted job to become a queued job',
|
|
'job_submit_all': 'submit all drafted jobs to become a queued jobs',
|
|
'job_delete': 'delete a drafted, queued, failed or completed job',
|
|
'job_delete_all': 'delete all drafted, queued, failed and completed jobs',
|
|
'job_add_step': 'add a step to a drafted job',
|
|
'job_remix_step': 'remix a previous step from a drafted job',
|
|
'job_insert_step': 'insert a step to a drafted job',
|
|
'job_remove_step': 'remove a step from a drafted job',
|
|
'job_run': 'run a queued job',
|
|
'job_run_all': 'run all queued jobs',
|
|
'job_retry': 'retry a failed job',
|
|
'job_retry_all': 'retry all failed jobs'
|
|
},
|
|
'about':
|
|
{
|
|
'fund': 'fund ai workstation',
|
|
'subscribe': 'become a member',
|
|
'join': 'join our community'
|
|
},
|
|
'uis':
|
|
{
|
|
'apply_button': 'APPLY',
|
|
'benchmark_mode_dropdown': 'BENCHMARK MODE',
|
|
'benchmark_cycle_count_slider': 'BENCHMARK CYCLE COUNT',
|
|
'benchmark_resolutions_checkbox_group': 'BENCHMARK RESOLUTIONS',
|
|
'clear_button': 'CLEAR',
|
|
'common_options_checkbox_group': 'OPTIONS',
|
|
'download_providers_checkbox_group': 'DOWNLOAD PROVIDERS',
|
|
'execution_providers_checkbox_group': 'EXECUTION PROVIDERS',
|
|
'execution_thread_count_slider': 'EXECUTION THREAD COUNT',
|
|
'face_detector_angles_checkbox_group': 'FACE DETECTOR ANGLES',
|
|
'face_detector_model_dropdown': 'FACE DETECTOR MODEL',
|
|
'face_detector_margin_slider': 'FACE DETECTOR MARGIN',
|
|
'face_detector_score_slider': 'FACE DETECTOR SCORE',
|
|
'face_detector_size_dropdown': 'FACE DETECTOR SIZE',
|
|
'face_landmarker_model_dropdown': 'FACE LANDMARKER MODEL',
|
|
'face_landmarker_score_slider': 'FACE LANDMARKER SCORE',
|
|
'face_mask_blur_slider': 'FACE MASK BLUR',
|
|
'face_mask_padding_bottom_slider': 'FACE MASK PADDING BOTTOM',
|
|
'face_mask_padding_left_slider': 'FACE MASK PADDING LEFT',
|
|
'face_mask_padding_right_slider': 'FACE MASK PADDING RIGHT',
|
|
'face_mask_padding_top_slider': 'FACE MASK PADDING TOP',
|
|
'face_mask_areas_checkbox_group': 'FACE MASK AREAS',
|
|
'face_mask_regions_checkbox_group': 'FACE MASK REGIONS',
|
|
'face_mask_types_checkbox_group': 'FACE MASK TYPES',
|
|
'face_selector_age_range_slider': 'FACE SELECTOR AGE',
|
|
'face_selector_gender_dropdown': 'FACE SELECTOR GENDER',
|
|
'face_selector_mode_dropdown': 'FACE SELECTOR MODE',
|
|
'face_selector_order_dropdown': 'FACE SELECTOR ORDER',
|
|
'face_selector_race_dropdown': 'FACE SELECTOR RACE',
|
|
'face_tracker_score_slider': 'FACE TRACKER SCORE',
|
|
'face_occluder_model_dropdown': 'FACE OCCLUDER MODEL',
|
|
'face_parser_model_dropdown': 'FACE PARSER MODEL',
|
|
'voice_extractor_model_dropdown': 'VOICE EXTRACTOR MODEL',
|
|
'job_list_status_checkbox_group': 'JOB STATUS',
|
|
'job_manager_job_action_dropdown': 'JOB_ACTION',
|
|
'job_manager_job_id_dropdown': 'JOB ID',
|
|
'job_manager_step_index_dropdown': 'STEP INDEX',
|
|
'job_runner_job_action_dropdown': 'JOB ACTION',
|
|
'job_runner_job_id_dropdown': 'JOB ID',
|
|
'log_level_dropdown': 'LOG LEVEL',
|
|
'output_audio_encoder_dropdown': 'OUTPUT AUDIO ENCODER',
|
|
'output_audio_quality_slider': 'OUTPUT AUDIO QUALITY',
|
|
'output_audio_volume_slider': 'OUTPUT AUDIO VOLUME',
|
|
'output_image_or_video': 'OUTPUT',
|
|
'output_image_quality_slider': 'OUTPUT IMAGE QUALITY',
|
|
'output_image_scale_slider': 'OUTPUT IMAGE SCALE',
|
|
'output_path_textbox': 'OUTPUT PATH',
|
|
'output_video_encoder_dropdown': 'OUTPUT VIDEO ENCODER',
|
|
'output_video_fps_slider': 'OUTPUT VIDEO FPS',
|
|
'output_video_preset_dropdown': 'OUTPUT VIDEO PRESET',
|
|
'output_video_quality_slider': 'OUTPUT VIDEO QUALITY',
|
|
'output_video_scale_slider': 'OUTPUT VIDEO SCALE',
|
|
'preview_frame_slider': 'PREVIEW FRAME',
|
|
'preview_image': 'PREVIEW',
|
|
'preview_mode_dropdown': 'PREVIEW MODE',
|
|
'preview_resolution_dropdown': 'PREVIEW RESOLUTION',
|
|
'processors_checkbox_group': 'PROCESSORS',
|
|
'reference_face_distance_slider': 'REFERENCE FACE DISTANCE',
|
|
'reference_face_gallery': 'REFERENCE FACE',
|
|
'refresh_button': 'REFRESH',
|
|
'source_file': 'SOURCE',
|
|
'start_button': 'START',
|
|
'stop_button': 'STOP',
|
|
'target_file': 'TARGET',
|
|
'temp_frame_format_dropdown': 'TEMP FRAME FORMAT',
|
|
'terminal_textbox': 'TERMINAL',
|
|
'trim_frame_slider': 'TRIM FRAME',
|
|
'ui_workflow': 'UI WORKFLOW',
|
|
'video_memory_strategy_dropdown': 'VIDEO MEMORY STRATEGY',
|
|
'webcam_fps_slider': 'WEBCAM FPS',
|
|
'webcam_image': 'WEBCAM',
|
|
'webcam_device_id_dropdown': 'WEBCAM DEVICE ID',
|
|
'webcam_mode_radio': 'WEBCAM MODE',
|
|
'webcam_resolution_dropdown': 'WEBCAM RESOLUTION'
|
|
}
|
|
}
|
|
}
|