Don't overwrite --gpu_memory on boot (#1237/#1235)

This commit is contained in:
oobabooga 2023-04-15 11:58:55 -03:00
parent 72a89e8fd1
commit b9dcba7762

View File

@ -221,10 +221,11 @@ def update_model_parameters(state, initial=False):
found_positive = True
break
if found_positive:
shared.args.gpu_memory = [f"{i}MiB" for i in gpu_memories]
else:
shared.args.gpu_memory = None
if not (initial and vars(shared.args)['gpu_memory'] != vars(shared.args_defaults)['gpu_memory']):
if found_positive:
shared.args.gpu_memory = [f"{i}MiB" for i in gpu_memories]
else:
shared.args.gpu_memory = None
def get_model_specific_settings(model):