minor skill issue with slider overhaul

This commit is contained in:
RossAscends 2023-10-26 20:41:12 +09:00
parent e9107870c0
commit c79bf951b7
2 changed files with 6 additions and 10 deletions

View File

@ -539,9 +539,8 @@
<input type="range" id="freq_pen_textgenerationwebui" name="volume" min="-2" max="2" step="0.01" /> <input type="range" id="freq_pen_textgenerationwebui" name="volume" min="-2" max="2" step="0.01" />
</div> </div>
<div class="range-block-counter"> <div class="range-block-counter">
<div contenteditable="true" data-for="freq_pen_textgenerationwebui" id="freq_pen_counter_textgenerationwebui"> <input type="number" data-for="freq_pen_textgenerationwebui" min="-2" max="2" step="0.01" id="freq_pen_counter_textgenerationwebui">
select
</div>
</div> </div>
</div> </div>
</div> </div>
@ -554,9 +553,8 @@
<input type="range" id="presence_pen_textgenerationwebui" name="volume" min="-2" max="2" step="0.01" /> <input type="range" id="presence_pen_textgenerationwebui" name="volume" min="-2" max="2" step="0.01" />
</div> </div>
<div class="range-block-counter"> <div class="range-block-counter">
<div contenteditable="true" data-for="presence_pen_textgenerationwebui" id="presence_pen_counter_textgenerationwebui"> <input type="number" min="-2" max="2" step="0.01" data-for="presence_pen_textgenerationwebui" id="presence_pen_counter_textgenerationwebui">
select
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -290,8 +290,7 @@ jQuery(function () {
} }
else { else {
const value = Number($(this).val()); const value = Number($(this).val());
$(`#${id}_counter_textgenerationwebui`).val(value.toFixed(2)); $(`#${id}_counter_textgenerationwebui`).val(value);
$("#rep_pen_range_counter_textgenerationwebui").val(Math.floor(value));
textgenerationwebui_settings[id] = value; textgenerationwebui_settings[id] = value;
} }
@ -317,8 +316,7 @@ function setSettingByName(i, value, trigger) {
else { else {
const val = parseFloat(value); const val = parseFloat(value);
$(`#${i}_textgenerationwebui`).val(val); $(`#${i}_textgenerationwebui`).val(val);
$(`#${i}_counter_textgenerationwebui`).val(val.toFixed(2)); $(`#${i}_counter_textgenerationwebui`).val(val);
$("#rep_pen_range_counter_textgenerationwebui").val(Math.floor(val));
} }
if (trigger) { if (trigger) {