Jelajahi Sumber

Optimize path handling.

Lengyue 1 tahun lalu
induk
melakukan
ca2fd76d83
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      tools/vqgan/inference.py

+ 1 - 1
tools/vqgan/inference.py

@@ -69,7 +69,7 @@ def main(input_path, output_path, config_name, checkpoint_path, device):
         logger.info(f"Processing in-place reconstruction of {input_path}")
         logger.info(f"Processing in-place reconstruction of {input_path}")
 
 
         # Load audio
         # Load audio
-        audio, sr = torchaudio.load(input_path)
+        audio, sr = torchaudio.load(str(input_path))
         if audio.shape[0] > 1:
         if audio.shape[0] > 1:
             audio = audio.mean(0, keepdim=True)
             audio = audio.mean(0, keepdim=True)
         audio = torchaudio.functional.resample(audio, sr, model.sampling_rate)
         audio = torchaudio.functional.resample(audio, sr, model.sampling_rate)