mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
Merge branch 'dev' into RUF013
This commit is contained in:
+10
-1
@@ -12,6 +12,15 @@ from modules.shared import opts, log
|
||||
extra_ui = []
|
||||
|
||||
|
||||
def update_model_hashes():
|
||||
from modules import sd_unet, sd_checkpoint
|
||||
unets = {}
|
||||
for k, v in sd_unet.unet_dict.items():
|
||||
unets[k] = sd_checkpoint.CheckpointInfo(name=k, filename=v, model_type='unet')
|
||||
yield from sd_models.update_model_hashes(unets, model_type='unet')
|
||||
yield from sd_models.update_model_hashes(model_type='checkpoint')
|
||||
|
||||
|
||||
def create_ui():
|
||||
log.debug('UI initialize: tab=models')
|
||||
dummy_component = gr.Label(visible=False)
|
||||
@@ -143,7 +152,7 @@ def create_ui():
|
||||
with gr.Row():
|
||||
model_table = gr.HTML(value='', elem_id="model_list_table")
|
||||
|
||||
model_checkhash_btn.click(fn=sd_models.update_model_hashes, inputs=[], outputs=[model_table])
|
||||
model_checkhash_btn.click(fn=update_model_hashes, inputs=[], outputs=[model_table])
|
||||
model_list_btn.click(fn=lambda: create_models_table(list(sd_models.checkpoints_list.values())), inputs=[], outputs=[model_table])
|
||||
|
||||
with gr.Tab(label="Metadata", elem_id="models_metadata_tab"):
|
||||
|
||||
Reference in New Issue
Block a user