mlinmg commited on
Commit
1d3cd4b
·
verified ·
1 Parent(s): c96f4b4

Upload gpt_config.py

Browse files
Files changed (1) hide show
  1. 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
- config_dict.pop('name_or_path', None)
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"""