mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 23:48:48 +08:00
modified: GPT_SoVITS/AR/models/t2s_model.py
This commit is contained in:
parent
ae61554f19
commit
04014b959e
@ -328,8 +328,8 @@ class Text2SemanticDecoder(nn.Module):
|
||||
prompts, ####参考音频token
|
||||
bert_feature,
|
||||
top_k: int = -100,
|
||||
top_p: int = 100,
|
||||
min_p: float = 0.0,
|
||||
top_p: int = 100,
|
||||
early_stop_num: int = -1,
|
||||
temperature: float = 1.0,
|
||||
):
|
||||
@ -398,7 +398,7 @@ class Text2SemanticDecoder(nn.Module):
|
||||
if(idx==0):###第一次跑不能EOS否则没有了
|
||||
logits = logits[:, :-1] ###刨除1024终止符号的概率
|
||||
samples = sample(
|
||||
logits[0], y, top_k=top_k, top_p=top_p, min_p=min_p, repetition_penalty=1.35, temperature=temperature
|
||||
logits[0], y, top_k=top_k, min_p=min_p, top_p=top_p, repetition_penalty=1.35, temperature=temperature
|
||||
)[0].unsqueeze(0)
|
||||
# 本次生成的 semantic_ids 和之前的 y 构成新的 y
|
||||
# print(samples.shape)#[1,1]#第一个1是bs
|
||||
|
Loading…
x
Reference in New Issue
Block a user