convert omega dict to dict

This commit is contained in:
志浩 2024-09-30 14:48:05 +08:00
parent 87ae7a485b
commit a62ef27d71
2 changed files with 5 additions and 1 deletions

View File

@ -1088,6 +1088,8 @@ class SenseVoiceQuantizedEncoderPitch(nn.Module):
def build_quantizer(self, vq_config):
if vq_config is None:
return None
from omegaconf import OmegaConf, DictConfig
vq_config = OmegaConf.to_container(vq_config)
name = vq_config.pop("name", "costume_quantizer")
if name == "costume_quantizer":
from funasr.models.sense_voice.quantizer.costume_quantizer import CostumeQuantizer
@ -1236,6 +1238,8 @@ class SenseVoiceQuantizedEncoder(nn.Module):
def build_quantizer(self, vq_config):
if vq_config is None:
return None
from omegaconf import OmegaConf, DictConfig
vq_config = OmegaConf.to_container(vq_config)
name = vq_config.pop("name", "costume_quantizer")
if name == "costume_quantizer":
from funasr.models.sense_voice.quantizer.costume_quantizer import CostumeQuantizer

View File

@ -2027,7 +2027,7 @@ class SenseVoiceLPitch(nn.Module):
if self.activation_checkpoint:
from torch.utils.checkpoint import checkpoint
encoder_out, encoder_out_lens = checkpoint(
encoder_out, encoder_f0_out, encoder_out_lens = checkpoint(
self.encode, speech, speech_lengths, use_reentrant=False
)
else: