From c108e080bf901a1f85417e232813cb638035a58e Mon Sep 17 00:00:00 2001 From: henk717 Date: Tue, 24 Aug 2021 01:18:09 +0200 Subject: [PATCH] Various Fixes Various Fixes, mostly to make the UI play a little nicer in the new edit mode. Also reverted and optimized some of the setting stuff. --- aiserver.py | 2 +- gensettings.py | 8 ++++---- static/application.js | 6 +++--- static/custom.css | 1 + templates/index.html | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/aiserver.py b/aiserver.py index 89d7a5fe..5211e203 100644 --- a/aiserver.py +++ b/aiserver.py @@ -69,7 +69,7 @@ class vars: temp = 0.5 # Default generator temperature top_p = 0.9 # Default generator top_p top_k = 0 # Default generator top_k - tfs = 0.0 # Default generator tfs (tail-free sampling) + tfs = 1.0 # Default generator tfs (tail-free sampling) numseqs = 1 # Number of sequences to ask the generator to create gamestarted = False # Whether the game has started (disables UI elements) prompt = "" # Prompt diff --git a/gensettings.py b/gensettings.py index e113b8ee..eb50476e 100644 --- a/gensettings.py +++ b/gensettings.py @@ -18,7 +18,7 @@ gensettingstf = [{ "max": 1.0, "step": 0.05, "default": 0.9, - "tooltip": "Used to discard unlikely text in the sampling process. Lower values will make text more predictable but can become repetitious." + "tooltip": "Used to discard unlikely text in the sampling process. Lower values will make text more predictable but can become repetitious. (Put this value on 1 to disable its effect)" }, { "uitype": "slider", @@ -29,7 +29,7 @@ gensettingstf = [{ "max": 100, "step": 1, "default": 0, - "tooltip": "Alternative sampling method, can be combined with top_p." + "tooltip": "Alternative sampling method, can be combined with top_p. (Put this value on 0 to disable its effect)" }, { "uitype": "slider", @@ -40,7 +40,7 @@ gensettingstf = [{ "max": 1.0, "step": 0.05, "default": 0.0, - "tooltip": "Alternative sampling method; it is recommended to disable (set to 0) top_p and top_k if using this. 0.95 is thought to be a good value." + "tooltip": "Alternative sampling method; it is recommended to disable top_p and top_k (set top_p to 1 and top_k to 0) if using this. 0.95 is thought to be a good value. (Put this value on 1 to disable its effect)" }, { "uitype": "slider", @@ -70,7 +70,7 @@ gensettingstf = [{ "label": "Max Tokens", "id": "settknmax", "min": 512, - "max": 4096, + "max": 2048, "step": 8, "default": 1024, "tooltip": "Max number of tokens of context to submit to the AI for sampling. Make sure this is higher than Amount to Generate. Higher values increase VRAM/RAM usage." diff --git a/static/application.js b/static/application.js index 6695ec0f..80cb187c 100644 --- a/static/application.js +++ b/static/application.js @@ -630,9 +630,9 @@ function autofocus(event) { } function chunkOnKeyDown(event) { - // Enter should submit the chunk changes, except when holding shift - // Escape should also do it regardless of whether shift is held - if(event.keyCode == 27 || (!event.shiftKey && event.keyCode == 13)) { + // Make escape commit the changes (Originally we had Enter here to but its not required and nicer for users if we let them type freely + // You can add the following after 27 if you want it back to committing on enter : || (!event.shiftKey && event.keyCode == 13) + if(event.keyCode == 27) { setTimeout(function () { event.target.blur(); }, 5); diff --git a/static/custom.css b/static/custom.css index 8da37d16..70a23124 100644 --- a/static/custom.css +++ b/static/custom.css @@ -70,6 +70,7 @@ chunk, chunk * { height: 490px; margin-top: 10px; padding: 10px; + display: flex; vertical-align: bottom; overflow-y: scroll; background-color: #262626; diff --git a/templates/index.html b/templates/index.html index f7716bfb..97eee72d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -78,7 +78,7 @@
- ... +

...