Added ability to add labels that are based on validation data in model loading settings

This commit is contained in:
ebolam
2023-05-26 12:43:17 -04:00
parent 0376ab5715
commit 51cea7eb9d
5 changed files with 71 additions and 3 deletions

View File

@@ -77,6 +77,18 @@ class HFInferenceModel(InferenceModel):
break_values += [0] * (gpu_count - len(break_values))
if disk_blocks is not None:
break_values += [int(disk_blocks)]
requested_parameters.append({
"uitype": "Valid Display",
"unit": "text",
"label": "Current Allocated Layers: %1/{}".format(layer_count), #%1 will be the validation value
"id": "valid_layers",
"max": layer_count,
"step": 1,
"check": {"sum": ["{}_Layers".format(i) for i in range(gpu_count)]+['CPU_Layers']+(['Disk_Layers'] if disk_blocks is not None else []), "value": layer_count, 'check': "="},
"menu_path": "Layers",
"extra_classes": "",
"refresh_model_inputs": False
})
for i in range(gpu_count):
requested_parameters.append({
"uitype": "slider",