Closed Kuroseji closed 1 year ago
There are a few things that could cause that, firstly I'd try redownloading the ckpt file, as sometimes it being corrupt from downloading can be the issue.
Second I'd try with a redownload the ui, in a clean folder, and if it loads from that then it's an issue with your original install. I would try redownloading the model file first though.
Thanks for the tips but neither fix worked. I'm going to assume it's an issue with the code itself and hope it get's fixed eventually. Thanks for trying though and thanks for working on this model.
I'm having a similar issue with the current model, hckpt-18. The error message I get is this:
KeyError Traceback (most recent call last)
<ipython-input-4-127af4bf47ad> in <module>
110 opt = config()
111 config = OmegaConf.load(f"{opt.config}")
--> 112 model = load_model_from_config(config, f"{opt.ckpt}")
113 model = model.to(device)
114 batch_idx = 0
<ipython-input-4-127af4bf47ad> in load_model_from_config(config, ckpt, verbose)
79 if "global_step" in pl_sd:
80 print(f"Global Step: {pl_sd['global_step']}")
---> 81 sd = pl_sd["state_dict"]
82 model = instantiate_from_config(config.model)
83 m, u = model.load_state_dict(sd, strict=False)
KeyError: 'state_dict'
16 and 17 both worked for me, so it's confusing why 18 is showing such an error. As the poster did above, I tried both methods, and even loaded the model into a Google colab. The model failed to work in all these instances due to this error.
Not sure if this is an issue with the code for my UI(I use Sygil-Dev) or an issue with the model but I can't run HD-18. Attempting to gives me the following error message. If anyone has any insight it would be greatly appreciated. HD-16 and 17 worked fine so I assume it's a change in how models are handled that my UI hasn't been updated for.