Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next #766

Merged
merged 11 commits into from
Jul 25, 2023
Next Next commit
Check frames before processing
  • Loading branch information
henryruhs committed Jul 23, 2023
commit d1753538db7d8268fcee7e878f1c5ef0722ba302
15 changes: 10 additions & 5 deletions roop/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def start() -> None:
# process image to videos
if predict_video(roop.globals.target_path):
destroy()
update_status('Creating temp resources...')
update_status('Creating temporary resources...')
create_temp(roop.globals.target_path)
# extract frames
if roop.globals.keep_fps:
Expand All @@ -163,10 +163,14 @@ def start() -> None:
extract_frames(roop.globals.target_path)
# process frame
temp_frame_paths = get_temp_frame_paths(roop.globals.target_path)
for frame_processor in get_frame_processors_modules(roop.globals.frame_processors):
update_status('Progressing...', frame_processor.NAME)
frame_processor.process_video(roop.globals.source_path, temp_frame_paths)
frame_processor.post_process()
if temp_frame_paths:
for frame_processor in get_frame_processors_modules(roop.globals.frame_processors):
update_status('Progressing...', frame_processor.NAME)
frame_processor.process_video(roop.globals.source_path, temp_frame_paths)
frame_processor.post_process()
else:
update_status('Frames not found...')
return
# create video
if roop.globals.keep_fps:
fps = detect_fps(roop.globals.target_path)
Expand All @@ -186,6 +190,7 @@ def start() -> None:
update_status('Restoring audio might cause issues as fps are not kept...')
restore_audio(roop.globals.target_path, roop.globals.output_path)
# clean temp
update_status('Cleaning temporary resources...')
clean_temp(roop.globals.target_path)
# validate video
if is_video(roop.globals.target_path):
Expand Down