Quellcode durchsuchen

Update alignment_extractor.py

follow the same logic with layer id - 1 as the official unit extraction script
Ilia Kulikov vor 1 Jahr
Ursprung
Commit
e5e334a4bc
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      src/seamless_communication/models/aligner/alignment_extractor.py

+ 1 - 1
src/seamless_communication/models/aligner/alignment_extractor.py

@@ -91,7 +91,7 @@ class AlignmentExtractor(nn.Module):
         assert isinstance(
             self.unit_extractor, UnitExtractor
         ), "Unit extractor is required to get units from audio tensor"
-        units = self.unit_extractor.predict(audio, self.unit_extractor_output_layer)
+        units = self.unit_extractor.predict(audio, self.unit_extractor_output_layer - 1)
         return units
 
     @torch.inference_mode()