diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-09 07:23:31 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-09 07:23:31 +0000 |
commit | c77c89cc83c618472ad352cf8a28fde28c3a1377 (patch) | |
tree | a5b6e4a15eee659a05b5bdc32343178ce5f9bb9a /modules/extras.py | |
parent | 050a6a798cec90ae2f881c2ddd3f0221e69907dc (diff) | |
download | stable-diffusion-webui-gfx803-c77c89cc83c618472ad352cf8a28fde28c3a1377.tar.gz stable-diffusion-webui-gfx803-c77c89cc83c618472ad352cf8a28fde28c3a1377.tar.bz2 stable-diffusion-webui-gfx803-c77c89cc83c618472ad352cf8a28fde28c3a1377.zip |
make main model loading and model merger use the same code
Diffstat (limited to 'modules/extras.py')
-rw-r--r-- | modules/extras.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/extras.py b/modules/extras.py index 1d9e64e5..ef6e6de7 100644 --- a/modules/extras.py +++ b/modules/extras.py @@ -169,9 +169,9 @@ def run_modelmerger(primary_model_name, secondary_model_name, interp_method, int print(f"Loading {secondary_model_info.filename}...")
secondary_model = torch.load(secondary_model_info.filename, map_location='cpu')
-
- theta_0 = primary_model['state_dict']
- theta_1 = secondary_model['state_dict']
+
+ theta_0 = sd_models.get_state_dict_from_checkpoint(primary_model)
+ theta_1 = sd_models.get_state_dict_from_checkpoint(secondary_model)
theta_funcs = {
"Weighted Sum": weighted_sum,
|