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
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

View File

@ -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."

View File

@ -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);

View File

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

View File

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