Remove commas from preset files

This commit is contained in:
oobabooga 2023-02-11 14:54:29 -03:00
parent 144857acfe
commit b3c4657c47
18 changed files with 96 additions and 96 deletions

View file

@ -182,8 +182,8 @@ def load_preset_values(preset_menu, return_dict=False):
}
with open(Path(f'presets/{preset_menu}.txt'), 'r') as infile:
preset = infile.read()
for i in preset.split(','):
i = i.strip().split('=')
for i in preset.splitlines():
i = i.rstrip(',').strip().split('=')
if len(i) == 2 and i[0].strip() != 'tokens':
generate_params[i[0].strip()] = eval(i[1].strip())