mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-03-12 01:20:15 +01:00
Merge pull request #194 from ebolam/united
Fix for KoboldAI API as a model option
This commit is contained in:
commit
c5caa03e5b
@ -1426,7 +1426,9 @@ def get_model_info(model, directory=""):
|
|||||||
gpu_names = []
|
gpu_names = []
|
||||||
for i in range(gpu_count):
|
for i in range(gpu_count):
|
||||||
gpu_names.append(torch.cuda.get_device_name(i))
|
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)):
|
if path.exists("settings/{}.settings".format(model)):
|
||||||
with open("settings/{}.settings".format(model), "r") as file:
|
with open("settings/{}.settings".format(model), "r") as file:
|
||||||
# Check if API key exists
|
# Check if API key exists
|
||||||
@ -1439,8 +1441,6 @@ def get_model_info(model, directory=""):
|
|||||||
key = True
|
key = True
|
||||||
elif model == 'ReadOnly':
|
elif model == 'ReadOnly':
|
||||||
pass
|
pass
|
||||||
elif model == 'Colab':
|
|
||||||
url = True
|
|
||||||
elif not utils.HAS_ACCELERATE and not torch.cuda.is_available():
|
elif not utils.HAS_ACCELERATE and not torch.cuda.is_available():
|
||||||
pass
|
pass
|
||||||
elif args.cpu:
|
elif args.cpu:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user