Files
mang01010-MangoNodePack/PromptMango.py
T
mango1010 fa7a20777a Update PromptMango.py
String connector is no longer mandatory in new version of Comfy
2025-03-10 23:17:03 +01:00

55 lines
1.4 KiB
Python

class PromptMango:
@classmethod
def INPUT_TYPES(cls):
return {
"required": {
"QualityTags": (
"STRING",
{
"default": "",
"multiline": True,
"rows": 3
}
),
"SceneDescription": (
"STRING",
{
"default": "",
"multiline": True,
"rows": 3
}
),
"Tags": (
"STRING",
{
"default": "",
"multiline": True,
"rows": 3
}
),
},
"optional": {
"string": (
"STRING",
{
"default": ""
}
),
},
}
RETURN_TYPES = ("STRING",)
FUNCTION = "execute"
CATEGORY = "Mango Node Pack/Metadata"
def execute(self, QualityTags="", SceneDescription="", Tags="", string=None):
if string is None:
string = ""
parts = [s.strip() for s in (QualityTags, SceneDescription, Tags, string) if s.strip()]
concatenated = ", ".join(parts)
return (concatenated,)