mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 01:05:09 +02:00
allow overriding kcpps values with explicit args
This commit is contained in:
+6
-1
@@ -3746,8 +3746,13 @@ def load_config_cli(filename):
|
||||
with open(filename, 'r') as f:
|
||||
config = json.load(f)
|
||||
args.istemplate = False
|
||||
raw_args = (sys.argv[1:]) #a lousy hack to allow for overriding kcpps
|
||||
for key, value in config.items():
|
||||
setattr(args, key, value)
|
||||
if f"--{key}" in raw_args:
|
||||
if key!="config":
|
||||
print(f"Overriding Config Value: {key}")
|
||||
else:
|
||||
setattr(args, key, value)
|
||||
if args.istemplate:
|
||||
print("\nA .kcppt template was selected from CLI - automatically selecting your backend...")
|
||||
auto_set_backend_cli()
|
||||
|
||||
Reference in New Issue
Block a user