mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-01-26 11:19:53 +00:00
fix: /adetailer/v1/schema pydantic v2
This commit is contained in:
@@ -1047,6 +1047,8 @@ def add_api_endpoints(_: gr.Blocks, app: FastAPI):
|
||||
|
||||
@app.get("/adetailer/v1/schema")
|
||||
async def schema():
|
||||
if hasattr(ADetailerArgs, "model_json_schema"):
|
||||
return ADetailerArgs.model_json_schema()
|
||||
return ADetailerArgs.schema()
|
||||
|
||||
@app.get("/adetailer/v1/ad_model")
|
||||
|
||||
Reference in New Issue
Block a user