#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import Self, Any, Sequence from Interfaces.Application.AnPInterface import AnPInterface from Models.PseudoLoRAModel import PseudoLoRAModel from Utils.Common import Common from Utils.Checks import Check class PseudoLoRAsManager: def __init__(self:Self, anp:AnPInterface) -> None: self.anp:AnPInterface = anp self.__memory_cached:int = 0 self.__loras:list[PseudoLoRAModel] = [] def add(self:Self, inputs:Any|None) -> None: if isinstance(inputs, PseudoLoRAModel): self.__loras.append(inputs) else: subinputs:dict[str, Any|None]|Sequence[Any|None] for subinputs in Common.load_json(inputs, False): if Check.is_array(inputs): pass