Spaces:
Paused
Paused
Update app_parallel.py
Browse files- app_parallel.py +3 -2
app_parallel.py
CHANGED
@@ -29,7 +29,7 @@ from concurrent.futures import ProcessPoolExecutor, as_completed, ThreadPoolExec
|
|
29 |
|
30 |
# Initialize ProcessPoolExecutor for parallel processing
|
31 |
executor = ThreadPoolExecutor(max_workers=3)
|
32 |
-
|
33 |
|
34 |
class AnimationConfig:
|
35 |
def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path, image_hardcoded):
|
@@ -126,7 +126,8 @@ def process_chunk(audio_chunk, preprocessed_data, args):
|
|
126 |
# Further processing with animate_from_coeff using the coeff_path
|
127 |
animate_from_coeff = AnimateFromCoeff(free_view_checkpoint, mapping_checkpoint,
|
128 |
facerender_yaml_path, args.device)
|
129 |
-
|
|
|
130 |
data = get_facerender_data(coeff_path, crop_pic_path, first_coeff_path, audio_chunk,
|
131 |
args.batch_size, args.input_yaw, args.input_pitch, args.input_roll,
|
132 |
expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess)
|
|
|
29 |
|
30 |
# Initialize ProcessPoolExecutor for parallel processing
|
31 |
executor = ThreadPoolExecutor(max_workers=3)
|
32 |
+
torch.cuda.empty_cache()
|
33 |
|
34 |
class AnimationConfig:
|
35 |
def __init__(self, driven_audio_path, source_image_path, result_folder,pose_style,expression_scale,enhancer,still,preprocess,ref_pose_video_path, image_hardcoded):
|
|
|
126 |
# Further processing with animate_from_coeff using the coeff_path
|
127 |
animate_from_coeff = AnimateFromCoeff(free_view_checkpoint, mapping_checkpoint,
|
128 |
facerender_yaml_path, args.device)
|
129 |
+
|
130 |
+
torch.cuda.empty_cache()
|
131 |
data = get_facerender_data(coeff_path, crop_pic_path, first_coeff_path, audio_chunk,
|
132 |
args.batch_size, args.input_yaw, args.input_pitch, args.input_roll,
|
133 |
expression_scale=args.expression_scale, still_mode=args.still, preprocess=args.preprocess)
|