Skip to content

Commit

Permalink
fixed reloading cached vocal split audio
Browse files Browse the repository at this point in the history
  • Loading branch information
SayanoAI committed Dec 7, 2023
1 parent 46113f8 commit cae7219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/karafan/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def SEPARATE(self, audio_file, BATCH_MODE=False):
#*************************************************

self.BATCH_MODE = BATCH_MODE
self.song_output_path = os.path.join(self.output, "karafan")
self.song_output_path = os.path.join(self.output, name)


start_time = time.time()
Expand Down
4 changes: 2 additions & 2 deletions uvr5_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def split_audio(uvr_models,audio_path,preprocess_models=[],postprocess_models=[]
output_name = get_filename(i,os.path.basename(preprocess_model).split(".")[0],agg=agg) + f".{format}"
intermediary_file = os.path.join(cache_dir,"preprocessing",output_name)
if os.path.isfile(intermediary_file):
if i==len(preprocess_model)-1: #last model
input_audio = load_input_audio(intermediary_file, mono=True)
# if i==len(preprocess_model)-1: #last model
instrumental = input_audio = load_input_audio(intermediary_file, mono=True)
else:
args = (preprocess_model,audio_path,agg,device,False,CACHED_SONGS_DIR if i==0 else None,num_threads,format)
_, instrumental, input_audio = __run_inference_worker(args)
Expand Down

0 comments on commit cae7219

Please sign in to comment.