It needs 1 threads or cores of course
This commit is contained in:
parent
01ab68708d
commit
86e4eed212
@ -198,7 +198,7 @@ def start(preview_callback = None):
|
|||||||
key=lambda x: int(x.split(sep)[-1].replace(".png", ""))
|
key=lambda x: int(x.split(sep)[-1].replace(".png", ""))
|
||||||
))
|
))
|
||||||
status("swapping in progress...")
|
status("swapping in progress...")
|
||||||
if roop.globals.gpu_vendor is None and roop.globals.cpu_cores > 0:
|
if roop.globals.gpu_vendor is None and roop.globals.cpu_cores > 1:
|
||||||
global POOL
|
global POOL
|
||||||
POOL = mp.Pool(roop.globals.cpu_cores)
|
POOL = mp.Pool(roop.globals.cpu_cores)
|
||||||
process_video_multi_cores(args.source_img, args.frame_paths)
|
process_video_multi_cores(args.source_img, args.frame_paths)
|
||||||
|
@ -86,9 +86,10 @@ def process_img(source_img, target_path, output_file):
|
|||||||
|
|
||||||
|
|
||||||
def process_video(source_img, frame_paths):
|
def process_video(source_img, frame_paths):
|
||||||
|
do_multi = roop.globals.gpu_vendor is not None and roop.globals.gpu_threads > 1
|
||||||
progress_bar_format = '{l_bar}{bar}| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}{postfix}]'
|
progress_bar_format = '{l_bar}{bar}| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, {rate_fmt}{postfix}]'
|
||||||
with tqdm(total=len(frame_paths), desc="Processing", unit="frame", dynamic_ncols=True, bar_format=progress_bar_format) as progress:
|
with tqdm(total=len(frame_paths), desc="Processing", unit="frame", dynamic_ncols=True, bar_format=progress_bar_format) as progress:
|
||||||
if roop.globals.gpu_vendor is not None and roop.globals.gpu_threads > 0:
|
if do_multi:
|
||||||
multi_process_frame(source_img, frame_paths, progress)
|
multi_process_frame(source_img, frame_paths, progress)
|
||||||
else:
|
else:
|
||||||
process_frames(source_img, frame_paths, progress)
|
process_frames(source_img, frame_paths, progress)
|
||||||
|
Loading…
Reference in New Issue
Block a user