12
12
-->
13
13
14
14
<script>
15
- const LITEVER = 150 ;
15
+ const LITEVER = 151 ;
16
16
const urlParams = new URLSearchParams(window.location.search);
17
17
const localflag = urlParams.get('local');
18
18
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
210
210
{
211
211
height: calc(75vh - 110px);
212
212
overflow-y: auto;
213
+ overflow-x: hidden;
213
214
}
214
215
215
216
body.connected .settingsmenu,
876
877
background: #ffffff;
877
878
border: 1px solid white;
878
879
text-decoration: none;
880
+ /* position: relative; */
879
881
}
880
882
881
883
.helpicon:hover {
897
899
}
898
900
@media (max-width: 680px) {
899
901
.helpicon:hover .helptext {
900
- right: 0;
902
+ margin: 0 0 auto;
903
+ position: fixed;
904
+ top: 20%;
905
+ left: 50%;
906
+ transform: translate(-50%, -50%);
901
907
}
902
908
}
903
909
1117
1123
.settingitem.wide{
1118
1124
width: 100%;
1119
1125
}
1126
+ .settingcell
1127
+ {
1128
+ padding: 4px;
1129
+ width: 100%;
1130
+ }
1120
1131
1121
1132
.settingsdesctxt
1122
1133
{
7419
7430
function confirm_dynatemp()
7420
7431
{
7421
7432
document.getElementById("dynatempcontainer").classList.add("hidden");
7422
- document.getElementById("dynatemp_overview").innerText = (( document.getElementById("dynatemp_range").value>0||document.getElementById("smoothing_factor").value>0) ?"ON":"OFF");
7433
+ document.getElementById("dynatemp_overview").innerText = (document.getElementById("dynatemp_range").value>0?"ON":"OFF");
7423
7434
}
7424
7435
function show_dynatemp()
7425
7436
{
9123
9134
document.getElementById("dynatemp_range").value = localsettings.dynatemp_range;
9124
9135
document.getElementById("dynatemp_exponent").value = localsettings.dynatemp_exponent;
9125
9136
document.getElementById("smoothing_factor").value = localsettings.smoothing_factor;
9126
- document.getElementById("dynatemp_overview").innerText = (( localsettings.dynatemp_range>0||localsettings.smoothing_factor>0) ?"ON":"OFF");
9137
+ document.getElementById("dynatemp_overview").innerText = (localsettings.dynatemp_range>0?"ON":"OFF");
9127
9138
document.getElementById("presence_penalty").value = localsettings.presence_penalty;
9128
9139
document.getElementById("sampler_seed").value = localsettings.sampler_seed;
9129
- document.getElementById("top_k").value = localsettings.top_k;
9140
+ document.getElementById("top_k").value = document.getElementById("top_k_slide").value = localsettings.top_k;
9130
9141
document.getElementById("top_a").value = localsettings.top_a;
9131
9142
document.getElementById("typ_s").value = localsettings.typ_s;
9132
9143
document.getElementById("tfs_s").value = localsettings.tfs_s;
9271
9282
document.getElementById("dynatemp_range").value = found.dynatemp_range;
9272
9283
document.getElementById("dynatemp_exponent").value = found.dynatemp_exponent;
9273
9284
document.getElementById("smoothing_factor").value = found.smoothing_factor;
9274
- document.getElementById("top_k").value = found.top_k;
9285
+ document.getElementById("top_k").value = document.getElementById("top_k_slide").value = found.top_k;
9275
9286
document.getElementById("top_p").value = document.getElementById("top_p_slide").value = found.top_p;
9276
9287
document.getElementById("top_a").value = found.top_a;
9277
9288
document.getElementById("typ_s").value = found.typical;
9282
9293
document.getElementById("rep_pen_slope").value = found.rep_pen_slope;
9283
9294
document.getElementById("sampler_order").value = found.sampler_order.toString();
9284
9295
document.getElementById("presetsdesc").innerText = found.description;
9296
+ document.getElementById("dynatemp_overview").innerText = (document.getElementById("dynatemp_range").value>0?"ON":"OFF");
9285
9297
}else{
9286
9298
document.getElementById("presetsdesc").innerText = "";
9287
9299
}
@@ -16965,12 +16977,10 @@
16965
16977
<div class="settingitem">
16966
16978
<div class="settinglabel">
16967
16979
<div class="justifyleft settingsmall">Context Size <span class="helpicon">?<span class="helptext">Maximum number of context tokens submitted to the AI. Must exceed max output tokens. Can be further increased by editing the textbox. Older models stop at 2048, newer ones can do 4096 or greater.</span></span></div>
16968
- <input inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length"
16969
- value=1024 oninput="
16980
+ <input inputmode="numeric" class="justifyright flex-push-right settingsmall widerinput" id="max_context_length" oninput="
16970
16981
document.getElementById('max_context_length_slide').value = this.value;">
16971
16982
</div>
16972
- <div><input type="range" class="form-range airange" min="512" max="2048" step="8"
16973
- id="max_context_length_slide" oninput="
16983
+ <div><input type="range" class="form-range airange" min="512" max="2048" step="8" id="max_context_length_slide" oninput="
16974
16984
document.getElementById('max_context_length').value = this.value;"></div>
16975
16985
<div class="settingminmax">
16976
16986
<div class="justifyleft">512</div>
@@ -16986,12 +16996,10 @@
16986
16996
<div class="settinglabel">
16987
16997
<div class="justifyleft settingsmall">Max Output <span class="helpicon">?<span
16988
16998
class="helptext">Number of tokens the AI should generate. Higher numbers will take longer to generate.</span></span></div>
16989
- <input inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" value=80
16990
- oninput="
16999
+ <input inputmode="numeric" class="justifyright flex-push-right settingsmall" id="max_length" oninput="
16991
17000
document.getElementById('max_length_slide').value = this.value;">
16992
17001
</div>
16993
- <div><input type="range" class="form-range airange" min="16" max="512" step="2"
16994
- id="max_length_slide" oninput="
17002
+ <div><input type="range" class="form-range airange" min="16" max="512" step="2" id="max_length_slide" oninput="
16995
17003
document.getElementById('max_length').value = this.value;"></div>
16996
17004
<div class="settingminmax">
16997
17005
<div class="justifyleft">16</div>
17010
17018
may make text less sensible. Lower values will make text more predictable but
17011
17019
can become repetitious.</span></span></div>
17012
17020
<input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="temperature" value=0.5
17013
- oninput="
17014
- document.getElementById('temperature_slide').value = this.value;">
17021
+ oninput="document.getElementById('temperature_slide').value = this.value;">
17015
17022
</div>
17016
17023
<div><input type="range" class="form-range airange" min="0.1" max="2" step="0.01"
17017
17024
id="temperature_slide" oninput="
@@ -17022,17 +17029,32 @@
17022
17029
</div>
17023
17030
</div>
17024
17031
17032
+ <div class="settingitem">
17033
+ <div class="settinglabel">
17034
+ <div class="justifyleft settingsmall">Repetition Penalty <span class="helpicon">?<span
17035
+ class="helptext">Used to penalize words that were already generated or belong to
17036
+ the context (too high causes incoherence!).</span></span></div>
17037
+ <input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="rep_pen" oninput="
17038
+ document.getElementById('rep_pen_slide').value = this.value;">
17039
+ </div>
17040
+ <div><input type="range" class="form-range airange" min="1" max="2" step="0.01"
17041
+ id="rep_pen_slide" oninput="document.getElementById('rep_pen').value = this.value;"></div>
17042
+ <div class="settingminmax">
17043
+ <div class="justifyleft">1</div>
17044
+ <div class="justifyright">2</div>
17045
+ </div>
17046
+ </div>
17047
+
17025
17048
<div class="settingitem">
17026
17049
<div class="settinglabel">
17027
17050
<div class="justifyleft settingsmall">Top p Sampling <span class="helpicon">?<span class="helptext">Used
17028
- to discard unlikely text in the sampling process. Lower values will make text
17051
+ to discard unlikely text in a nucleus sampling process. Lower values will make text
17029
17052
more predictable but can become repetitious. Set to 1 to deactivate it.</span></span></div>
17030
- <input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_p" value=80 oninput="
17053
+ <input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_p" oninput="
17031
17054
document.getElementById('top_p_slide').value = this.value;">
17032
17055
</div>
17033
17056
<div><input type="range" class="form-range airange" min="0" max="1" step="0.01" id="top_p_slide"
17034
- oninput="
17035
- document.getElementById('top_p').value = this.value;"></div>
17057
+ oninput="document.getElementById('top_p').value = this.value;"></div>
17036
17058
<div class="settingminmax">
17037
17059
<div class="justifyleft">0</div>
17038
17060
<div class="justifyright">1</div>
@@ -17041,67 +17063,82 @@
17041
17063
17042
17064
<div class="settingitem">
17043
17065
<div class="settinglabel">
17044
- <div class="justifyleft settingsmall">Repetition Penalty <span class="helpicon">?<span
17045
- class="helptext">Used to penalize words that were already generated or belong to
17046
- the context (too high causes incoherence!).</span></span></div>
17047
- <input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="rep_pen" value=80
17048
- oninput="
17049
- document.getElementById('rep_pen_slide').value = this.value;">
17066
+ <div class="justifyleft settingsmall">Top k Sampling <span class="helpicon">?<span class="helptext">Top-K Sampling. Discards all but the K most likely tokens. Set 0 to Deactivate.</span></span></div>
17067
+ <input inputmode="decimal" class="justifyright flex-push-right settingsmall" id="top_k" oninput="
17068
+ document.getElementById('top_k_slide').value = this.value;">
17050
17069
</div>
17051
- <div><input type="range" class="form-range airange" min="1" max="2" step="0.01"
17052
- id="rep_pen_slide" oninput="
17053
- document.getElementById('rep_pen').value = this.value;"></div>
17070
+ <div><input type="range" class="form-range airange" min="0" max="100" step="1" id="top_k_slide"
17071
+ oninput="document.getElementById('top_k').value = this.value;"></div>
17054
17072
<div class="settingminmax">
17055
- <div class="justifyleft">1 </div>
17056
- <div class="justifyright">2 </div>
17073
+ <div class="justifyleft">0 </div>
17074
+ <div class="justifyright">1 </div>
17057
17075
</div>
17058
17076
</div>
17059
17077
17060
- <div class="settingitem">
17078
+ <div class="settingitem wide ">
17061
17079
<div class="settinglabel">
17062
17080
<div class="justifyleft settingsmall">Advanced Sampler Config <span class="helpicon">?<span class="helptext">These settings control alternative samplers configurations. They are inactive by default, you usually do not need to change them.</span></span></div>
17063
- <table class="settingsmall text-center" style="border-spacing: 3px 2px;
17064
- border-collapse: separate;">
17065
- <tr>
17066
- <th title="Top-K Sampling. 0 to Deactivate.">Top-K</th>
17067
- <th title="Top-A Sampling. 0 to Deactivate.">Top-A</th>
17068
- <th title="Typical Sampling. 1 to Deactivate.">Typ.</th>
17069
- <th title="Tail-Free Sampling. 1 to Deactivate.">TFS</th>
17070
- </tr>
17071
- <tr>
17072
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17073
- id="top_k"></td>
17074
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17075
- id="top_a"></td>
17076
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17077
- id="typ_s"></td>
17078
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17079
- id="tfs_s"></td>
17080
- </tr>
17081
-
17082
- <tr>
17083
- <th title="Sampler Seed. -1 to Deactivate.">Seed</th>
17084
- <th title="Min-P Sampling. 0 to Deactivate.">Min-P</th>
17085
- <th title="Presence Penalty. 0 to Deactivate.">PrPen.</th>
17086
- <th title="DynaTemp Configs. Range 0 to Deactivate.">DyTmp.</th>
17087
- </tr>
17088
- <tr>
17089
-
17090
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17091
- id="sampler_seed"></td>
17092
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17093
- id="min_p"></td>
17094
- <td><input class="" type="text" inputmode="decimal" placeholder="0" value="0"
17095
- id="presence_penalty"></td>
17096
- <td><button type="button" class="btn btn-primary" style="padding:1px 3px;font-size:8px;" onclick="show_dynatemp()"><span id="dynatemp_overview">OFF</span></button></td>
17097
- </tr>
17098
-
17099
-
17100
- </table>
17101
-
17081
+ </div>
17082
+ <div style="display:flex;width:100%;">
17083
+ <div class="settinglabel settingcell">
17084
+ <div title="Top-A Sampling. 0 to Deactivate." class="justifyleft settingsmall" style="width:100%">Top-A</div>
17085
+ <div class="justifyleft settingsmall" style="width:100%">
17086
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="top_a"></div>
17087
+ </div>
17088
+ <div class="settinglabel settingcell">
17089
+ <div title="Typical Sampling. 1 to Deactivate." class="justifyleft settingsmall" style="width:100%">Typical</div>
17090
+ <div class="justifyleft settingsmall" style="width:100%">
17091
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="typ_s"></div>
17092
+ </div>
17093
+ <div class="settinglabel settingcell">
17094
+ <div title="Tail-Free Sampling. 1 to Deactivate." class="justifyleft settingsmall" style="width:100%">TFS</div>
17095
+ <div class="justifyleft settingsmall" style="width:100%">
17096
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="tfs_s"></div>
17097
+ </div>
17098
+ <div class="settinglabel settingcell">
17099
+ <div title="Min-P Sampling. 0 to Deactivate." class="justifyleft settingsmall" style="width:100%">Min-P</div>
17100
+ <div class="justifyleft settingsmall" style="width:100%">
17101
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="min_p"></div>
17102
+ </div>
17103
+ <div class="settinglabel settingcell">
17104
+ <div title="Presence Penalty. 0 to Deactivate." class="justifyleft settingsmall" style="width:100%">Pr. Pen.</div>
17105
+ <div class="justifyleft settingsmall" style="width:100%">
17106
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="presence_penalty"></div>
17107
+ </div>
17108
+ </div>
17109
+ <div style="display:flex;width:100%;">
17110
+ <div class="settinglabel settingcell">
17111
+ <div title="Sampler Seed. -1 to Deactivate." class="justifyleft settingsmall" style="width:100%">Seed</div>
17112
+ <div class="justifyleft settingsmall" style="width:100%">
17113
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="sampler_seed"></div>
17114
+ </div>
17115
+ <div class="settinglabel settingcell">
17116
+ <div title="Repetition Penalty Range" class="justifyleft settingsmall" style="width:100%">Rp.Range</div>
17117
+ <div class="justifyleft settingsmall" style="width:100%">
17118
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="rep_pen_range"></div>
17119
+ </div>
17120
+ <div class="settinglabel settingcell">
17121
+ <div title="Repetition Penalty Slope" class="justifyleft settingsmall" style="width:100%">Rp.Slope</div>
17122
+ <div class="justifyleft settingsmall" style="width:100%">
17123
+ <input class="settinglabel miniinput" type="text" inputmode="decimal" placeholder="0" value="0" id="rep_pen_slope"></div>
17124
+ </div>
17125
+ <div class="settinglabel settingcell">
17126
+ <div title="Sampler Order" class="justifyleft settingsmall" style="width:100%">Smp.Order <span class="helpicon">?<span class="helptext">
17127
+ The order by which all 7 samplers are applied, separated by commas. 0=top_k, 1=top_a, 2=top_p, 3=tfs, 4=typ, 5=temp, 6=rep_pen</span></span></div>
17128
+ <div class="justifyleft settingsmall" style="width:100%">
17129
+ <input class="settinglabel miniinput" type="text" placeholder="CSV" value="" id="sampler_order" title="Valid values are: 0=top_k, 1=top_a, 2=top_p, 3=tfs, 4=typ, 5=temp, 6=rep_pen" onblur="validate_samplers()"></div>
17130
+ </div>
17131
+ <div class="settinglabel settingcell">
17132
+ <div title="DynaTemp Configs. Range 0 to Deactivate." class="justifyleft settingsmall" style="width:100%">DyTemp</div>
17133
+ <div class="justifyleft settingsmall" style="width:100%">
17134
+ <button type="button" class="btn btn-primary" style="padding:1px 3px;font-size:8px;" onclick="show_dynatemp()"><span id="dynatemp_overview">OFF</span></button>
17135
+ </div>
17136
+ </div>
17102
17137
</div>
17103
17138
</div>
17104
17139
17140
+
17141
+
17105
17142
<div class="settingitem">
17106
17143
<div class="settinglabel">
17107
17144
@@ -17128,31 +17165,13 @@
17128
17165
</table>
17129
17166
</div>
17130
17167
<div id="mirounsupporteddiv" class="color_red" style="font-weight:bold;padding:3px;font-size:12px">Mirostat Not Supported</div>
17131
- <div class="settinglabel">
17132
- <div class="justifyleft settingsmall">User Mods <span class="helpicon">?<span class="helptext">Allows you to load third-party user created mods (caution).</span></span></div>
17133
- <button id="loadusermod" type="button" class="btn btn-primary" style="padding:2px 3px;margin-top:2px;font-size:11px;" onclick="apply_user_mod()">Apply User Mod</button>
17134
- </div>
17168
+
17135
17169
</div>
17136
17170
</div>
17137
17171
17138
17172
<div class="settingitem">
17139
17173
<div class="settinglabel">
17140
- <table class="settingsmall text-center" style="border-spacing: 3px 2px;
17141
- border-collapse: separate;">
17142
- <tr>
17143
- <th title="Repetition Penalty Range">RpRng.</th>
17144
- <th title="Repetition Penalty Slope">RpSlp.</th>
17145
- <th style="width:80px;">Smp.Order <span class="helpicon">?<span
17146
- class="helptext">The order by which all 7 samplers are applied, separated by commas. 0=top_k, 1=top_a, 2=top_p, 3=tfs, 4=typ, 5=temp, 6=rep_pen</span></span></th>
17147
- </tr>
17148
- <tr>
17149
- <td><input class="" type="text" placeholder="0" value="0"
17150
- id="rep_pen_range" title="Repetition Penalty Range"></td>
17151
- <td><input class="" type="text" placeholder="0" value="0"
17152
- id="rep_pen_slope" title="Repetition Penalty Slope"></td>
17153
- <td><input class="" type="text" placeholder="CSV" value="" id="sampler_order" style="width:70px;" title="Valid values are: 0=top_k, 1=top_a, 2=top_p, 3=tfs, 4=typ, 5=temp, 6=rep_pen" onblur="validate_samplers()"></td>
17154
- </tr>
17155
- </table>
17174
+
17156
17175
</div>
17157
17176
17158
17177
</div>
17458
17477
class="helptext">Prevents the browser from suspending KoboldAI Lite by playing a silent audio track. This setting cannot be saved.</span></span></div>
17459
17478
<input type="checkbox" id="run_in_background" style="margin:0px 0px 0px auto;">
17460
17479
</div>
17480
+ <div class="settinglabel">
17481
+ <div class="justifyleft settingsmall">User Mods <span class="helpicon">?<span class="helptext">Allows you to load third-party user created mods (caution).</span></span></div>
17482
+ <button id="loadusermod" type="button" class="btn btn-primary" style="padding:2px 3px;margin-top:2px;font-size:11px;margin:0px 0px 0px auto;" onclick="apply_user_mod()">Apply User Mod</button>
17483
+ </div>
17461
17484
</div>
17462
17485
17463
17486
0 commit comments