Update gpt_config.py
Browse files- gpt_config.py +3 -8
gpt_config.py
CHANGED
|
@@ -58,7 +58,7 @@ class XTTSGPTConfig(PretrainedConfig):
|
|
| 58 |
label_smoothing: float = 0.0,
|
| 59 |
|
| 60 |
# Generation parameters
|
| 61 |
-
#temperature: float = 0.75,
|
| 62 |
#length_penalty: float = 1.0,
|
| 63 |
#repetition_penalty: float = 5.0,
|
| 64 |
#top_k: int = 50,
|
|
@@ -134,11 +134,6 @@ class XTTSGPTConfig(PretrainedConfig):
|
|
| 134 |
self.label_smoothing = label_smoothing
|
| 135 |
|
| 136 |
# Generation parameters
|
| 137 |
-
self.temperature = temperature
|
| 138 |
-
self.length_penalty = length_penalty
|
| 139 |
-
self.repetition_penalty = repetition_penalty
|
| 140 |
-
self.top_k = top_k
|
| 141 |
-
self.top_p = top_p
|
| 142 |
self.gpt_cond_len = gpt_cond_len
|
| 143 |
self.gpt_cond_chunk_len = gpt_cond_chunk_len
|
| 144 |
self.max_ref_len = max_ref_len
|
|
@@ -159,10 +154,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 |
-
return cls(audio_config=audio_config, **config_dict
|
| 166 |
|
| 167 |
def update_with_tokenizer(self, tokenizer=None):
|
| 168 |
"""Update configuration values based on tokenizer"""
|
|
|
|
| 58 |
label_smoothing: float = 0.0,
|
| 59 |
|
| 60 |
# Generation parameters
|
| 61 |
+
#temperature: float = 0.75, will trow a warning
|
| 62 |
#length_penalty: float = 1.0,
|
| 63 |
#repetition_penalty: float = 5.0,
|
| 64 |
#top_k: int = 50,
|
|
|
|
| 134 |
self.label_smoothing = label_smoothing
|
| 135 |
|
| 136 |
# Generation parameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
self.gpt_cond_len = gpt_cond_len
|
| 138 |
self.gpt_cond_chunk_len = gpt_cond_chunk_len
|
| 139 |
self.max_ref_len = max_ref_len
|
|
|
|
| 154 |
return config_dict
|
| 155 |
|
| 156 |
@classmethod
|
| 157 |
+
def from_dict(cls, config_dict):
|
| 158 |
"""Create config from dictionary"""
|
| 159 |
audio_config = XTTSAudioConfig(**config_dict.pop("audio_config", {}))
|
| 160 |
+
return cls(audio_config=audio_config, **config_dict)
|
| 161 |
|
| 162 |
def update_with_tokenizer(self, tokenizer=None):
|
| 163 |
"""Update configuration values based on tokenizer"""
|