Commit 7c016dd6 authored by space-nuko's avatar space-nuko

Calculate shorthash on merge if not exist

parent afc349c2
...@@ -263,6 +263,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ ...@@ -263,6 +263,7 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_
metadata["merge_recipe"] = json.dumps(merge_recipe) metadata["merge_recipe"] = json.dumps(merge_recipe)
def add_model_metadata(checkpoint_info): def add_model_metadata(checkpoint_info):
checkpoint_info.calculate_shorthash()
metadata["models"][checkpoint_info.sha256] = { metadata["models"][checkpoint_info.sha256] = {
"name": checkpoint_info.name, "name": checkpoint_info.name,
"legacy_hash": checkpoint_info.hash, "legacy_hash": checkpoint_info.hash,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment