add custom script body only refresh option

This commit is contained in:
DepFA 2022-10-02 01:19:55 +01:00 committed by GitHub
parent cf33268d68
commit 07e40ad7f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1012,6 +1012,17 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo, run_modelmerger):
outputs=[], outputs=[],
_js='function(){restart_reload()}' _js='function(){restart_reload()}'
) )
def reload_scripts():
modules.scripts.reload_script_body_only()
reload_script_bodies = gr.Button(value='Reload custom script bodies (No ui updates, No restart)', variant='primary')
reload_script_bodies.click(
fn=reload_scripts,
inputs=[],
outputs=[],
_js='function(){}'
)
if column is not None: if column is not None:
column.__exit__() column.__exit__()