techfreakworm commited on
Commit
cc6b3e5
·
unverified ·
1 Parent(s): b066638

feat(models): expand chatterbox-en params (seed, repetition_penalty, min_p, top_p)

Browse files
Files changed (1) hide show
  1. server/models/chatterbox_en.py +27 -0
server/models/chatterbox_en.py CHANGED
@@ -24,14 +24,38 @@ class Adapter:
24
  name="exaggeration", label="Exaggeration", type="float",
25
  default=0.5, min=0.0, max=2.0, step=0.05,
26
  help="Higher = more expressive prosody.",
 
27
  ),
28
  ParamSpec(
29
  name="cfg_weight", label="CFG weight", type="float",
30
  default=0.5, min=0.0, max=1.0, step=0.05,
 
31
  ),
32
  ParamSpec(
33
  name="temperature", label="Temperature", type="float",
34
  default=0.8, min=0.1, max=1.5, step=0.05,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ),
36
  ]
37
 
@@ -63,6 +87,9 @@ class Adapter:
63
  exaggeration=float(params.get("exaggeration", 0.5)),
64
  cfg_weight=float(params.get("cfg_weight", 0.5)),
65
  temperature=float(params.get("temperature", 0.8)),
 
 
 
66
  )
67
  import numpy as np
68
  import torch
 
24
  name="exaggeration", label="Exaggeration", type="float",
25
  default=0.5, min=0.0, max=2.0, step=0.05,
26
  help="Higher = more expressive prosody.",
27
+ group="basic",
28
  ),
29
  ParamSpec(
30
  name="cfg_weight", label="CFG weight", type="float",
31
  default=0.5, min=0.0, max=1.0, step=0.05,
32
+ group="basic",
33
  ),
34
  ParamSpec(
35
  name="temperature", label="Temperature", type="float",
36
  default=0.8, min=0.1, max=1.5, step=0.05,
37
+ group="basic",
38
+ ),
39
+ ParamSpec(
40
+ name="seed", label="Seed", type="int",
41
+ default=-1, min=-1, step=1,
42
+ help="-1 draws a random seed each time.",
43
+ group="advanced",
44
+ ),
45
+ ParamSpec(
46
+ name="repetition_penalty", label="Repetition penalty", type="float",
47
+ default=1.2, min=1.0, max=3.0, step=0.05,
48
+ group="advanced",
49
+ ),
50
+ ParamSpec(
51
+ name="min_p", label="Min p", type="float",
52
+ default=0.05, min=0.0, max=1.0, step=0.01,
53
+ group="advanced",
54
+ ),
55
+ ParamSpec(
56
+ name="top_p", label="Top p", type="float",
57
+ default=1.0, min=0.0, max=1.0, step=0.01,
58
+ group="advanced",
59
  ),
60
  ]
61
 
 
87
  exaggeration=float(params.get("exaggeration", 0.5)),
88
  cfg_weight=float(params.get("cfg_weight", 0.5)),
89
  temperature=float(params.get("temperature", 0.8)),
90
+ repetition_penalty=float(params.get("repetition_penalty", 1.2)),
91
+ min_p=float(params.get("min_p", 0.05)),
92
+ top_p=float(params.get("top_p", 1.0)),
93
  )
94
  import numpy as np
95
  import torch