Merge pull request #1342 from ThisIsPIRI/maxcontext

Fix context size counter when size is unlocked
This commit is contained in:
Cohee 2023-11-12 00:27:24 +02:00 committed by GitHub
commit 59f7147271
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1357,7 +1357,7 @@ function loadMaxContextUnlocked() {
}
function switchMaxContextSize() {
const elements = [$('#max_context'), $('#rep_pen_range'), $('#rep_pen_range_textgenerationwebui')];
const elements = [$('#max_context'), $('#max_context_counter'), $('#rep_pen_range'), $('#rep_pen_range_textgenerationwebui')];
const maxValue = power_user.max_context_unlocked ? MAX_CONTEXT_UNLOCKED : MAX_CONTEXT_DEFAULT;
const minValue = power_user.max_context_unlocked ? maxContextMin : maxContextMin;
const steps = power_user.max_context_unlocked ? unlockedMaxContextStep : maxContextStep;
@ -1366,7 +1366,7 @@ function switchMaxContextSize() {
element.attr('max', maxValue);
element.attr('step', steps);
if (element.attr('id') == 'max_context') {
if (element.attr('id').indexOf('max_context') !== -1) {
element.attr('min', minValue);
}
const value = Number(element.val());