1
0
mirror of https://github.com/vladmandic/sdnext.git synced 2026-01-29 05:02:09 +03:00

Fix: Correct model_file parameter usage for custom load button

This commit is contained in:
hypercryptoman
2025-05-19 13:45:05 +10:00
committed by GitHub
parent b23162a36b
commit ba2eaaf295

View File

@@ -446,7 +446,7 @@ class Script(scripts.Script):
model_file = gr.Textbox(label='Model file', value=None, interactive=True, elem_id='prompt_enhance_model_file', placeholder='Optional GGUF model file inside GGUF model repo')
with gr.Row():
custom_btn = gr.Button(value='Load custom model', elem_id='prompt_enhance_custom_load', variant='secondary')
custom_btn.click(fn=self.load, inputs=[model_file, model_repo, model_gguf, model_type, model_file], outputs=[]) # Note: model_file passed twice, intentional?
custom_btn.click(fn=self.load, inputs=[model_file, model_repo, model_gguf, model_type, None], outputs=[])
llm_model.change(fn=self.get_custom, inputs=[llm_model], outputs=[model_repo, model_gguf, model_type, model_file])
gr.HTML('<br>')
with gr.Accordion('Options', open=False, elem_id='prompt_enhance_options'):