mirror of
https://github.com/s0md3v/roop.git
synced 2025-12-06 18:08:29 +00:00
Fix preview (#499)
This commit is contained in:
parent
a2b26dc966
commit
d3f38c7524
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user