From comfyui-node-dev
Use when asking about lazy evaluation, conditional execution, ExecutionBlocker, check_lazy_status, skipping unused inputs, preventing unnecessary computation, or "only run if needed". Triggers on "skip input", "conditional node", "don't process unless", "입력 건너뛰기", "조건부 실행".
How this skill is triggered — by the user, by Claude, or both
Slash command
/comfyui-node-dev:comfyui-lazy-evaluationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Lazy Evaluation delays input evaluation until actually needed, preventing unnecessary computation.
Lazy Evaluation delays input evaluation until actually needed, preventing unnecessary computation.
class ConditionalSwitch(io.ComfyNode):
@classmethod
def define_schema(cls):
return io.Schema(
node_id="ConditionalSwitch",
category="utils/logic",
inputs=[
io.Boolean.Input("condition", default=True),
io.Image.Input("on_true", lazy=True),
io.Image.Input("on_false", lazy=True),
],
outputs=[io.Image.Output()],
)
def check_lazy_status(self, condition, on_true=None, on_false=None):
"""Return list of inputs still needed. Empty = ready for execute()"""
needed = []
if condition and on_true is None:
needed.append("on_true")
if not condition and on_false is None:
needed.append("on_false")
return needed
@classmethod
def execute(cls, condition, on_true=None, on_false=None) -> io.NodeOutput:
return io.NodeOutput(on_true if condition else on_false)
IMPORTANT: Must be instance method (not classmethod)
# CORRECT
def check_lazy_status(self, condition, on_true=None, on_false=None):
...
# WRONG
@classmethod
def check_lazy_status(cls, condition, on_true=None, on_false=None):
...
Rules:
self (instance method)=None defaultCompletely blocks execution and all downstream nodes.
from comfy_execution.graph import ExecutionBlocker
@classmethod
def execute(cls, enabled, image) -> io.NodeOutput:
if not enabled:
return io.NodeOutput(ExecutionBlocker("Skipping execution"))
return io.NodeOutput(image)
| Feature | Lazy Evaluation | ExecutionBlocker |
|---|---|---|
| Purpose | Delay input evaluation | Block execution completely |
| Downstream | Runs (gets None) | Doesn't run |
| Where | check_lazy_status() | execute() |
def check_lazy_status(self, mode, input_a=None, input_b=None, input_c=None):
needed = []
if mode == "A" and input_a is None:
needed.append("input_a")
elif mode == "B" and input_b is None:
needed.append("input_b")
elif mode == "C" and input_c is None:
needed.append("input_c")
return needed
# WRONG: Return string instead of list
return "on_true"
# CORRECT: Return list
return ["on_true"]
# WRONG: Return None
return None
# CORRECT: Return empty list
return []
npx claudepluginhub juyeongyi/jylee_claude_marketplace --plugin comfyui-node-devCreates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.