mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-28 18:48:04 +01:00
Fix command-line arguments being ignored
This commit is contained in:
parent
ff5d3d2d09
commit
5075087461
@ -96,7 +96,7 @@ def update_model_parameters(state, initial=False):
|
|||||||
gpu_memories.append(value)
|
gpu_memories.append(value)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if initial and vars(shared.args)[element] != vars(shared.args_defaults)[element]:
|
if initial and element in shared.provided_arguments:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Setting null defaults
|
# Setting null defaults
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@ -6,7 +7,6 @@ import yaml
|
|||||||
|
|
||||||
from modules.logging_colors import logger
|
from modules.logging_colors import logger
|
||||||
|
|
||||||
|
|
||||||
# Model variables
|
# Model variables
|
||||||
model = None
|
model = None
|
||||||
tokenizer = None
|
tokenizer = None
|
||||||
@ -187,6 +187,11 @@ parser.add_argument('--multimodal-pipeline', type=str, default=None, help='The m
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
args_defaults = parser.parse_args([])
|
args_defaults = parser.parse_args([])
|
||||||
|
provided_arguments = []
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
arg = arg.lstrip('-').replace('-', '_')
|
||||||
|
if hasattr(args, arg):
|
||||||
|
provided_arguments.append(arg)
|
||||||
|
|
||||||
# Deprecation warnings
|
# Deprecation warnings
|
||||||
for k in ['chat', 'notebook', 'no_stream']:
|
for k in ['chat', 'notebook', 'no_stream']:
|
||||||
|
Loading…
Reference in New Issue
Block a user