From f2d5196890ee228076a31ca0dc35dae69f0e0521 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 25 Oct 2023 19:44:46 +0300 Subject: [PATCH 1/8] Change scenario override setup method --- public/script.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/public/script.js b/public/script.js index 6e451527c..5227fb1c6 100644 --- a/public/script.js +++ b/public/script.js @@ -5777,15 +5777,14 @@ export function setScenarioOverride() { const isGroup = !!selected_group; template.find('[data-group="true"]').toggle(isGroup); template.find('[data-character="true"]').toggle(!isGroup); - template.find('.chat_scenario').text(metadataValue).on('input', onScenarioOverrideInput); + template.find('.chat_scenario').val(metadataValue).on('input', onScenarioOverrideInput); template.find('.remove_scenario_override').on('click', onScenarioOverrideRemoveClick); callPopup(template, 'text'); } function onScenarioOverrideInput() { - const value = $(this).val(); - const metadata = { scenario: value, }; - updateChatMetadata(metadata, false); + const value = String($(this).val()); + chat_metadata['scenario'] = value; saveMetadataDebounced(); } From b4a401805fbbbfc34e20c02f8b39be14c33b5da0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 25 Oct 2023 21:49:32 +0300 Subject: [PATCH 2/8] Add explainer for SD prompt expansion --- public/scripts/extensions/stable-diffusion/settings.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/scripts/extensions/stable-diffusion/settings.html b/public/scripts/extensions/stable-diffusion/settings.html index 10e272c1e..a69ee5808 100644 --- a/public/scripts/extensions/stable-diffusion/settings.html +++ b/public/scripts/extensions/stable-diffusion/settings.html @@ -16,6 +16,10 @@ Auto-enhance prompts + + This option uses an additional GPT-2 text generation model to add more details to the prompt generated by the main API. + Works best for SDXL image models. May not work well with other models, it is recommended to manually edit prompts in this case. + + +
+
+ select +
+
+ + +
+
+ Presence Penalty +
+
+
+ +
+
+
+ select +
+
+
+
No Repeat Ngram Size diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 4dcfe091c..9d9e9e5bc 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -44,6 +44,8 @@ const textgenerationwebui_settings = { length_penalty: 1, min_length: 0, encoder_rep_pen: 1, + freq_pen: 0, + presence_pen: 0, do_sample: true, early_stopping: false, seed: -1, @@ -87,6 +89,8 @@ const setting_names = [ "length_penalty", "min_length", "encoder_rep_pen", + "freq_pen", + "presence_pen", "do_sample", "early_stopping", "seed", @@ -413,6 +417,8 @@ export function getTextGenGenerationData(finalPrompt, this_amount_gen, isImperso 'repetition_penalty': textgenerationwebui_settings.rep_pen, 'repetition_penalty_range': textgenerationwebui_settings.rep_pen_range, 'encoder_repetition_penalty': textgenerationwebui_settings.encoder_rep_pen, + 'frequency_penalty': textgenerationwebui_settings.freq_pen, + 'presence_penalty': textgenerationwebui_settings.presence_pen, 'top_k': textgenerationwebui_settings.top_k, 'min_length': textgenerationwebui_settings.min_length, 'no_repeat_ngram_size': textgenerationwebui_settings.no_repeat_ngram_size, From cb9e334a750c3f4a306757060e1f86e214e44173 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:36:14 +0300 Subject: [PATCH 4/8] Fix localization strings --- public/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/index.html b/public/index.html index bd5c12692..637752ddb 100644 --- a/public/index.html +++ b/public/index.html @@ -548,7 +548,7 @@
-
+
Frequency Penalty
@@ -563,7 +563,7 @@
-
+
Presence Penalty
From 51d2c9febacae1340942661df4f1169bd7541af8 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:39:31 +0300 Subject: [PATCH 5/8] Add UI option for group gen strategy --- public/css/rm-groups.css | 1 + public/index.html | 56 ++++++++++++++++++++--------------- public/scripts/group-chats.js | 32 ++++++++++++++++---- server.js | 1 + 4 files changed, 60 insertions(+), 30 deletions(-) diff --git a/public/css/rm-groups.css b/public/css/rm-groups.css index b33c23103..4bc82ee6b 100644 --- a/public/css/rm-groups.css +++ b/public/css/rm-groups.css @@ -78,6 +78,7 @@ #rm_group_members:empty { width: 100%; + padding: 0.5em 0; } #rm_group_members:empty::before { diff --git a/public/index.html b/public/index.html index 02bcc1f0f..773f6a9b7 100644 --- a/public/index.html +++ b/public/index.html @@ -3591,7 +3591,12 @@
- Group Controls + + Group Controls + + ? + +
@@ -3607,7 +3612,7 @@
-
+