File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
invokeai/backend/model_manager Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 37
37
from invokeai .backend .model_hash .hash_validator import validate_hash
38
38
from invokeai .backend .model_hash .model_hash import HASHING_ALGORITHMS
39
39
from invokeai .backend .model_manager .model_on_disk import ModelOnDisk
40
+ from invokeai .backend .model_manager .omi import stable_diffusion_xl_1_lora , flux_dev_1_lora
40
41
from invokeai .backend .model_manager .taxonomy import (
41
42
AnyVariant ,
42
43
BaseModelType ,
@@ -352,15 +353,14 @@ def matches(cls, mod: ModelOnDisk) -> bool:
352
353
@classmethod
353
354
def parse (cls , mod : ModelOnDisk ) -> dict [str , Any ]:
354
355
metadata = mod .metadata ()
355
- base_str , _ = metadata ["modelspec.architecture" ].split ("/" )
356
- base_str = base_str .lower ()
356
+ architecture = metadata ["modelspec.architecture" ]
357
357
358
- if "stable-diffusion-xl-v1-base" in base_str :
358
+ if architecture == stable_diffusion_xl_1_lora :
359
359
base = BaseModelType .StableDiffusionXL
360
- elif "flux" in base_str :
360
+ elif architecture == flux_dev_1_lora :
361
361
base = BaseModelType .Flux
362
362
else :
363
- raise InvalidModelConfigException (f"Unrecognised/unsupported base architecture for OMI LoRA: { base_str } " )
363
+ raise InvalidModelConfigException (f"Unrecognised/unsupported architecture for OMI LoRA: { architecture } " )
364
364
365
365
return {"base" : base }
366
366
You can’t perform that action at this time.
0 commit comments