Skip to content

Commit

Permalink
Support saving some more modelspec types.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed May 14, 2024
1 parent cf6e1ef commit 2de3b69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion comfy_extras/nodes_model_merging.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,14 @@ def save_checkpoint(model, clip=None, vae=None, clip_vision=None, filename_prefi

enable_modelspec = True
if isinstance(model.model, comfy.model_base.SDXL):
metadata["modelspec.architecture"] = "stable-diffusion-xl-v1-base"
if isinstance(model.model, comfy.model_base.SDXL_instructpix2pix):
metadata["modelspec.architecture"] = "stable-diffusion-xl-v1-edit"
else:
metadata["modelspec.architecture"] = "stable-diffusion-xl-v1-base"
elif isinstance(model.model, comfy.model_base.SDXLRefiner):
metadata["modelspec.architecture"] = "stable-diffusion-xl-v1-refiner"
elif isinstance(model.model, comfy.model_base.SVD_img2vid):
metadata["modelspec.architecture"] = "stable-video-diffusion-img2vid-v1"
else:
enable_modelspec = False

Expand Down

0 comments on commit 2de3b69

Please sign in to comment.