This commit is contained in:
Vladimir Mandic
2023-07-31 11:36:51 +02:00
parent 1524365284
commit 2cf4014040
4 changed files with 15 additions and 5 deletions
+12 -2
View File
@@ -141,12 +141,22 @@ def create_ui():
model_checkhash_btn = gr.Button(value="Calculate hash for all models (may take a long time)", variant='primary')
model_checkhash_btn.click(fn=sd_models.update_model_hashes, inputs=[], outputs=[models_outcome])
with gr.Row():
model_table = gr.DataFrame(model_data, label = 'Model data', show_label = True, interactive = False, wrap = True, overflow_row_behaviour = 'paginate', max_rows = 10, headers = model_headers)
model_table = gr.DataFrame(
data = model_data,
headers = model_headers,
label = 'Model data',
show_label = True,
interactive = False,
wrap = True,
overflow_row_behaviour = 'paginate',
max_rows = 50,
)
def list_models():
total_size = 0
model_data.clear()
txt = ''
for m in sd_models.checkpoints_list.values():
txt = ''
try:
stat = os.stat(m.filename)
m_name = m.name.replace('.ckpt', '').replace('.safetensors', '')