From 810d954d12081c91e8a22d9a19400ea50b01b1e8 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Sun, 2 Mar 2025 00:26:47 +0100 Subject: [PATCH 1/2] Add missing samplers to TC restore preset --- public/scripts/textgen-settings.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 5d54fe69b..144f2ff3f 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -803,16 +803,19 @@ jQuery(function () { 'dry_penalty_last_n_textgenerationwebui': 0, 'xtc_threshold_textgenerationwebui': 0.1, 'xtc_probability_textgenerationwebui': 0, + 'nsigma_counter_textgenerationwebui': 0, + 'epsilon_cutoff_counter_textgenerationwebui': 0, }; for (const [id, value] of Object.entries(inputs)) { const inputElement = $(`#${id}`); + const valueToSet = typeof value === 'boolean' ? String(value) : value; if (inputElement.prop('type') === 'checkbox') { inputElement.prop('checked', value).trigger('input'); } else if (inputElement.prop('type') === 'number') { - inputElement.val(value).trigger('input'); + inputElement.val(valueToSet).trigger('input'); } else { - inputElement.val(value).trigger('input'); + inputElement.val(valueToSet).trigger('input'); if (power_user.enableZenSliders) { let masterElementID = inputElement.prop('id'); console.log(masterElementID); From 5ecfbf3933888c465a0012fa797a30790347c54c Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sun, 2 Mar 2025 23:01:34 +0200 Subject: [PATCH 2/2] Fix element id for nsigma --- public/scripts/textgen-settings.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 144f2ff3f..4b8e8a66b 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -803,8 +803,7 @@ jQuery(function () { 'dry_penalty_last_n_textgenerationwebui': 0, 'xtc_threshold_textgenerationwebui': 0.1, 'xtc_probability_textgenerationwebui': 0, - 'nsigma_counter_textgenerationwebui': 0, - 'epsilon_cutoff_counter_textgenerationwebui': 0, + 'nsigma_textgenerationwebui': 0, }; for (const [id, value] of Object.entries(inputs)) {