Spaces:
Runtime error
Runtime error
Update inference/style_transfer.py
Browse files
inference/style_transfer.py
CHANGED
@@ -78,9 +78,9 @@ class Mixing_Style_Transfer_Inference:
|
|
78 |
separate_file_names.append(args.reference_file_name_2interpolate)
|
79 |
for cur_idx, cur_inf_dir in enumerate(sorted(glob(f"{args.target_dir}*/"))):
|
80 |
for cur_file_name in separate_file_names:
|
81 |
-
cur_sep_file_path = os.path.join(cur_inf_dir, cur_file_name+'.
|
82 |
cur_sep_output_dir = os.path.join(cur_inf_dir, args.stem_level_directory_name)
|
83 |
-
if os.path.exists(os.path.join(cur_sep_output_dir, self.args.separation_model, cur_file_name, 'drums.
|
84 |
print(f'\talready separated current file : {cur_sep_file_path}')
|
85 |
else:
|
86 |
cur_cmd_line = f"demucs {cur_sep_file_path} -n {self.args.separation_model} -d {self.device} -o {cur_sep_output_dir}"
|
|
|
78 |
separate_file_names.append(args.reference_file_name_2interpolate)
|
79 |
for cur_idx, cur_inf_dir in enumerate(sorted(glob(f"{args.target_dir}*/"))):
|
80 |
for cur_file_name in separate_file_names:
|
81 |
+
cur_sep_file_path = os.path.join(cur_inf_dir, cur_file_name+'.wav')
|
82 |
cur_sep_output_dir = os.path.join(cur_inf_dir, args.stem_level_directory_name)
|
83 |
+
if os.path.exists(os.path.join(cur_sep_output_dir, self.args.separation_model, cur_file_name, 'drums.wav')):
|
84 |
print(f'\talready separated current file : {cur_sep_file_path}')
|
85 |
else:
|
86 |
cur_cmd_line = f"demucs {cur_sep_file_path} -n {self.args.separation_model} -d {self.device} -o {cur_sep_output_dir}"
|