Files
mango1010 5865ab224f Update PromptEmbedMango.py
String connector is no longer mandatory
2025-03-10 23:18:08 +01:00

63 lines
1.7 KiB
Python

class PromptEmbedMango:
@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
}
),
"Embeddings": (
"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="", Embeddings="", string=None):
if string is None:
string = ""
parts = [s.strip() for s in (QualityTags, SceneDescription, Tags, Embeddings, string) if s.strip()]
concatenated = ", ".join(parts)
return (concatenated,)