refactor pipeline loaders to generic methods and introduce te_shared_t5 option

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-08-10 20:49:58 -04:00
parent f45e3342e6
commit 2a85c05689
22 changed files with 347 additions and 811 deletions
+3 -3
View File
@@ -7,9 +7,9 @@ def get_lora(lora: str) -> dict:
if lora not in lora_load.available_networks:
raise HTTPException(status_code=404, detail=f"Lora '{lora}' not found")
obj = lora_load.available_networks[lora]
obj.meta = obj.get_metadata()
obj.info = obj.get_info()
obj.desc = obj.get_desc()
# obj.meta = obj.get_metadata()
# obj.info = obj.get_info()
# obj.desc = obj.get_desc()
return obj.__dict__
def get_loras():
+1 -1
View File
@@ -44,7 +44,7 @@ def setup_middleware(app: FastAPI, cmd_opts):
endpoint = req.scope.get('path', 'err')
token = req.cookies.get("access-token") or req.cookies.get("access-token-unsecure")
if (cmd_opts.api_log) and endpoint.startswith('/sdapi'):
if any([endpoint.startswith(x) for x in ignore_endpoints]):
if any([endpoint.startswith(x) for x in ignore_endpoints]): # noqa C419 # pylint: disable=use-a-generator
return res
log.info('API user={user} code={code} {prot}/{ver} {method} {endpoint} {cli} {duration}'.format( # pylint: disable=consider-using-f-string, logging-format-interpolation
user = app.tokens.get(token) if hasattr(app, 'tokens') else None,