From 9dc9966433eede7fe9e1472ab93d0a17d848dcba Mon Sep 17 00:00:00 2001 From: scott-ca <59944183+scott-ca@users.noreply.github.com> Date: Sat, 23 Jul 2022 22:02:03 -0600 Subject: [PATCH 01/11] Added functionality to add any/all args via json --- aiserver.py | 9 +++++++++ customsettings_template.json | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 customsettings_template.json diff --git a/aiserver.py b/aiserver.py index 9d34fe9c..87283f6a 100644 --- a/aiserver.py +++ b/aiserver.py @@ -1044,6 +1044,7 @@ def general_startup(override_args=None): parser.add_argument("--no_aria2", action='store_true', default=False, help="Prevents KoboldAI from using aria2 to download huggingface models more efficiently, in case aria2 is causing you issues") parser.add_argument("--lowmem", action='store_true', help="Extra Low Memory loading for the GPU, slower but memory does not peak to twice the usage") parser.add_argument("--savemodel", action='store_true', help="Saves the model to the models folder even if --colab is used (Allows you to save models to Google Drive)") + parser.add_argument("--customsettings", help="Preloads arguements from json file. You only need to provide the location of the json file. Use customsettings.json template file. It can be renamed if you wish so that you can store multiple configurations. Leave any settings you want as default as null. Any values you wish to set need to be in double quotation marks") #args: argparse.Namespace = None if "pytest" in sys.modules and override_args is None: args = parser.parse_args([]) @@ -1057,6 +1058,14 @@ def general_startup(override_args=None): else: args = parser.parse_args() + if args.customsettings: + f = open (args.customsettings) + importedsettings = json.load(f) + for items in importedsettings: + if importedsettings[items] is not None: + setattr(args, items, importedsettings[items]) + f.close() + vars.model = args.model; vars.revision = args.revision diff --git a/customsettings_template.json b/customsettings_template.json new file mode 100644 index 00000000..876af058 --- /dev/null +++ b/customsettings_template.json @@ -0,0 +1,3 @@ +{"aria2_port":null, "breakmodel":null, "breakmodel_disklayers":null, "breakmodel_gpulayers":null, "breakmodel_layers":null, "colab":null, "configname":null, "cpu":null, "host":null, "localtunnel":null, "lowmem":null, "model":null, "ngrok":null, "no_aria2":null, "noaimenu":null, "nobreakmodel":null, "override_delete":null, "override_rename":null, "path":null, "port":null, "quiet":null, "remote":null, "revision":null, "savemodel":null, "unblock":null} + + From ce2efa01490e057c37917fb12d07e0f6be5121e6 Mon Sep 17 00:00:00 2001 From: scott-ca <59944183+scott-ca@users.noreply.github.com> Date: Sat, 23 Jul 2022 22:06:56 -0600 Subject: [PATCH 02/11] Update customsettings_template.json --- customsettings_template.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/customsettings_template.json b/customsettings_template.json index 876af058..361ca4e6 100644 --- a/customsettings_template.json +++ b/customsettings_template.json @@ -1,3 +1 @@ {"aria2_port":null, "breakmodel":null, "breakmodel_disklayers":null, "breakmodel_gpulayers":null, "breakmodel_layers":null, "colab":null, "configname":null, "cpu":null, "host":null, "localtunnel":null, "lowmem":null, "model":null, "ngrok":null, "no_aria2":null, "noaimenu":null, "nobreakmodel":null, "override_delete":null, "override_rename":null, "path":null, "port":null, "quiet":null, "remote":null, "revision":null, "savemodel":null, "unblock":null} - - From 4d8a6333512b4a4d25987b348c34126cb0f65280 Mon Sep 17 00:00:00 2001 From: Henk Date: Tue, 26 Jul 2022 00:41:51 +0200 Subject: [PATCH 03/11] Aetherroom instead of aidg.club --- aiserver.py | 2 +- templates/index.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aiserver.py b/aiserver.py index ff0ea1a0..f61c5c29 100644 --- a/aiserver.py +++ b/aiserver.py @@ -5352,7 +5352,7 @@ def importgame(): def importAidgRequest(id): exitModes() - urlformat = "https://prompts.aidg.club/api/" + urlformat = "https://aetherroom.club/api/" req = requests.get(urlformat+id) if(req.status_code == 200): diff --git a/templates/index.html b/templates/index.html index 36264e7a..80481543 100644 --- a/templates/index.html +++ b/templates/index.html @@ -62,7 +62,7 @@