mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Automatically filter by loader (closes #4072)
This commit is contained in:
parent
63de9eb24f
commit
b973b91d73
@ -44,6 +44,7 @@ else:
|
||||
def list_model_elements():
|
||||
elements = [
|
||||
'loader',
|
||||
'filter_by_loader',
|
||||
'cpu_memory',
|
||||
'auto_devices',
|
||||
'disk',
|
||||
|
@ -149,24 +149,27 @@ def create_event_handlers():
|
||||
ui.apply_interface_values, gradio('interface_state'), gradio(ui.list_interface_input_elements()), show_progress=False).then(
|
||||
update_model_parameters, gradio('interface_state'), None).then(
|
||||
load_model_wrapper, gradio('model_menu', 'loader', 'autoload_model'), gradio('model_status'), show_progress=False).success(
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length'))
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length')).then(
|
||||
lambda x: x, gradio('loader'), gradio('filter_by_loader'))
|
||||
|
||||
shared.gradio['load_model'].click(
|
||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||
update_model_parameters, gradio('interface_state'), None).then(
|
||||
partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False).success(
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length'))
|
||||
|
||||
shared.gradio['unload_model'].click(
|
||||
unload_model, None, None).then(
|
||||
lambda: "Model unloaded", None, gradio('model_status'))
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length')).then(
|
||||
lambda x: x, gradio('loader'), gradio('filter_by_loader'))
|
||||
|
||||
shared.gradio['reload_model'].click(
|
||||
unload_model, None, None).then(
|
||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||
update_model_parameters, gradio('interface_state'), None).then(
|
||||
partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False).success(
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length'))
|
||||
update_truncation_length, gradio('truncation_length', 'interface_state'), gradio('truncation_length')).then(
|
||||
lambda x: x, gradio('loader'), gradio('filter_by_loader'))
|
||||
|
||||
shared.gradio['unload_model'].click(
|
||||
unload_model, None, None).then(
|
||||
lambda: "Model unloaded", None, gradio('model_status'))
|
||||
|
||||
shared.gradio['save_model_settings'].click(
|
||||
ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(
|
||||
|
@ -77,6 +77,7 @@ def create_interface():
|
||||
'instruction_template': shared.settings['instruction_template'],
|
||||
'prompt_menu-default': shared.settings['prompt-default'],
|
||||
'prompt_menu-notebook': shared.settings['prompt-notebook'],
|
||||
'filter_by_loader': shared.args.loader or 'All'
|
||||
})
|
||||
|
||||
if Path("cache/pfp_character.png").exists():
|
||||
|
Loading…
Reference in New Issue
Block a user