Missed several context bind cases

This commit is contained in:
Cohee 2023-12-21 17:19:42 +02:00
parent fac4169dd8
commit bddccd0356
1 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ export function autoSelectInstructPreset(modelId) {
let foundMatch = false;
for (const instruct_preset of instruct_presets) {
// If instruct preset matches the context template
if (instruct_preset.name === power_user.context.preset) {
if (power_user.instruct.bind_to_context && instruct_preset.name === power_user.context.preset) {
foundMatch = true;
selectInstructPreset(instruct_preset.name);
break;
@ -164,7 +164,7 @@ export function autoSelectInstructPreset(modelId) {
}
}
if (power_user.default_instruct && power_user.instruct.preset !== power_user.default_instruct) {
if (power_user.instruct.bind_to_context && power_user.default_instruct && power_user.instruct.preset !== power_user.default_instruct) {
if (instruct_presets.some(p => p.name === power_user.default_instruct)) {
console.log(`Instruct mode: default preset "${power_user.default_instruct}" selected`);
$('#instruct_presets').val(power_user.default_instruct).trigger('change');