IOPaint 플러그인 호환성을 위한 새로운 배경 제거 엔드포인트 '/api/v1/run_plugin_gen_image'를 추가하였습니다. 이 엔드포인트는 기존의 '/api/v1/remove_bg'와 동일하게 동작하며, 요청 시 모델 이름을 로그에 기록합니다.
This commit is contained in:
parent
0c78a4c6a7
commit
f2ff4697fa
|
|
@ -353,6 +353,19 @@ async def remove_background(
|
|||
)
|
||||
|
||||
|
||||
@router.post("/api/v1/run_plugin_gen_image", name="run_plugin_gen_image")
|
||||
async def run_plugin_gen_image(
|
||||
request: RemoveBGRequest,
|
||||
response_format: ResponseFormat = Query(ResponseFormat.binary, description="응답 형식"),
|
||||
image_format: ImageFormat = Query(ImageFormat.png, description="이미지 형식")
|
||||
):
|
||||
"""
|
||||
IOPaint 플러그인 호환성을 위한 배경 제거 엔드포인트입니다.
|
||||
내부적으로 /api/v1/remove_bg와 동일하게 동작합니다.
|
||||
"""
|
||||
logger.info(f"플러그인 호환 엔드포인트 '/api/v1/run_plugin_gen_image' 호출됨 (모델: {request.model_name})")
|
||||
return await remove_background(request, response_format, image_format)
|
||||
|
||||
|
||||
@router.get("/api/v1/model")
|
||||
async def get_model_info():
|
||||
|
|
|
|||
Loading…
Reference in New Issue