Files
rookiepsi-comfyui-extended/scripts/preview/integer.py
T
2025-03-23 18:20:39 +05:30

30 lines
557 B
Python

class PreviewInteger:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"int": ("INT", {"forceInput": True}),
},
"hidden": {
"id": "UNIQUE_ID"
}
}
RETURN_TYPES = ()
CATEGORY = "comfyui-extended/preview"
FUNCTION = "main"
OUTPUT_NODE = True
def main(self, int, id):
from server import PromptServer
if int is None:
int = 0
PromptServer.instance.send_sync("comfyui-extended_preview", {
"id": id,
"value": str(int)
})
return ()