Added Delay node
This commit is contained in:
@@ -48,6 +48,7 @@ node_list = [
|
||||
"unloaders.model_unloaders_LP",
|
||||
"vlm.autotagger_LP",
|
||||
"vlm.llava_LP",
|
||||
"utils.utils_LP",
|
||||
]
|
||||
|
||||
NODE_CLASS_MAPPINGS = {}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
llama-cpp-agent>=0.2.35
|
||||
llama-cpp-agent
|
||||
mkdocs
|
||||
mkdocs-material
|
||||
mkdocstrings[python]
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
import time
|
||||
|
||||
class AnyType(str):
|
||||
def __ne__(self, __value: object) -> bool:
|
||||
return False
|
||||
|
||||
any = AnyType("*")
|
||||
|
||||
class Delay:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"input": (any, {"defaultInput": True}),
|
||||
"delay_seconds": ("FLOAT", {
|
||||
"default": 1.0,
|
||||
"min": 0.0,
|
||||
"step": 0.1
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
RETURN_TYPES = (any,)
|
||||
RETURN_NAMES = ("output",)
|
||||
FUNCTION = "add_delay"
|
||||
CATEGORY = "LevelPixel/Unloaders"
|
||||
|
||||
def add_delay(self, input, delay_seconds):
|
||||
delay_text = f"{delay_seconds:.1f} second{'s' if delay_seconds != 1 else ''}"
|
||||
print(f"[Delay Node] Starting delay of {delay_text}")
|
||||
time.sleep(delay_seconds)
|
||||
print(f"[Delay Node] Delay of {delay_text} completed")
|
||||
return (input,)
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"Delay|LP": Delay,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"Delay|LP": "Delay [LP]",
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui_level_pixel"
|
||||
description = "Various nodes of the Level Pixel company. Includes convenient advanced nodes for working with images from folders; counting files in a folder; cleaning memory; tag filters. Model Unloader, LLM Unloader (GGUF unloaders), Free memory, Tag Filters, Tag Category Filters, Tag Choice Parser, File counter, Image Loader From Path (with counters), Image Remove Background based on RemBG, Autotagger."
|
||||
version = "1.1.1"
|
||||
version = "1.1.2"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = ["torch>=2.0.1", "torchvision>=0.15.2", "pillow>=9.4.0", "numpy", "matplotlib", "scikit-build-core>=0.10.7", "rembg>=2.0.59", "onnxruntime-gpu>=1.20.0", "onnxruntime>=1.20.0", "googletrans", "langdetect", "httpcore", "deep_translator"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user