clean up NAI slider decimals

This commit is contained in:
RossAscends 2023-10-26 20:46:09 +09:00
parent c79bf951b7
commit dd2d292a56
2 changed files with 14 additions and 14 deletions

View File

@ -438,10 +438,10 @@
</div>
<div class="range-block-range-and-counter">
<div class="range-block-range">
<input type="range" id="tail_free_sampling_novel" name="volume" min="0" max="1" step="0.001">
<input type="range" id="tail_free_sampling_novel" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<input type="number" min="0" max="1" step="0.001" data-for="tail_free_sampling_novel" id="tail_free_sampling_counter_novel">
<input type="number" min="0" max="1" step="0.01" data-for="tail_free_sampling_novel" id="tail_free_sampling_counter_novel">
</div>
</div>
@ -1280,10 +1280,10 @@
</div>
<div class="range-block-range-and-counter">
<div class="range-block-range">
<input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.001">
<input type="range" id="typical_p_novel" name="volume" min="0" max="1" step="0.01">
</div>
<div class="range-block-counter">
<input type="number" min="0" max="1" step="0.001" data-for="typical_p_novel" id="typical_p_counter_novel">
<input type="number" min="0" max="1" step="0.01" data-for="typical_p_novel" id="typical_p_counter_novel">
</div>
</div>

View File

@ -184,11 +184,11 @@ function loadNovelSettingsUi(ui_settings) {
$("#rep_pen_slope_novel").val(ui_settings.repetition_penalty_slope);
$("#rep_pen_slope_counter_novel").val(Number(`${ui_settings.repetition_penalty_slope}`).toFixed(2));
$("#rep_pen_freq_novel").val(ui_settings.repetition_penalty_frequency);
$("#rep_pen_freq_counter_novel").val(Number(ui_settings.repetition_penalty_frequency).toFixed(5));
$("#rep_pen_freq_counter_novel").val(Number(ui_settings.repetition_penalty_frequency).toFixed(2));
$("#rep_pen_presence_novel").val(ui_settings.repetition_penalty_presence);
$("#rep_pen_presence_counter_novel").val(Number(ui_settings.repetition_penalty_presence).toFixed(3));
$("#rep_pen_presence_counter_novel").val(Number(ui_settings.repetition_penalty_presence).toFixed(2));
$("#tail_free_sampling_novel").val(ui_settings.tail_free_sampling);
$("#tail_free_sampling_counter_novel").val(Number(ui_settings.tail_free_sampling).toFixed(3));
$("#tail_free_sampling_counter_novel").val(Number(ui_settings.tail_free_sampling).toFixed(2));
$("#top_k_novel").val(ui_settings.top_k);
$("#top_k_counter_novel").val(Number(ui_settings.top_k).toFixed(0));
$("#top_p_novel").val(ui_settings.top_p);
@ -196,7 +196,7 @@ function loadNovelSettingsUi(ui_settings) {
$("#top_a_novel").val(ui_settings.top_a);
$("#top_a_counter_novel").val(Number(ui_settings.top_a).toFixed(2));
$("#typical_p_novel").val(ui_settings.typical_p);
$("#typical_p_counter_novel").val(Number(ui_settings.typical_p).toFixed(3));
$("#typical_p_counter_novel").val(Number(ui_settings.typical_p).toFixed(2));
$("#cfg_scale_novel").val(ui_settings.cfg_scale);
$("#cfg_scale_counter_novel").val(Number(ui_settings.cfg_scale).toFixed(2));
$("#phrase_rep_pen_novel").val(ui_settings.phrase_rep_pen || "off");
@ -244,20 +244,20 @@ const sliders = [
{
sliderId: "#rep_pen_freq_novel",
counterId: "#rep_pen_freq_counter_novel",
format: (val) => Number(val).toFixed(5),
setValue: (val) => { nai_settings.repetition_penalty_frequency = Number(val).toFixed(5); },
format: (val) => Number(val).toFixed(2),
setValue: (val) => { nai_settings.repetition_penalty_frequency = Number(val).toFixed(2); },
},
{
sliderId: "#rep_pen_presence_novel",
counterId: "#rep_pen_presence_counter_novel",
format: (val) => `${val}`,
setValue: (val) => { nai_settings.repetition_penalty_presence = Number(val).toFixed(3); },
setValue: (val) => { nai_settings.repetition_penalty_presence = Number(val).toFixed(2); },
},
{
sliderId: "#tail_free_sampling_novel",
counterId: "#tail_free_sampling_counter_novel",
format: (val) => `${val}`,
setValue: (val) => { nai_settings.tail_free_sampling = Number(val).toFixed(3); },
setValue: (val) => { nai_settings.tail_free_sampling = Number(val).toFixed(2); },
},
{
sliderId: "#top_k_novel",
@ -280,8 +280,8 @@ const sliders = [
{
sliderId: "#typical_p_novel",
counterId: "#typical_p_counter_novel",
format: (val) => Number(val).toFixed(3),
setValue: (val) => { nai_settings.typical_p = Number(val).toFixed(3); },
format: (val) => Number(val).toFixed(2),
setValue: (val) => { nai_settings.typical_p = Number(val).toFixed(2); },
},
{
sliderId: "#mirostat_tau_novel",