fixed setting different clip, removed unused stubs (#2987)

This commit is contained in:
Mert
2023-06-27 13:21:50 -04:00
committed by GitHub
parent b3e97a1a0c
commit 4d3ce0a65e
5 changed files with 6 additions and 25 deletions

View File

@@ -25,13 +25,3 @@ class CLIPSTEncoder(InferenceModel):
def predict(self, image_or_text: Image | str) -> list[float]:
return self.model.encode(image_or_text).tolist()
# stubs to allow different behavior between the two in the future
# and handle loading different image and text clip models
class CLIPSTVisionEncoder(CLIPSTEncoder):
_model_type = ModelType.CLIP_VISION
class CLIPSTTextEncoder(CLIPSTEncoder):
_model_type = ModelType.CLIP_TEXT