mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 09:38:23 +02:00
@@ -1,3 +1,4 @@
|
||||
from typing import List
|
||||
from fastapi.exceptions import HTTPException
|
||||
|
||||
|
||||
@@ -19,3 +20,10 @@ def get_loras():
|
||||
def post_refresh_loras():
|
||||
from modules.lora import lora_load
|
||||
return lora_load.list_available_networks()
|
||||
|
||||
|
||||
def register_api():
|
||||
from modules.shared import api
|
||||
api.add_api_route("/sdapi/v1/lora", get_lora, methods=["GET"], response_model=dict)
|
||||
api.add_api_route("/sdapi/v1/loras", get_loras, methods=["GET"], response_model=List[dict])
|
||||
api.add_api_route("/sdapi/v1/refresh-loras", post_refresh_loras, methods=["POST"])
|
||||
|
||||
Reference in New Issue
Block a user