Advertisement
Guest User

ComfyUI custom node barebone

a guest
Jan 2nd, 2024
1,352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | Software | 0 0
  1. class NodeKO:
  2.     def __init__(self):
  3.         pass
  4.    
  5.     @classmethod
  6.     def INPUT_TYPES(s):
  7.     return {
  8.             "required": {
  9.                 "text": ("STRING", {"default":"Hey Hey!"}),
  10.                 "text2": ("STRING", {"forceInput" True}),              
  11.             },
  12.         }
  13.  
  14.     RETURN_TYPES = ("STRING","INT", "FLOAT", 'LATENT', "CONDITIONING", "IMAGE", "MODEL")
  15.     RETURN_NAMES = ("TxtO", "IntO", "FloatO", "Latent output. Really cool, huh?", "A condition" , "Our image." , "Mo mo modell!!!")
  16.  
  17.     FUNCTION = "test"
  18.  
  19.     #OUTPUT_NODE = False
  20.  
  21.     CATEGORY = "nodeKO"
  22.  
  23.     def test(self):
  24.         return ()
  25.  
  26.  
  27. # A dictionary that contains all nodes you want to export with their names
  28. # NOTE: names should be globally unique
  29. NODE_CLASS_MAPPINGS = {
  30.     "My KO Node": MyNode
  31. }
  32.  
  33. # A dictionary that contains the friendly/humanly readable titles for the nodes
  34. NODE_DISPLAY_NAME_MAPPINGS = {
  35.     "FirstNode": "My First Node"
  36. }
  37.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement