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