Intergrate Native AutoEncoderKL

This commit is contained in:
layerdiffusion
2024-07-31 21:08:22 -07:00
parent 2c3afff371
commit 0d079a846d
9 changed files with 473 additions and 93 deletions

View File

@@ -3,7 +3,6 @@ import collections
from dataclasses import dataclass
from modules import paths, shared, devices, script_callbacks, sd_models, extra_networks, lowvram, sd_hijack, hashes
from backend.state_dict import map_state_dict
import glob
from copy import deepcopy
@@ -237,8 +236,7 @@ def load_vae(model, vae_file=None, vae_source="from unknown source"):
# don't call this from outside
def _load_vae_dict(model, vae_dict_1):
sd_mapped = map_state_dict(vae_dict_1, model.first_stage_model.state_dict_mapping)
model.first_stage_model.load_state_dict(sd_mapped)
model.first_stage_model.load_state_dict(vae_dict_1)
def clear_loaded_vae():