Skip to content

Commit 7ab6042

Browse files
fix(mm): loader for clip embed
1 parent 12c3cbc commit 7ab6042

File tree

1 file changed

+0
-22
lines changed
  • invokeai/backend/model_manager/load/model_loaders

1 file changed

+0
-22
lines changed

invokeai/backend/model_manager/load/model_loaders/flux.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
from invokeai.backend.model_manager.config import (
3838
AnyModelConfig,
3939
CheckpointConfigBase,
40-
CLIPEmbedCheckpointConfig,
4140
CLIPEmbedDiffusersConfig,
4241
ControlNetCheckpointConfig,
4342
ControlNetDiffusersConfig,
@@ -131,27 +130,6 @@ def _load_model(
131130
)
132131

133132

134-
@ModelLoaderRegistry.register(base=BaseModelType.Any, type=ModelType.CLIPEmbed, format=ModelFormat.Checkpoint)
135-
class CLIPCheckpointLoader(ModelLoader):
136-
"""Class to load main models."""
137-
138-
def _load_model(
139-
self,
140-
config: AnyModelConfig,
141-
submodel_type: Optional[SubModelType] = None,
142-
) -> AnyModel:
143-
if not isinstance(config, CLIPEmbedCheckpointConfig):
144-
raise ValueError("Only CLIPEmbedCheckpointConfig models are currently supported here.")
145-
146-
match submodel_type:
147-
case SubModelType.TextEncoder:
148-
return CLIPTextModel.from_pretrained(Path(config.path), use_safetensors=True)
149-
case _:
150-
raise ValueError(
151-
f"Only TextEncoder submodels are currently supported. Received: {submodel_type.value if submodel_type else 'None'}"
152-
)
153-
154-
155133
@ModelLoaderRegistry.register(base=BaseModelType.Any, type=ModelType.T5Encoder, format=ModelFormat.BnbQuantizedLlmInt8b)
156134
class BnbQuantizedLlmInt8bCheckpointModel(ModelLoader):
157135
"""Class to load main models."""

0 commit comments

Comments
 (0)