improve error reporting on unrecognized lora models

This commit is contained in:
Lincoln Stein 2023-08-07 16:38:58 -04:00
parent 22f7cf0638
commit f0918edf98

View File

@ -322,10 +322,10 @@ class LoRACheckpointProbe(CheckpointProbeBase):
return BaseModelType.StableDiffusion1
elif token_vector_length == 1024:
return BaseModelType.StableDiffusion2
elif token_vector_length == 2048: # variant w/o the text encoder!
elif token_vector_length == 2048:
return BaseModelType.StableDiffusionXL
else:
raise InvalidModelException(f"Unknown LoRA type")
raise InvalidModelException(f"Unknown LoRA type: {self.checkpoint_path}")
class TextualInversionCheckpointProbe(CheckpointProbeBase):