Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#2227 from papuSpartan/master
Browse files Browse the repository at this point in the history
Refresh list of models/ckpts upon hitting restart gradio in the setti…
  • Loading branch information
AUTOMATIC1111 authored Oct 11, 2022
2 parents e0ee5bf + d01a2d0 commit f7e86aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,7 @@ def request_restart():
shared.state.interrupt()
settings_interface.gradio_ref.do_restart = True


restart_gradio.click(
fn=request_restart,
inputs=[],
Expand Down
2 changes: 2 additions & 0 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def sigint_handler(sig, frame):
modules.scripts.reload_scripts(os.path.join(script_path, "scripts"))
print('Reloading modules: modules.ui')
importlib.reload(modules.ui)
print('Refreshing Model List')
modules.sd_models.list_models()
print('Restarting Gradio')


Expand Down

0 comments on commit f7e86aa

Please sign in to comment.