diff --git a/facefusion/download.py b/facefusion/download.py index 3b3988aa..c561be7f 100644 --- a/facefusion/download.py +++ b/facefusion/download.py @@ -47,9 +47,8 @@ def get_static_download_size(url : str) -> int: lines = reversed(process.stdout.readlines()) for line in lines: - line = line.decode().lower() - if 'content-length:' in line: - _, content_length = line.split('content-length:') + if 'content-length:' in line.decode().lower(): + _, content_length = line.decode().lower().split('content-length:') return int(content_length) return 0 diff --git a/facefusion/ffmpeg.py b/facefusion/ffmpeg.py index 9eb2ba0f..93941caf 100644 --- a/facefusion/ffmpeg.py +++ b/facefusion/ffmpeg.py @@ -25,9 +25,8 @@ def run_ffmpeg_with_progress(args: List[str], update_progress : UpdateProgress) lines = process.stdout.readlines() for line in lines: - line = line.decode().lower() - if 'frame=' in line: - _, frame_number = line.split('frame=') + if 'frame=' in line.decode().lower(): + _, frame_number = line.decode().lower().split('frame=') update_progress(int(frame_number)) if log_level == 'debug':