mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
fix for arguments being ignored
This commit is contained in:
17
aiserver.py
17
aiserver.py
@@ -1040,7 +1040,14 @@ def general_startup(override_args=None):
|
|||||||
args = parser.parse_args(shlex.split(os.environ["KOBOLDAI_ARGS"]))
|
args = parser.parse_args(shlex.split(os.environ["KOBOLDAI_ARGS"]))
|
||||||
else:
|
else:
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
#load system and user settings
|
||||||
|
for setting in ['user_settings', 'system_settings']:
|
||||||
|
if os.path.exists("settings/{}.v2_settings".format(setting)):
|
||||||
|
with open("settings/{}.v2_settings".format(setting), "r") as settings_file:
|
||||||
|
getattr(koboldai_vars, "_{}".format(setting)).from_json(settings_file.read())
|
||||||
|
|
||||||
|
|
||||||
temp = [x for x in vars(args)]
|
temp = [x for x in vars(args)]
|
||||||
for arg in temp:
|
for arg in temp:
|
||||||
if arg == "path":
|
if arg == "path":
|
||||||
@@ -1102,7 +1109,9 @@ def general_startup(override_args=None):
|
|||||||
koboldai_vars.host = True;
|
koboldai_vars.host = True;
|
||||||
|
|
||||||
if args.host:
|
if args.host:
|
||||||
|
print("setting host")
|
||||||
koboldai_vars.host = True;
|
koboldai_vars.host = True;
|
||||||
|
print("koboldai_vars.host: {}".format(koboldai_vars.host))
|
||||||
|
|
||||||
if args.cpu:
|
if args.cpu:
|
||||||
koboldai_vars.use_colab_tpu = False
|
koboldai_vars.use_colab_tpu = False
|
||||||
@@ -1132,11 +1141,6 @@ def general_startup(override_args=None):
|
|||||||
koboldai_settings.queue = multiprocessing.Queue()
|
koboldai_settings.queue = multiprocessing.Queue()
|
||||||
socketio.start_background_task(socket_io_relay, koboldai_settings.queue, socketio)
|
socketio.start_background_task(socket_io_relay, koboldai_settings.queue, socketio)
|
||||||
|
|
||||||
#load system and user settings
|
|
||||||
for setting in ['user_settings', 'system_settings']:
|
|
||||||
if os.path.exists("settings/{}.v2_settings".format(setting)):
|
|
||||||
with open("settings/{}.v2_settings".format(setting), "r") as settings_file:
|
|
||||||
getattr(koboldai_vars, "_{}".format(setting)).from_json(settings_file.read())
|
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
# Load Model
|
# Load Model
|
||||||
@@ -10501,7 +10505,6 @@ if __name__ == "__main__":
|
|||||||
print("{0}Webserver has started, you can now connect to this machine at port {1}{2}"
|
print("{0}Webserver has started, you can now connect to this machine at port {1}{2}"
|
||||||
.format(colors.GREEN, port, colors.END))
|
.format(colors.GREEN, port, colors.END))
|
||||||
koboldai_vars.serverstarted = True
|
koboldai_vars.serverstarted = True
|
||||||
|
|
||||||
socketio.run(app, host='0.0.0.0', port=port)
|
socketio.run(app, host='0.0.0.0', port=port)
|
||||||
else:
|
else:
|
||||||
if args.unblock:
|
if args.unblock:
|
||||||
|
@@ -705,7 +705,7 @@ class user_settings(settings):
|
|||||||
|
|
||||||
class system_settings(settings):
|
class system_settings(settings):
|
||||||
local_only_variables = ['socketio', 'lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold', 'lua_koboldcore', 'regex_sl', 'acregex_ai', 'acregex_ui', 'comregex_ai', 'comregex_ui', 'sp', '_horde_pid']
|
local_only_variables = ['socketio', 'lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold', 'lua_koboldcore', 'regex_sl', 'acregex_ai', 'acregex_ui', 'comregex_ai', 'comregex_ui', 'sp', '_horde_pid']
|
||||||
no_save_variables = ['socketio', 'lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold', 'lua_koboldcore', 'sp', '_horde_pid', 'horde_share']
|
no_save_variables = ['socketio', 'lua_state', 'lua_logname', 'lua_koboldbridge', 'lua_kobold', 'lua_koboldcore', 'sp', '_horde_pid', 'horde_share', 'aibusy', 'serverstarted']
|
||||||
settings_name = "system"
|
settings_name = "system"
|
||||||
def __init__(self, socketio):
|
def __init__(self, socketio):
|
||||||
self.socketio = socketio
|
self.socketio = socketio
|
||||||
|
Reference in New Issue
Block a user