diff --git a/backend/loader.py b/backend/loader.py index 7efd2aa7..7a6f86ed 100644 --- a/backend/loader.py +++ b/backend/loader.py @@ -53,6 +53,8 @@ def load_huggingface_component(guess, component_name, lib_name, cls_name, repo_p with using_forge_operations(device=memory_management.cpu, dtype=memory_management.vae_dtype()): model = IntegratedAutoencoderKL.from_config(config) + if 'decoder.up_blocks.0.resnets.0.norm1.weight' in state_dict.keys(): #diffusers format + state_dict = huggingface_guess.diffusers_convert.convert_vae_state_dict(state_dict) load_state_dict(model, state_dict, ignore_start='loss.') return model if component_name.startswith('text_encoder') and cls_name in ['CLIPTextModel', 'CLIPTextModelWithProjection']: