From 171effc29b72f82e446797f1f134ce1b6803873d Mon Sep 17 00:00:00 2001 From: ebolam Date: Sat, 27 Aug 2022 18:25:56 -0400 Subject: [PATCH 1/3] Bug fix for saves putting actions metadata as a dict instead of a list when not used yet --- aiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index ef785313..edb75a65 100644 --- a/aiserver.py +++ b/aiserver.py @@ -270,7 +270,7 @@ class vars: setauthornotetemplate = authornotetemplate # Saved author's note template in settings andepth = 3 # How far back in history to append author's note actions = structures.KoboldStoryRegister() # Actions submitted by user and AI - actions_metadata = {} # List of dictonaries, one dictonary for every action that contains information about the action like alternative options. + actions_metadata = [] # List of dictonaries, one dictonary for every action that contains information about the action like alternative options. # Contains at least the same number of items as actions. Back action will remove an item from actions, but not actions_metadata # Dictonary keys are: # Selected Text: (text the user had selected. None when this is a newly generated action) From b5a6b44582f7cdcb059d4f5ed7ac8cb88a3ab406 Mon Sep 17 00:00:00 2001 From: ebolam Date: Sat, 27 Aug 2022 18:47:57 -0400 Subject: [PATCH 2/3] Revert "Bug fix for saves putting actions metadata as a dict instead of a list when not used yet" This reverts commit 171effc29b72f82e446797f1f134ce1b6803873d. --- aiserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiserver.py b/aiserver.py index edb75a65..ef785313 100644 --- a/aiserver.py +++ b/aiserver.py @@ -270,7 +270,7 @@ class vars: setauthornotetemplate = authornotetemplate # Saved author's note template in settings andepth = 3 # How far back in history to append author's note actions = structures.KoboldStoryRegister() # Actions submitted by user and AI - actions_metadata = [] # List of dictonaries, one dictonary for every action that contains information about the action like alternative options. + actions_metadata = {} # List of dictonaries, one dictonary for every action that contains information about the action like alternative options. # Contains at least the same number of items as actions. Back action will remove an item from actions, but not actions_metadata # Dictonary keys are: # Selected Text: (text the user had selected. None when this is a newly generated action) From 181c93424c92a1073f21486b86d792cd5732ce62 Mon Sep 17 00:00:00 2001 From: ebolam Date: Tue, 30 Aug 2022 15:10:11 -0400 Subject: [PATCH 3/3] Fix for KoboldAI API as a model option --- aiserver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aiserver.py b/aiserver.py index 2ce2afe5..bf4cfac7 100644 --- a/aiserver.py +++ b/aiserver.py @@ -1426,7 +1426,9 @@ def get_model_info(model, directory=""): gpu_names = [] for i in range(gpu_count): gpu_names.append(torch.cuda.get_device_name(i)) - if model in [x[1] for x in model_menu['apilist']]: + if model in ['Colab', 'API']: + url = True + elif model in [x[1] for x in model_menu['apilist']]: if path.exists("settings/{}.settings".format(model)): with open("settings/{}.settings".format(model), "r") as file: # Check if API key exists @@ -1439,8 +1441,6 @@ def get_model_info(model, directory=""): key = True elif model == 'ReadOnly': pass - elif model == 'Colab': - url = True elif not utils.HAS_ACCELERATE and not torch.cuda.is_available(): pass elif args.cpu: