Set rep pen range unlocked for bigger max context

This commit is contained in:
Cohee 2023-08-26 21:27:37 +03:00
parent de905875c4
commit 9d166db4ee
3 changed files with 9 additions and 8 deletions

View File

@ -367,7 +367,7 @@
</div>
<div class="range-block-range-and-counter">
<div class="range-block-range">
<input type="range" id="rep_pen_size_novel" name="volume" min="0" max="2048" step="1">
<input type="range" id="rep_pen_size_novel" name="volume" min="0" max="8192" step="1">
</div>
<div class="range-block-counter">
<div contenteditable="true" data-for="rep_pen_size_novel" id="rep_pen_size_counter_novel">

View File

@ -99,7 +99,6 @@ function loadNovelPreset(preset) {
setGenerationParamsFromPreset(preset);
}
$("#rep_pen_size_novel").attr('max', max_context);
nai_settings.temperature = preset.temperature;
nai_settings.repetition_penalty = preset.repetition_penalty;
nai_settings.repetition_penalty_range = preset.repetition_penalty_range;
@ -168,7 +167,6 @@ function loadNovelSettingsUi(ui_settings) {
$("#rep_pen_novel").val(ui_settings.repetition_penalty);
$("#rep_pen_counter_novel").text(Number(ui_settings.repetition_penalty).toFixed(2));
$("#rep_pen_size_novel").val(ui_settings.repetition_penalty_range);
$("#rep_pen_size_novel").attr('max', max_context);
$("#rep_pen_size_counter_novel").text(Number(ui_settings.repetition_penalty_range).toFixed(0));
$("#rep_pen_slope_novel").val(ui_settings.repetition_penalty_slope);
$("#rep_pen_slope_counter_novel").text(Number(`${ui_settings.repetition_penalty_slope}`).toFixed(2));

View File

@ -878,8 +878,10 @@ function loadMaxContextUnlocked() {
}
function switchMaxContextSize() {
const element = $('#max_context');
const elements = [$('#max_context'), $('#rep_pen_range'), $('#rep_pen_range_textgenerationwebui')];
const maxValue = power_user.max_context_unlocked ? MAX_CONTEXT_UNLOCKED : MAX_CONTEXT_DEFAULT;
for (const element of elements) {
element.attr('max', maxValue);
const value = Number(element.val());
@ -887,6 +889,7 @@ function switchMaxContextSize() {
element.val(maxValue).trigger('input');
}
}
}
function loadContextSettings() {
const controls = [