Convert wan lora weights on save to be something comfy can handle

This commit is contained in:
Jaret Burkett
2025-03-08 12:55:11 -07:00
parent 7e37918fbc
commit e6739f7eb2
8 changed files with 108 additions and 5 deletions

View File

@@ -3061,3 +3061,11 @@ class StableDiffusion:
encoder.to(*args, **kwargs)
else:
self.text_encoder.to(*args, **kwargs)
def convert_lora_weights_before_save(self, state_dict):
# can be overridden in child classes to convert weights before saving
return state_dict
def convert_lora_weights_before_load(self, state_dict):
# can be overridden in child classes to convert weights before loading
return state_dict