Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AUTOMATIC1111/stable-diffusion-webui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a1e06c1f20985c238d9f2c110384303cd1b7363d
Choose a base ref
..
head repository: AUTOMATIC1111/stable-diffusion-webui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 95cb492e4106646450480ec74014c3ec9a679c1f
Choose a head ref
Showing with 3 additions and 2 deletions.
  1. +3 −2 modules/extras.py
5 changes: 3 additions & 2 deletions modules/extras.py
Original file line number Diff line number Diff line change
@@ -242,9 +242,10 @@ def filename_nothing():
shared.state.textinfo = "Saving"
print(f"Saving to {output_modelname}...")

metadata = {"format": "pt", "sd_merge_models": {}, "sd_merge_recipe": "null"}
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,
@@ -278,7 +279,7 @@ def add_model_metadata(checkpoint_info):
if tertiary_model_info:
add_model_metadata(tertiary_model_info)

metadata["sd_merge_models"] = json.dumps(metadata.get("sd_merge_models", {}))
metadata["sd_merge_models"] = json.dumps(metadata["sd_merge_models"])

_, extension = os.path.splitext(output_modelname)
if extension.lower() == ".safetensors":