edit : clip-vit 모델 추가
This commit is contained in:
@@ -570,6 +570,19 @@ class IndexType:
|
||||
hnsw = "hnsw"
|
||||
l2 = "l2"
|
||||
|
||||
|
||||
class VitIndexType:
|
||||
cos = "cos"
|
||||
l2 = "l2"
|
||||
|
||||
|
||||
class VitModelType:
|
||||
b32 = "b32"
|
||||
b16 = "b16"
|
||||
l14 = "l14"
|
||||
l14_336 = "l14_336"
|
||||
|
||||
|
||||
class ImageGenerateReq(BaseModel):
|
||||
"""
|
||||
### [Request] image generate request
|
||||
@@ -590,10 +603,29 @@ class VactorImageSearchReq(BaseModel):
|
||||
### [Request] vactor image search request
|
||||
"""
|
||||
prompt : str = Field(description='프롬프트', example='검은색 안경')
|
||||
index_type : str = Field(IndexType.hnsw, description='인덱스 타입', example=IndexType.hnsw)
|
||||
search_num : int = Field(4, description='검색결과 이미지 갯수', example=4)
|
||||
indexType : str = Field(IndexType.l2, description='인덱스 타입', example=IndexType.l2)
|
||||
searchNum : int = Field(4, description='검색결과 이미지 갯수', example=4)
|
||||
|
||||
|
||||
class VactorImageSearchVitReq(BaseModel):
|
||||
"""
|
||||
### [Request] vactor image search vit
|
||||
"""
|
||||
prompt : str = Field(description='프롬프트', example='검은색 안경')
|
||||
modelType : str = Field(VitModelType.l14, description='pretrained model 타입', example=VitModelType.l14)
|
||||
indexType : str = Field(VitIndexType.l2, description='인덱스 타입', example=VitIndexType.l2)
|
||||
searchNum : int = Field(4, description='검색결과 이미지 갯수', example=4)
|
||||
|
||||
|
||||
class VactorImageSearchVitReportReq(BaseModel):
|
||||
"""
|
||||
### [Request] vactor image search vit request
|
||||
"""
|
||||
prompt : str = Field(description='프롬프트', example='검은색 안경')
|
||||
modelType : str = Field(VitModelType.l14, description='pretrained model 타입', example=VitModelType.l14)
|
||||
indexType : str = Field(VitIndexType.l2, description='인덱스 타입', example=VitIndexType.l2)
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
#===============================================================================
|
||||
|
||||
Reference in New Issue
Block a user