Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
- Missing key(s) in state_dict: "text_model.embeddings.position_ids".
- 21:17:40-652812 INFO python3 "networks/extract_lora_from_models.py" --save_precision bf16 --save_to "/workspace/modles/output/Tatekrd.safetensors" --model_org
- "/workspace/modles/Realistic_Vision_V5.0.safetensors" --model_tuned "/workspace/modles/tatekrd.ckpt" --dim 160 --device cuda --conv_dim 160
- 2023-07-29 21:17:42.968870: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
- To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
- 2023-07-29 21:17:43.919030: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
- loading SD model : /workspace/modles/Realistic_Vision_V5.0.safetensors
- UNet2DConditionModel: 64, 8, 768, False, False
- loading u-net: <All keys matched successfully>
- loading vae: <All keys matched successfully>
- loading text encoder: <All keys matched successfully>
- loading SD model : /workspace/modles/tatekrd.ckpt
- UNet2DConditionModel: 64, 8, 768, False, False
- loading u-net: <All keys matched successfully>
- loading vae: <All keys matched successfully>
- ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
- │ /workspace/kohya_ss/networks/extract_lora_from_models.py:189 in <module> │
- │ │
- │ 186 parser = setup_parser() │
- │ 187 │
- │ 188 args = parser.parse_args() │
- │ ❱ 189 svd(args) │
- │ 190 │
- │ │
- │ /workspace/kohya_ss/networks/extract_lora_from_models.py:45 in svd │
- │ │
- │ 42 print(f"loading SD model : {args.model_org}") │
- │ 43 text_encoder_o, _, unet_o = model_util.load_models_from_stable_diffusion_checkpoint(ar │
- │ 44 print(f"loading SD model : {args.model_tuned}") │
- │ ❱ 45 text_encoder_t, _, unet_t = model_util.load_models_from_stable_diffusion_checkpoint(ar │
- │ 46 │
- │ 47 # create LoRA network to extract weights: Use dim (rank) as alpha │
- │ 48 if args.conv_dim is None: │
- │ │
- │ /workspace/kohya_ss/venv/lib/python3.10/site-packages/library/model_util.py:1059 in │
- │ load_models_from_stable_diffusion_checkpoint │
- │ │
- │ 1056 │ │ │ torch_dtype="float32", │
- │ 1057 │ │ ) │
- │ 1058 │ │ text_model = CLIPTextModel._from_config(cfg) │
- │ ❱ 1059 │ │ info = text_model.load_state_dict(converted_text_encoder_checkpoint) │
- │ 1060 │ print("loading text encoder:", info) │
- │ 1061 │ │
- │ 1062 │ return text_model, vae, unet │
- │ │
- │ /workspace/kohya_ss/venv/lib/python3.10/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 CLIPTextModel:
- Missing key(s) in state_dict: "text_model.embeddings.position_ids".
Advertisement
Add Comment
Please, Sign In to add comment