Set rep pen range unlocked for bigger max context
This commit is contained in:
parent
de905875c4
commit
9d166db4ee
|
@ -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">
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -878,13 +878,16 @@ 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;
|
||||
element.attr('max', maxValue);
|
||||
const value = Number(element.val());
|
||||
|
||||
if (value >= maxValue) {
|
||||
element.val(maxValue).trigger('input');
|
||||
for (const element of elements) {
|
||||
element.attr('max', maxValue);
|
||||
const value = Number(element.val());
|
||||
|
||||
if (value >= maxValue) {
|
||||
element.val(maxValue).trigger('input');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue