samskooo

Untitled

Jul 29th, 2023
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.15 KB | None | 0 0
  1. RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
  2. Missing key(s) in state_dict: "text_model.embeddings.position_ids".
  3. 21:17:40-652812 INFO python3 "networks/extract_lora_from_models.py" --save_precision bf16 --save_to "/workspace/modles/output/Tatekrd.safetensors" --model_org
  4. "/workspace/modles/Realistic_Vision_V5.0.safetensors" --model_tuned "/workspace/modles/tatekrd.ckpt" --dim 160 --device cuda --conv_dim 160
  5. 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.
  6. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
  7. 2023-07-29 21:17:43.919030: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
  8. loading SD model : /workspace/modles/Realistic_Vision_V5.0.safetensors
  9. UNet2DConditionModel: 64, 8, 768, False, False
  10. loading u-net: <All keys matched successfully>
  11. loading vae: <All keys matched successfully>
  12. loading text encoder: <All keys matched successfully>
  13. loading SD model : /workspace/modles/tatekrd.ckpt
  14. UNet2DConditionModel: 64, 8, 768, False, False
  15. loading u-net: <All keys matched successfully>
  16. loading vae: <All keys matched successfully>
  17. ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
  18. │ /workspace/kohya_ss/networks/extract_lora_from_models.py:189 in <module> │
  19. │ │
  20. │ 186 parser = setup_parser() │
  21. │ 187 │
  22. │ 188 args = parser.parse_args() │
  23. │ ❱ 189 svd(args) │
  24. │ 190 │
  25. │ │
  26. │ /workspace/kohya_ss/networks/extract_lora_from_models.py:45 in svd │
  27. │ │
  28. │ 42 print(f"loading SD model : {args.model_org}") │
  29. │ 43 text_encoder_o, _, unet_o = model_util.load_models_from_stable_diffusion_checkpoint(ar │
  30. │ 44 print(f"loading SD model : {args.model_tuned}") │
  31. │ ❱ 45 text_encoder_t, _, unet_t = model_util.load_models_from_stable_diffusion_checkpoint(ar │
  32. │ 46 │
  33. │ 47 # create LoRA network to extract weights: Use dim (rank) as alpha │
  34. │ 48 if args.conv_dim is None: │
  35. │ │
  36. │ /workspace/kohya_ss/venv/lib/python3.10/site-packages/library/model_util.py:1059 in │
  37. │ load_models_from_stable_diffusion_checkpoint │
  38. │ │
  39. │ 1056 │ │ │ torch_dtype="float32", │
  40. │ 1057 │ │ ) │
  41. │ 1058 │ │ text_model = CLIPTextModel._from_config(cfg) │
  42. │ ❱ 1059 │ │ info = text_model.load_state_dict(converted_text_encoder_checkpoint) │
  43. │ 1060 │ print("loading text encoder:", info) │
  44. │ 1061 │ │
  45. │ 1062 │ return text_model, vae, unet │
  46. │ │
  47. │ /workspace/kohya_ss/venv/lib/python3.10/site-packages/torch/nn/modules/module.py:2041 in │
  48. │ load_state_dict │
  49. │ │
  50. │ 2038 │ │ │ │ │ │ ', '.join('"{}"'.format(k) for k in missing_keys))) │
  51. │ 2039 │ │ │
  52. │ 2040 │ │ if len(error_msgs) > 0: │
  53. │ ❱ 2041 │ │ │ raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( │
  54. │ 2042 │ │ │ │ │ │ │ self.__class__.__name__, "\n\t".join(error_msgs))) │
  55. │ 2043 │ │ return _IncompatibleKeys(missing_keys, unexpected_keys) │
  56. │ 2044 │
  57. ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
  58. RuntimeError: Error(s) in loading state_dict for CLIPTextModel:
  59. Missing key(s) in state_dict: "text_model.embeddings.position_ids".
Advertisement
Add Comment
Please, Sign In to add comment