* Add support for wildcards.

* Better debug log.
* Set commands support lazy evaluation and content addition.
* Unified in one tree and processing phase.
* Supports Flux.
* Fix evaluation of string variable as truthy.
* Show invalid wildcards.
* Better detection of installed UI.
* Improved cache of results.
* Works as a ComfyUI node.
* Debug setting changed to debug level.
* Fixes in variable use.
* Added timing reporting.
* Detection of more model types.
* Installation script for requirements.
* Extension metadata for A1111.
* Lark grammar in separate file and cached.
* Improved conditions for if command.
* Avoid repeats in the processing of prompts.
* Fix multiple loading of settings.
This commit is contained in:
Antonio Cordero Balcazar
2024-08-31 14:02:46 +02:00
parent bad0d24fbe
commit 8a960df0aa
20 changed files with 3137 additions and 1660 deletions
+24
View File
@@ -0,0 +1,24 @@
from collections import OrderedDict
from typing import Tuple
class PPPLRUCache:
ProcessInput = Tuple[int, str, str]
ProcessResult = Tuple[str, str]
def __init__(self, capacity: int):
self.cache = OrderedDict()
self.capacity = capacity
def get(self, key: ProcessInput) -> ProcessResult:
if key not in self.cache:
return None
self.cache.move_to_end(key)
return self.cache[key]
def put(self, key: ProcessInput, value: ProcessResult) -> None:
self.cache[key] = value
self.cache.move_to_end(key)
if len(self.cache) > self.capacity:
self.cache.popitem(last=False)