Added Delay node

This commit is contained in:
Level Pixel Dev
2025-02-03 18:34:00 +06:00
parent 845f2fbc91
commit 1097b19732
4 changed files with 45 additions and 2 deletions
+1
View File
@@ -48,6 +48,7 @@ node_list = [
"unloaders.model_unloaders_LP",
"vlm.autotagger_LP",
"vlm.llava_LP",
"utils.utils_LP",
]
NODE_CLASS_MAPPINGS = {}
+1 -1
View File
@@ -1,4 +1,4 @@
llama-cpp-agent>=0.2.35
llama-cpp-agent
mkdocs
mkdocs-material
mkdocstrings[python]
+42
View File
@@ -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
View File
@@ -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"]