Open neggles opened 6 months ago
Same question! Have you handle this? Thank you !
Any update?
I'm having the same issue,Have you handle it?
Does anyone have an alternative?
You could replace the function alltogether
def apply_ckpt(self, ckpt: Union[None, str, dict]):
if ckpt is None:
return
if ckpt.endswith("ckpt"):
sd = torch.load(ckpt, map_location="cpu")["state_dict"]
elif ckpt.endswith("safetensors"):
sd = load_safetensors(ckpt)
else:
raise NotImplementedError
missing, unexpected = self.load_state_dict(sd, strict=False)
print(
f"Restored from {ckpt} with {len(missing)} missing and {len(unexpected)} unexpected keys"
)
if len(missing) > 0:
print(f"Missing Keys: {missing}")
if len(unexpected) > 0:
print(f"Unexpected Keys: {unexpected}")
alleged to exist:
https://github.com/Stability-AI/generative-models/blob/9d759324e914de6c96dbd1468b3a4a50243c6528/sgm/models/autoencoder.py#L49-L58
but he is not present:![image](https://github.com/Stability-AI/generative-models/assets/4232981/b4980f4a-06b3-4b2a-bb5c-1e9c2e5fc10c)
when will my
CheckpointEngine
return from war?