From ba2eaaf2951b5244223fa00a487473b4d2dd419d Mon Sep 17 00:00:00 2001 From: hypercryptoman <110080854+hypercryptoman@users.noreply.github.com> Date: Mon, 19 May 2025 13:45:05 +1000 Subject: [PATCH] Fix: Correct model_file parameter usage for custom load button --- scripts/prompt_enhance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prompt_enhance.py b/scripts/prompt_enhance.py index fe2ea0851..45e2ab46f 100644 --- a/scripts/prompt_enhance.py +++ b/scripts/prompt_enhance.py @@ -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('
') with gr.Accordion('Options', open=False, elem_id='prompt_enhance_options'):