Revert settings changes

This commit is contained in:
0cc4m
2023-07-19 07:01:11 +02:00
parent 9aa6c5fbbf
commit c84d063be8

View File

@@ -1206,12 +1206,12 @@ class system_settings(settings):
local_only_variables = ['lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold',
'lua_koboldcore', 'regex_sl', 'acregex_ai', 'acregex_ui', 'comregex_ai', 'comregex_ui',
'sp', '_horde_pid', 'inference_config', 'image_pipeline',
'summarizer', 'summary_tokenizer', 'tts_model', 'rng_states', 'comregex_ai', 'comregex_ui']
'summarizer', 'summary_tokenizer', 'tts_model', 'rng_states', 'comregex_ai', 'comregex_ui', 'colab_arg']
no_save_variables = ['lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold',
'lua_koboldcore', 'sp', 'sp_length', '_horde_pid', 'horde_share', 'aibusy',
'serverstarted', 'inference_config', 'image_pipeline', 'summarizer', 'on_colab'
'summary_tokenizer', 'use_colab_tpu', 'noai', 'disable_set_aibusy', 'cloudflare_link', 'tts_model',
'generating_image', 'bit_8_available', 'bit_4_available', 'host', 'hascuda', 'usegpu', 'rng_states', 'comregex_ai', 'comregex_ui', 'git_repository', 'git_branch']
'generating_image', 'bit_8_available', 'host', 'hascuda', 'usegpu', 'rng_states', 'comregex_ai', 'comregex_ui', 'git_repository', 'git_branch', 'colab_arg']
settings_name = "system"
def __init__(self, socketio, koboldai_var):
self._socketio = socketio
@@ -1279,11 +1279,12 @@ class system_settings(settings):
self.disable_output_formatting = False
self.api_tokenizer_id = None
self.port = 5000
self.colab_arg = False
try:
import google.colab
self.on_colab = True
except:
self.on_colab = False
self.on_colab = self.colab_arg
print(f"Colab Check: {self.on_colab}, TPU: {self.use_colab_tpu}")
self.horde_share = False
self._horde_pid = None
@@ -1294,13 +1295,6 @@ class system_settings(settings):
self.keep_img_gen_in_memory = False
self.cookies = {} #cookies for colab since colab's URL changes, cookies are lost
self.experimental_features = False
# Check if repos/gptq exists for 4-bit mode
self.bit_4_available = True
try:
import gptq
except ImportError:
self.bit_4_available = False
self.seen_messages = []
self.git_repository = ""
self.git_branch = ""