Allow model config to preprocess the vae state dict on load.

This commit is contained in:
comfyanonymous
2023-11-21 16:29:18 -05:00
parent d66b631d74
commit 6a491ebe27
2 changed files with 4 additions and 0 deletions

View File

@@ -56,6 +56,9 @@ class BASE:
def process_unet_state_dict(self, state_dict):
return state_dict
def process_vae_state_dict(self, state_dict):
return state_dict
def process_clip_state_dict_for_saving(self, state_dict):
replace_prefix = {"": "cond_stage_model."}
return utils.state_dict_prefix_replace(state_dict, replace_prefix)