mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-01-23 21:54:11 +01:00
d632976fbf
Help text added to settings items. Settings now saved to client file when changed. Separated transformers settings and InferKit settings. Reorganized model select list.
19 lines
420 B
Python
19 lines
420 B
Python
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 |