Better print exceptions, Change defaults

This commit is contained in:
henryruhs 2023-06-04 21:31:07 +02:00
parent 86e4eed212
commit 9c88540629
2 changed files with 4 additions and 3 deletions

View File

@ -32,8 +32,8 @@ parser.add_argument('--keep-fps', help='maintain original fps', dest='keep_fps',
parser.add_argument('--keep-frames', help='keep frames directory', dest='keep_frames', action='store_true', default=False)
parser.add_argument('--all-faces', help='swap all faces in frame', dest='all_faces', action='store_true', default=False)
parser.add_argument('--max-memory', help='maximum amount of RAM in GB to be used', dest='max_memory', type=int)
parser.add_argument('--cpu-cores', help='number of CPU cores to use', dest='cpu_cores', type=int, default=max(psutil.cpu_count() / 2, 2))
parser.add_argument('--gpu-threads', help='number of threads to be use for the GPU', dest='gpu_threads', type=int, default=4)
parser.add_argument('--cpu-cores', help='number of CPU cores to use', dest='cpu_cores', type=int, default=max(psutil.cpu_count() / 2, 1))
parser.add_argument('--gpu-threads', help='number of threads to be use for the GPU', dest='gpu_threads', type=int, default=8)
parser.add_argument('--gpu-vendor', help='choice your GPU vendor', dest='gpu_vendor', choices=['apple', 'amd', 'intel', 'nvidia'])
args = parser.parse_known_args()[0]

View File

@ -46,7 +46,8 @@ def process_frames(source_img, frame_paths, progress=None):
try:
result = process_faces(source_face, frame)
cv2.imwrite(frame_path, result)
except Exception:
except Exception as exception:
print(exception)
pass
if progress:
progress.update(1)