Commit Graph

136 Commits

Author SHA1 Message Date
Gnome Ann
27c7baab92 Prevent some errors when the prompt is the only chunk 2021-08-25 23:58:12 -04:00
Gnome Ann
b0d64985bb Fix Retry and Back buttons popping the wrong chunk 2021-08-25 19:56:57 -04:00
Gnome Ann
796f5ffd05 Make vars.actions a dictionary instead of a list 2021-08-25 19:28:26 -04:00
Gnome Ann
5604d7f317 Replace non-breaking spaces with regular spaces 2021-08-25 19:25:57 -04:00
Gnome Ann
5603bf0584 Hide messages on updatechunk and removechunk 2021-08-25 19:22:35 -04:00
Gnome Ann
b52f782d92 Disable post-edit blurring and the curtain
Because we don't need them anymore.
This, combined with the chunk optimization, will allow you to
seamlessly continue editing a different chunk after you've finished
editing your current one; e.g. if you edit a chunk and use arrow keys,
backspace or the mouse to select a different chunk, you can immediately
start editing your new chunk without it defocusing.

This patch really has killed two birds with one stone, eh?
Thanks, Javalar!
2021-08-25 01:21:01 -04:00
Gnome Ann
b1c6aee8d3 Integrate inline chunk editor and Adventure mode with Javalar's branch 2021-08-24 19:02:52 -04:00
Gnome Ann
735fc9431b Still HTML-escape chunks if Adventure is off
(cherry picked from commit 3409d8c12e3fbb1e3232f2df82740b012e8f3604)
2021-08-24 18:46:34 -04:00
Gnome Ann
09030573e5 Broadcast updatechunk and removechunk 2021-08-24 18:40:12 -04:00
Gnome Ann
62ad2f0228 Code indentation consistency 2021-08-24 18:32:48 -04:00
Gnome Ann
6d5845ff8d Merge https://github.com/KoboldAI/KoboldAI-Client/pull/45 into big-o 2021-08-24 17:27:50 -04:00
henk717
33d76a5132
Merge pull request #6 from VE-FORBRYDERNE/editable-chunks
More bug fixes for editable chunks
2021-08-24 19:55:56 +02:00
Gnome Ann
ce59c9d399 Fix left/right arrow key bug
This happens when you have a chunk that has no trailing
newlines followed by a chunk with a single newline at the start.
Moving between those chunks would cause the caret to jump to the wrong
position sometimes.
2021-08-24 13:32:29 -04:00
Gnome Ann
90e558cf3f Won't freeze anymore if you delete the prompt 2021-08-24 11:24:29 -04:00
Gnome Ann
7059c18f70 Prevent current_editing_chunk from being a non-chunk element 2021-08-24 11:14:18 -04:00
henk717
f0962155b8
Merge pull request #5 from VE-FORBRYDERNE/editable-chunks
Scroll down on submit
2021-08-24 01:22:57 +02:00
Gnome Ann
13ce16b859 Scroll down on submit 2021-08-23 19:19:36 -04:00
henk717
c108e080bf 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.
2021-08-24 01:18:09 +02:00
henk717
1c8f6cbc75
Merge pull request #4 from VE-FORBRYDERNE/editable-chunks
Editable chunks
2021-08-24 01:01:27 +02:00
Gnome Ann
3bf467e63c Added dedicated inline editing commands to aiserver.py
It's a lot faster now.
2021-08-23 18:52:45 -04:00
Gnome Ann
a907c0a554 Prevent aiserver.py from rarely editing the wrong chunk 2021-08-23 18:26:38 -04:00
Gnome Ann
7ce5b120a0 Also allow backspacing into another chunk
It will still defocus the chunk almost immediately though,
this needs to be fixed later
2021-08-23 18:11:03 -04:00
Gnome Ann
3c9f6963b8 Allow using left and right arrow keys to move between chunks 2021-08-23 18:00:35 -04:00
Gnome Ann
85151cec7b Prevent white border on chunks with Allow Edit off 2021-08-23 14:53:18 -04:00
Gnome Ann
81c83dfef7 Fix bug where chunks still editable with Allow Editing off
If, with Allow Editing on, you change a chunk and then click directly on
the "Allow Editing" switch again to turn it off without defocusing the
chunk in-between (by clicking outside the chunk, using enter/escape,
etc), all story chunks would still be editable.
That behaviour has now been fixed.
2021-08-23 14:25:40 -04:00
Gnome Ann
723e02d793 Improve story chunk blurring 2021-08-23 14:05:40 -04:00
Gnome Ann
2071daf335 Remove the Delete button 2021-08-23 13:22:50 -04:00
Gnome Ann
f1f50e7b80 Remove display: flex; from #gamescreen CSS 2021-08-23 13:08:13 -04:00
Gnome Ann
42b4104d4f Use henk717's modified CSS for editable chunks 2021-08-23 13:06:27 -04:00
Gnome Ann
67521d53f9 You can now click on story chunks to edit them 2021-08-23 02:34:27 -04:00
henk717
2fd544cad7 Change max tokens to 4096
It works smoothly on the TPU colab, so lets allow it. People should not turn this all the way up unless they got the hardware, but we want to allow this for those that do.
2021-08-22 20:59:47 +02:00
henk717
a151e1a33a Small fix for Authors Notes in multiplayer
Multiplayer support was causing all players to automatically submit authors notes. This is now fixed only the person submitting the authors notes counts.
2021-08-22 15:54:35 +02:00
henk717
09ec15c91b
Merge pull request #3 from VE-FORBRYDERNE/breakmodel
Low VRAM patch
2021-08-21 21:03:46 +02:00
Gnome Ann
3c9ce2c541 Use torch.no_grad() and more garbage collection 2021-08-21 12:15:31 -04:00
Gnome Ann
fae15b8a17 Fix typo in previous commit 2021-08-21 10:54:57 -04:00
Gnome Ann
a8bbfab87a Actually use args.breakmodel_layers 2021-08-20 20:50:03 -04:00
Gnome Ann
e00d9c4362 breakmodel fix for models without lm_head 2021-08-20 19:32:18 -04:00
Gnome Ann
8bfcf86a8b Fix for non-rotary models without "rotary" in config.json 2021-08-20 13:00:53 -04:00
henk717
68836728d4 Update World Info on Submit
Still VERY far from ideal for multiplayer, only one person can realistically edit it at a time. Whoever submits counts. Will need more major interface changes so things can be submitted one by one. But hey, it works and its good enough for a group of friends to play the game :D
2021-08-20 17:51:49 +02:00
Gnome Ann
56c9dc2c04 Fix "Expected all tensors to" on non-rotary models
Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking arugment for argument index in method wrapper_index_select)
2021-08-20 11:34:31 -04:00
Gnome Ann
5f82e5ba0d Also clear CUDA cache twice if using breakmodel 2021-08-20 11:17:34 -04:00
Gnome Ann
f986c65a4e Manually strip and decode tokens if not using a pipeline 2021-08-20 11:15:32 -04:00
Gnome Ann
7717168676 Only allow --breakmodel if it's supported 2021-08-20 10:52:57 -04:00
Gnome Ann
eef0db8dee Specifically import torch.cuda.comm in breakmodel.py 2021-08-20 10:47:54 -04:00
Gnome Ann
b1c13f832a Implement arrmansa's low VRAM patch 2021-08-20 10:25:03 -04:00
henk717
f12e3576a8 Multiple Browser Session Syncing
Multiplayer anyone? :D
2021-08-20 15:32:02 +02:00
henk717
dd77ac2f3a GPU detection bugfix 2021-08-20 12:30:52 +02:00
henk717
99c5ff240c Command Line Part 2
Automated Colab and GPU selection
2021-08-20 11:39:04 +02:00
henk717
ba20c3407c Command line support
Added command line options for model selection, this makes it usable inside Google Colab or other unattended servers people might want to use/provide.
2021-08-20 10:49:35 +02:00
henk717
136dd71171 Added --remote Mode
First step towards native Colab support, built in Cloudflare tunnels easily allows players to play KoboldAI on another device. This mode also removes buttons that would get you stuck if you have no local PC access.
2021-08-20 00:37:59 +02:00