From 95cb492e4106646450480ec74014c3ec9a679c1f Mon Sep 17 00:00:00 2001 From: Weiming Date: Wed, 17 May 2023 21:25:50 +0800 Subject: [PATCH] Fixed: #10460 --- modules/extras.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/extras.py b/modules/extras.py index bdf9b3b7a..aabb3b262 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -242,9 +242,10 @@ def run_modelmerger(id_task, primary_model_name, secondary_model_name, tertiary_ shared.state.textinfo = "Saving" print(f"Saving to {output_modelname}...") - metadata = {"format": "pt", "sd_merge_models": {}, "sd_merge_recipe": None} + metadata = None if save_metadata: + metadata = {"format": "pt", "sd_merge_models": {}} merge_recipe = { "type": "webui", # indicate this model was merged with webui's built-in merger "primary_model_hash": primary_model_info.sha256,