Troubles with LyCoris Extraction #1440
Unanswered
WinnerWinner-ChickenDinner
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, I'm not the greatest coder but I get by but for the life of me I can't work out what the problem is here. I cannot extract a LyCoris from any saftetensor or ckpt. Everything appears to be installed correctly except for a matching triton not being available which, since I'm on Windows, shouldn't matter.
Any help greatly appreciated.
The error I constantly get is:
C:\Users\USER\kohya_ss\tools\lycoris_locon_extract.py:129 in │
│ │
│ 126 │
│ 127 │
│ 128 if name == 'main': │
│ ❱ 129 │ main() │
│ 130 │
│ │
│ C:\Users\USER\kohya_ss\tools\lycoris_locon_extract.py:98 in main │
│ │
│ 95 def main(): │
│ 96 │ args = ARGS │
│ 97 │ base = load_models_from_stable_diffusion_checkpoint(args.is_v2, args.base_model) │
│ ❱ 98 │ db = load_models_from_stable_diffusion_checkpoint(args.is_v2, args.db_model) │
│ 99 │ │
│ 100 │ linear_mode_param = { │
│ 101 │ │ 'fixed': args.linear_dim, │
│ │
│ C:\Users\USER\kohya_ss\venv\lib\site-packages\lycoris\kohya\model_utils.py:1003 in │
│ load_models_from_stable_diffusion_checkpoint │
│ │
│ 1000 │ converted_vae_checkpoint = convert_ldm_vae_checkpoint(state_dict, vae_config) │
│ 1001 │ │
│ 1002 │ vae = AutoencoderKL(**vae_config).to(device) │
│ ❱ 1003 │ info = vae.load_state_dict(converted_vae_checkpoint) │
│ 1004 │ print("loading vae:", info) │
│ 1005 │ │
│ 1006 │ # convert text_model │
│ │
│ C:\Users\USER\kohya_ss\venv\lib\site-packages\torch\nn\modules\module.py:2041 in │
│ load_state_dict │
│ │
│ 2038 │ │ │ │ │ │ ', '.join('"{}"'.format(k) for k in missing_keys))) │
│ 2039 │ │ │
│ 2040 │ │ if len(error_msgs) > 0: │
│ ❱ 2041 │ │ │ raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( │
│ 2042 │ │ │ │ │ │ │ self.class.name, "\n\t".join(error_msgs))) │
│ 2043 │ │ return _IncompatibleKeys(missing_keys, unexpected_keys) │
│ 2044 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Error(s) in loading state_dict for AutoencoderKL:
Missing key(s) in state_dict: "encoder.mid_block.attentions.0.to_q.weight",
"encoder.mid_block.attentions.0.to_q.bias", "encoder.mid_block.attentions.0.to_k.weight",
"encoder.mid_block.attentions.0.to_k.bias", "encoder.mid_block.attentions.0.to_v.weight",
"encoder.mid_block.attentions.0.to_v.bias", "decoder.mid_block.attentions.0.to_q.weight",
"decoder.mid_block.attentions.0.to_q.bias", "decoder.mid_block.attentions.0.to_k.weight",
"decoder.mid_block.attentions.0.to_k.bias", "decoder.mid_block.attentions.0.to_v.weight",
"decoder.mid_block.attentions.0.to_v.bias".
Unexpected key(s) in state_dict: "encoder.mid_block.attentions.0.to_to_k.bias",
"encoder.mid_block.attentions.0.to_to_k.weight", "encoder.mid_block.attentions.0.to_to_q.bias",
"encoder.mid_block.attentions.0.to_to_q.weight", "encoder.mid_block.attentions.0.to_to_v.bias",
"encoder.mid_block.attentions.0.to_to_v.weight", "decoder.mid_block.attentions.0.to_to_k.bias",
"decoder.mid_block.attentions.0.to_to_k.weight", "decoder.mid_block.attentions.0.to_to_q.bias",
"decoder.mid_block.attentions.0.to_to_q.weight", "decoder.mid_block.attentions.0.to_to_v.bias",
"decoder.mid_block.attentions.0.to_to_v.weight".
Beta Was this translation helpful? Give feedback.
All reactions