Settings menu modularized.

Help text added to settings items.
Settings now saved to client file when changed.
Separated transformers settings and InferKit settings.
Reorganized model select list.
This commit is contained in:
KoboldAI Dev
2021-05-07 14:32:10 -04:00
parent ade5be39fb
commit d632976fbf
7 changed files with 479 additions and 226 deletions

19
utils.py Normal file
View File

@ -0,0 +1,19 @@
from threading import Timer
def debounce(wait):
def decorator(fun):
def debounced(*args, **kwargs):
def call_it():
fun(*args, **kwargs)
try:
debounced.t.cancel()
except AttributeError:
pass
debounced.t = Timer(wait, call_it)
debounced.t.start()
return debounced
return decorator