Last active
October 28, 2025 02:25
-
-
Save CodeZombie/9e51f3859419332cc450ade019117872 to your computer and use it in GitHub Desktop.
ComfyUI Delay Node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| class DELAY: | |
| def __init__(self): | |
| pass | |
| @classmethod | |
| def INPUT_TYPES(cls): | |
| return { | |
| "required": { | |
| "model": ("MODEL",), | |
| "wait_seconds": ("INT", { | |
| "default": "30"}), | |
| }, | |
| } | |
| RETURN_TYPES = ("MODEL",) | |
| FUNCTION = "delay" | |
| CATEGORY = "utils/wtf" | |
| def delay(self, model, wait_seconds): | |
| time.sleep(wait_seconds) | |
| return (model, ) | |
| # This function would force the node to always trigger a delay, even if nothing in the workflow changed. | |
| # Not sure if that would be useful, but uncomment it if you think you need it. | |
| # def IS_CHANGED(self, model, wait_seconds): | |
| # return float("NaN") | |
| NODE_CLASS_MAPPINGS = { | |
| "Delay": DELAY | |
| } | |
| NODE_DISPLAY_NAME_MAPPINGS = { | |
| "Delay": "Delay" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment