mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-24 17:06:53 +01:00
UI: minor optimization
This commit is contained in:
parent
e1085180cf
commit
79e8dbe45f
@ -116,6 +116,7 @@ def list_model_elements():
|
|||||||
'hqq_backend',
|
'hqq_backend',
|
||||||
'cpp_runner',
|
'cpp_runner',
|
||||||
]
|
]
|
||||||
|
|
||||||
if is_torch_xpu_available():
|
if is_torch_xpu_available():
|
||||||
for i in range(torch.xpu.device_count()):
|
for i in range(torch.xpu.device_count()):
|
||||||
elements.append(f'gpu_memory_{i}')
|
elements.append(f'gpu_memory_{i}')
|
||||||
@ -214,9 +215,11 @@ def list_interface_input_elements():
|
|||||||
|
|
||||||
|
|
||||||
def gather_interface_values(*args):
|
def gather_interface_values(*args):
|
||||||
|
interface_elements = list_interface_input_elements()
|
||||||
|
|
||||||
output = {}
|
output = {}
|
||||||
for i, element in enumerate(list_interface_input_elements()):
|
for element, value in zip(interface_elements, args):
|
||||||
output[element] = args[i]
|
output[element] = value
|
||||||
|
|
||||||
if not shared.args.multi_user:
|
if not shared.args.multi_user:
|
||||||
shared.persistent_interface_state = output
|
shared.persistent_interface_state = output
|
||||||
|
Loading…
Reference in New Issue
Block a user