Upload gpt_config.py
Browse files- gpt_config.py +2 -3
gpt_config.py
CHANGED
|
@@ -159,11 +159,10 @@ class XTTSGPTConfig(PretrainedConfig):
|
|
| 159 |
return config_dict
|
| 160 |
|
| 161 |
@classmethod
|
| 162 |
-
def from_dict(cls, config_dict):
|
| 163 |
"""Create config from dictionary"""
|
| 164 |
audio_config = XTTSAudioConfig(**config_dict.pop("audio_config", {}))
|
| 165 |
-
|
| 166 |
-
return cls(audio_config=audio_config, **config_dict)
|
| 167 |
|
| 168 |
def update_with_tokenizer(self, tokenizer=None):
|
| 169 |
"""Update configuration values based on tokenizer"""
|
|
|
|
| 159 |
return config_dict
|
| 160 |
|
| 161 |
@classmethod
|
| 162 |
+
def from_dict(cls, config_dict, *args, **kwargs):
|
| 163 |
"""Create config from dictionary"""
|
| 164 |
audio_config = XTTSAudioConfig(**config_dict.pop("audio_config", {}))
|
| 165 |
+
return cls(audio_config=audio_config, **config_dict, **kwargs)
|
|
|
|
| 166 |
|
| 167 |
def update_with_tokenizer(self, tokenizer=None):
|
| 168 |
"""Update configuration values based on tokenizer"""
|