Update model_probe to work with diffuser-format SD TI embeddings.

This commit is contained in:
Ryan Dick 2023-12-15 17:56:49 -05:00 committed by Kent Keirsey
parent 0e738c4290
commit cb698ff1fb

View File

@ -389,7 +389,7 @@ class TextualInversionCheckpointProbe(CheckpointProbeBase):
elif "clip_g" in checkpoint:
token_dim = checkpoint["clip_g"].shape[-1]
else:
token_dim = list(checkpoint.values())[0].shape[0]
token_dim = list(checkpoint.values())[0].shape[-1]
if token_dim == 768:
return BaseModelType.StableDiffusion1
elif token_dim == 1024: