Next (#318)
* renaming and restructuring (#282) * Renaming and restructuring * Renaming and restructuring * Renaming and restructuring * Fix gender detection * Implement distance to face debugger * Implement distance to face debugger part2 * Implement distance to face debugger part3 * Mark as next * Fix reference when face_debugger comes first * Use official onnxruntime nightly * CUDA on steroids * CUDA on steroids * Add some testing * Set inswapper_128_fp16 as default * Feat/block until post check (#292) * Block until download is done * Introduce post_check() * Fix webcam * Update dependencies * Add --force-reinstall to installer * Introduce config ini (#298) * Introduce config ini * Fix output video encoder * Revert help listings back to commas, Move SSL hack to download.py * Introduce output-video-preset which defaults to veryfast * Mapping for nvenc encoders * Rework on events and non-blocking UI * Add fast bmp to temp_frame_formats * Add fast bmp to temp_frame_formats * Show total processing time on success * Show total processing time on success * Show total processing time on success * Move are_images, is_image and is_video back to filesystem * Fix some spacings * Pissing everyone of by renaming stuff * Fix seconds output * feat/video output fps (#312) * added output fps slider, removed 'keep fps' option (#311) * added output fps slider, removed 'keep fps' option * now uses passed fps instead of global fps for ffmpeg * fps values are now floats instead of ints * fix previous commit * removed default value from fps slider this is so we can implement a dynamic default value later * Fix seconds output * Some cleanup --------- Co-authored-by: Ran Shaashua <47498956+ranshaa05@users.noreply.github.com> * Allow 0.01 steps for fps * Make fps unregulated * Make fps unregulated * Remove distance from face debugger again (does not work) * Fix gender age * Fix gender age * Hotfix benchmark suite * Warp face normalize (#313) * use normalized kp templates * Update face_helper.py * My 50 cents to warp_face() --------- Co-authored-by: Harisreedhar <46858047+harisreedhar@users.noreply.github.com> * face-swapper-weight (#315) * Move prepare_crop_frame and normalize_crop_frame out of apply_swap * Fix UI bug with different range * feat/output video resolution (#316) * Introduce detect_video_resolution, Rename detect_fps to detect_video_fps * Add calc_video_resolution_range * Make output resolution work, does not auto-select yet * Make output resolution work, does not auto-select yet * Try to keep the origin resolution * Split code into more fragments * Add pack/unpack resolution * Move video_template_sizes to choices * Improve create_video_resolutions * Reword benchmark suite * Optimal speed for benchmark * Introduce different video memory strategies, rename max_memory to max… (#317) * Introduce different video memory strategies, rename max_memory to max_system_memory * Update readme * Fix limit_system_memory call * Apply video_memory_strategy to face debugger * Limit face swapper weight to 3.0 * Remove face swapper weight due bad render outputs * Show/dide logic for output video preset * fix uint8 conversion * Fix whitespace * Finalize layout and update preview * Fix multi renders on face debugger * Restore less restrictive rendering of preview and stream * Fix block mode for model downloads * Add testing * Cosmetic changes * Enforce valid fps and resolution via CLI * Empty config * Cosmetics on args processing * Memory workover (#319) * Cosmetics on args processing * Fix for MacOS * Rename all max_ to _limit * More fixes * Update preview * Fix whitespace --------- Co-authored-by: Ran Shaashua <47498956+ranshaa05@users.noreply.github.com> Co-authored-by: Harisreedhar <46858047+harisreedhar@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from typing import List
|
||||
|
||||
from facefusion.typing import FaceSelectorMode, FaceAnalyserOrder, FaceAnalyserAge, FaceAnalyserGender, FaceMaskType, FaceMaskRegion, TempFrameFormat, OutputVideoEncoder
|
||||
from facefusion.common_helper import create_range
|
||||
from facefusion.typing import VideoMemoryStrategy, FaceSelectorMode, FaceAnalyserOrder, FaceAnalyserAge, FaceAnalyserGender, FaceMaskType, FaceMaskRegion, TempFrameFormat, OutputVideoEncoder, OutputVideoPreset
|
||||
from facefusion.common_helper import create_int_range, create_float_range
|
||||
|
||||
video_memory_strategies : List[VideoMemoryStrategy] = [ 'strict', 'moderate', 'tolerant' ]
|
||||
face_analyser_orders : List[FaceAnalyserOrder] = [ 'left-right', 'right-left', 'top-bottom', 'bottom-top', 'small-large', 'large-small', 'best-worst', 'worst-best' ]
|
||||
face_analyser_ages : List[FaceAnalyserAge] = [ 'child', 'teen', 'adult', 'senior' ]
|
||||
face_analyser_genders : List[FaceAnalyserGender] = [ 'male', 'female' ]
|
||||
@@ -11,16 +12,19 @@ face_detector_sizes : List[str] = [ '160x160', '320x320', '480x480', '512x512',
|
||||
face_selector_modes : List[FaceSelectorMode] = [ 'reference', 'one', 'many' ]
|
||||
face_mask_types : List[FaceMaskType] = [ 'box', 'occlusion', 'region' ]
|
||||
face_mask_regions : List[FaceMaskRegion] = [ 'skin', 'left-eyebrow', 'right-eyebrow', 'left-eye', 'right-eye', 'eye-glasses', 'nose', 'mouth', 'upper-lip', 'lower-lip' ]
|
||||
temp_frame_formats : List[TempFrameFormat] = [ 'jpg', 'png' ]
|
||||
temp_frame_formats : List[TempFrameFormat] = [ 'jpg', 'png', 'bmp' ]
|
||||
output_video_encoders : List[OutputVideoEncoder] = [ 'libx264', 'libx265', 'libvpx-vp9', 'h264_nvenc', 'hevc_nvenc' ]
|
||||
output_video_presets : List[OutputVideoPreset] = [ 'ultrafast', 'superfast', 'veryfast', 'faster', 'fast', 'medium', 'slow', 'slower', 'veryslow' ]
|
||||
|
||||
execution_thread_count_range : List[float] = create_range(1, 128, 1)
|
||||
execution_queue_count_range : List[float] = create_range(1, 32, 1)
|
||||
max_memory_range : List[float] = create_range(0, 128, 1)
|
||||
face_detector_score_range : List[float] = create_range(0.0, 1.0, 0.05)
|
||||
face_mask_blur_range : List[float] = create_range(0.0, 1.0, 0.05)
|
||||
face_mask_padding_range : List[float] = create_range(0, 100, 1)
|
||||
reference_face_distance_range : List[float] = create_range(0.0, 1.5, 0.05)
|
||||
temp_frame_quality_range : List[float] = create_range(0, 100, 1)
|
||||
output_image_quality_range : List[float] = create_range(0, 100, 1)
|
||||
output_video_quality_range : List[float] = create_range(0, 100, 1)
|
||||
video_template_sizes : List[int] = [ 240, 360, 480, 540, 720, 1080, 1440, 2160 ]
|
||||
|
||||
execution_thread_count_range : List[int] = create_int_range(1, 128, 1)
|
||||
execution_queue_count_range : List[int] = create_int_range(1, 32, 1)
|
||||
system_memory_limit_range : List[int] = create_int_range(0, 128, 1)
|
||||
face_detector_score_range : List[float] = create_float_range(0.0, 1.0, 0.05)
|
||||
face_mask_blur_range : List[float] = create_float_range(0.0, 1.0, 0.05)
|
||||
face_mask_padding_range : List[int] = create_int_range(0, 100, 1)
|
||||
reference_face_distance_range : List[float] = create_float_range(0.0, 1.5, 0.05)
|
||||
temp_frame_quality_range : List[int] = create_int_range(0, 100, 1)
|
||||
output_image_quality_range : List[int] = create_int_range(0, 100, 1)
|
||||
output_video_quality_range : List[int] = create_int_range(0, 100, 1)
|
||||
|
||||
Reference in New Issue
Block a user