#1436 Add unlock to response length

This commit is contained in:
Cohee
2023-12-03 18:30:21 +02:00
parent 40b132176d
commit 676cc7731e
3 changed files with 18 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ import {
substituteParams,
} from '../script.js';
import { getCfgPrompt } from './cfg-scale.js';
import { MAX_CONTEXT_DEFAULT } from './power-user.js';
import { MAX_CONTEXT_DEFAULT, MAX_RESPONSE_DEFAULT } from './power-user.js';
import { getTextTokens, tokenizers } from './tokenizers.js';
import {
getSortableDelay,
@@ -106,7 +106,7 @@ export async function loadNovelSubscriptionData() {
export function loadNovelPreset(preset) {
if (preset.genamt === undefined) {
const needsUnlock = preset.max_context > MAX_CONTEXT_DEFAULT;
const needsUnlock = preset.max_context > MAX_CONTEXT_DEFAULT || preset.max_length > MAX_RESPONSE_DEFAULT;
$('#amount_gen').val(preset.max_length).trigger('input');
$('#max_context_unlocked').prop('checked', needsUnlock).trigger('change');
$('#max_context').val(preset.max_context).trigger('input');