Skip to content

Commit

Permalink
Fix preview (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
K1llMan committed Jun 15, 2023
1 parent a2b26dc commit d3f38c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roop/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,11 @@ def init_preview() -> None:

def update_preview(frame_number: int = 0) -> None:
if roop.globals.source_path and roop.globals.target_path:
video_frame = None
video_frame = get_video_frame(roop.globals.target_path, frame_number)
for frame_processor in get_frame_processors_modules(roop.globals.frame_processors):
video_frame = frame_processor.process_frame(
get_one_face(cv2.imread(roop.globals.source_path)),
get_video_frame(roop.globals.target_path, frame_number)
video_frame
)
image = Image.fromarray(cv2.cvtColor(video_frame, cv2.COLOR_BGR2RGB))
image = ImageOps.contain(image, (PREVIEW_MAX_WIDTH, PREVIEW_MAX_HEIGHT), Image.LANCZOS)
Expand Down

0 comments on commit d3f38c7

Please sign in to comment.