From b035f1a6e514367d0316c5e2d8ccc90c26887a0b Mon Sep 17 00:00:00 2001 From: harisreedhar Date: Mon, 24 Nov 2025 12:48:40 +0530 Subject: [PATCH] changes --- facefusion/workflows/image_to_image.py | 5 ++--- tests/test_ffmpeg.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/facefusion/workflows/image_to_image.py b/facefusion/workflows/image_to_image.py index 07b10818..6c88e5d9 100644 --- a/facefusion/workflows/image_to_image.py +++ b/facefusion/workflows/image_to_image.py @@ -57,13 +57,12 @@ def prepare_image() -> ErrorCode: def process_image() -> ErrorCode: - target_path = state_manager.get_item('target_path') temp_image_path = get_temp_file_path(state_manager.get_item('output_path')) - reference_vision_frame = read_static_image(target_path) + reference_vision_frame = read_static_image(state_manager.get_item('target_path')) source_vision_frames = read_static_images(state_manager.get_item('source_paths')) source_audio_frame = create_empty_audio_frame() source_voice_frame = create_empty_audio_frame() - target_vision_frame = read_static_image(target_path, 'rgba') + target_vision_frame = read_static_image(state_manager.get_item('target_path'), 'rgba') temp_vision_frame = target_vision_frame.copy() temp_vision_mask = extract_vision_mask(temp_vision_frame) diff --git a/tests/test_ffmpeg.py b/tests/test_ffmpeg.py index a867c5ea..91395d24 100644 --- a/tests/test_ffmpeg.py +++ b/tests/test_ffmpeg.py @@ -82,7 +82,7 @@ def test_extract_frames() -> None: ] for target_path, trim_frame_start, trim_frame_end, frame_total in test_set: - output_path = get_test_output_file(f'test-extract-frames-{trim_frame_start}-{trim_frame_end}.mp4') + output_path = get_test_output_file('test-extract-frames-{}-{}.mp4'.format(trim_frame_start, trim_frame_end)) create_temp_directory(output_path) assert extract_frames(target_path, output_path, (452, 240), 30.0, trim_frame_start, trim_frame_end) is True @@ -106,7 +106,7 @@ def test_merge_video() -> None: for target_path in target_paths: for output_video_encoder in output_video_encoders: - output_path = get_test_output_file(f'test-merge-video-{output_video_encoder}.mp4') + output_path = get_test_output_file('test-merge-video-{}.mp4'.format(output_video_encoder)) state_manager.init_item('output_path', target_path) state_manager.init_item('output_video_fps', 25.0) state_manager.init_item('output_video_encoder', output_video_encoder)