Mac debug
This commit is contained in:
+29
@@ -1,5 +1,6 @@
|
||||
from .brushnet_nodes import BrushNetLoader, BrushNet, BlendInpaint, PowerPaintCLIPLoader, PowerPaint, CutForInpaint
|
||||
from .raunet_nodes import RAUNet
|
||||
from subprocess import getoutput
|
||||
|
||||
"""
|
||||
@author: nullquant
|
||||
@@ -8,6 +9,32 @@ from .raunet_nodes import RAUNet
|
||||
@description: These are custom nodes for ComfyUI native implementation of BrushNet, PowerPaint and RAUNet models
|
||||
"""
|
||||
|
||||
class Terminal:
|
||||
|
||||
@classmethod
|
||||
def INPUT_TYPES(s):
|
||||
return { "required": {
|
||||
"text": ("STRING", {"multiline": True})
|
||||
}
|
||||
}
|
||||
|
||||
CATEGORY = "Tools"
|
||||
RETURN_TYPES = ("STRING", )
|
||||
RETURN_NAMES = ("text", )
|
||||
OUTPUT_NODE = True
|
||||
|
||||
FUNCTION = "execute"
|
||||
|
||||
def execute(self, text):
|
||||
if text[0] == '"' and text[-1] == '"':
|
||||
out = getoutput(f"{text[1:-1]}")
|
||||
print(out)
|
||||
else:
|
||||
exec(f"{text}")
|
||||
return (text, )
|
||||
|
||||
|
||||
|
||||
# A dictionary that contains all nodes you want to export with their names
|
||||
# NOTE: names should be globally unique
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
@@ -18,6 +45,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"PowerPaint": PowerPaint,
|
||||
"CutForInpaint": CutForInpaint,
|
||||
"RAUNet": RAUNet,
|
||||
"Terminal": Terminal,
|
||||
}
|
||||
|
||||
# A dictionary that contains the friendly/humanly readable titles for the nodes
|
||||
@@ -29,4 +57,5 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"PowerPaint": "PowerPaint",
|
||||
"CutForInpaint": "Cut For Inpaint",
|
||||
"RAUNet": "RAUNet",
|
||||
"Terminal": "Terminal",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user