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.
This commit is contained in:
henk717 2021-08-24 01:18:09 +02:00
parent 1c8f6cbc75
commit c108e080bf
5 changed files with 10 additions and 9 deletions

View File

@ -69,7 +69,7 @@ class vars:
temp = 0.5 # Default generator temperature temp = 0.5 # Default generator temperature
top_p = 0.9 # Default generator top_p top_p = 0.9 # Default generator top_p
top_k = 0 # Default generator top_k 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 numseqs = 1 # Number of sequences to ask the generator to create
gamestarted = False # Whether the game has started (disables UI elements) gamestarted = False # Whether the game has started (disables UI elements)
prompt = "" # Prompt prompt = "" # Prompt

View File

@ -18,7 +18,7 @@ gensettingstf = [{
"max": 1.0, "max": 1.0,
"step": 0.05, "step": 0.05,
"default": 0.9, "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", "uitype": "slider",
@ -29,7 +29,7 @@ gensettingstf = [{
"max": 100, "max": 100,
"step": 1, "step": 1,
"default": 0, "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", "uitype": "slider",
@ -40,7 +40,7 @@ gensettingstf = [{
"max": 1.0, "max": 1.0,
"step": 0.05, "step": 0.05,
"default": 0.0, "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", "uitype": "slider",
@ -70,7 +70,7 @@ gensettingstf = [{
"label": "Max Tokens", "label": "Max Tokens",
"id": "settknmax", "id": "settknmax",
"min": 512, "min": 512,
"max": 4096, "max": 2048,
"step": 8, "step": 8,
"default": 1024, "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." "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."

View File

@ -630,9 +630,9 @@ function autofocus(event) {
} }
function chunkOnKeyDown(event) { function chunkOnKeyDown(event) {
// Enter should submit the chunk changes, except when holding shift // 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
// Escape should also do it regardless of whether shift is held // 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 || (!event.shiftKey && event.keyCode == 13)) { if(event.keyCode == 27) {
setTimeout(function () { setTimeout(function () {
event.target.blur(); event.target.blur();
}, 5); }, 5);

View File

@ -70,6 +70,7 @@ chunk, chunk * {
height: 490px; height: 490px;
margin-top: 10px; margin-top: 10px;
padding: 10px; padding: 10px;
display: flex;
vertical-align: bottom; vertical-align: bottom;
overflow-y: scroll; overflow-y: scroll;
background-color: #262626; background-color: #262626;

View File

@ -78,7 +78,7 @@
</div> </div>
<div class="layer-container"> <div class="layer-container">
<div class="layer-bottom row" id="gamescreen"> <div class="layer-bottom row" id="gamescreen">
<span id="gametext">...</span> <span id="gametext"><p>...</p></span>
<div class="hidden" id="wimenu"> <div class="hidden" id="wimenu">
</div> </div>
</div> </div>