added Multiline Text and Text Concatenate nodes
Signed-off-by: bigcat88 <bigcat88@icloud.com>
This commit is contained in:
@@ -19,6 +19,11 @@ Current `Visionatrix/UI` nodes list:
|
||||
- **VixUi-WorkflowMetadata** - mandatory node to fill the workflow metadata required for each Visionatrix flow for displaying in the UI list of workflows;
|
||||
- **VixUiAspectRatioSelector** - use it to display the desired image aspect ratio for your Flow.
|
||||
|
||||
Current `Visionatrix/Text` nodes list:
|
||||
|
||||
- **VixMultilineText** - node to just hold text(code compatible).
|
||||
- **VixTextConcatenate** - node to concatenate up to 4 different strings with optional delimiter.
|
||||
|
||||
### Incorporated nodes
|
||||
|
||||
- **StyleAlignedBatchAlign** - from the `style_aligned_comfy` repository
|
||||
|
||||
+55
@@ -417,6 +417,57 @@ class VixCheckboxLogic:
|
||||
return ["input_on_state"]
|
||||
|
||||
|
||||
class VixMultilineText:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"text": ("STRING", {"default": "", "multiline": True, "dynamicPrompts": False}),
|
||||
},
|
||||
"optional": {},
|
||||
}
|
||||
RETURN_TYPES = ("STRING",)
|
||||
FUNCTION = "do_it"
|
||||
CATEGORY = "Visionatrix/Text"
|
||||
|
||||
@classmethod
|
||||
def do_it(cls, text, **kwargs) -> tuple:
|
||||
return (text,)
|
||||
|
||||
|
||||
class VixTextConcatenate:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"delimiter": ("STRING", {"default": ", "}),
|
||||
"clean_whitespace": (["true", "false"],),
|
||||
},
|
||||
"optional": {
|
||||
"text_a": ("STRING", {"forceInput": True}),
|
||||
"text_b": ("STRING", {"forceInput": True}),
|
||||
"text_c": ("STRING", {"forceInput": True}),
|
||||
"text_d": ("STRING", {"forceInput": True}),
|
||||
}
|
||||
}
|
||||
|
||||
RETURN_TYPES = ("STRING",)
|
||||
FUNCTION = "do_it"
|
||||
CATEGORY = "Visionatrix/Text"
|
||||
|
||||
@classmethod
|
||||
def do_it(cls, delimiter: str, clean_whitespace: str, **kwargs):
|
||||
delim = "\n" if delimiter == "\\n" else delimiter
|
||||
strip = clean_whitespace.lower() == "true"
|
||||
parts = (
|
||||
(val.strip() if strip else val)
|
||||
for _, val in sorted(kwargs.items())
|
||||
if isinstance(val, str)
|
||||
)
|
||||
return (delim.join(filter(None, parts)),)
|
||||
|
||||
|
||||
|
||||
NODE_CLASS_MAPPINGS = {
|
||||
"VixUiAspectRatioSelector": VixUiAspectRatioSelector,
|
||||
"VixUiCheckbox": VixUiCheckbox,
|
||||
@@ -431,6 +482,8 @@ NODE_CLASS_MAPPINGS = {
|
||||
"VixDynamicLoraDefinition": VixDynamicLoraDefinition,
|
||||
"VixCheckboxLogic": VixCheckboxLogic,
|
||||
"StyleAlignedBatchAlign": StyleAlignedBatchAlign,
|
||||
"VixMultilineText": VixMultilineText,
|
||||
"VixTextConcatenate": VixTextConcatenate,
|
||||
}
|
||||
|
||||
NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
@@ -447,4 +500,6 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"VixDynamicLoraDefinition": "Vix-DynamicLoraDefinition",
|
||||
"VixCheckboxLogic": "Vix-CheckboxLogic",
|
||||
"StyleAlignedBatchAlign": "StyleAligned Batch Align",
|
||||
"VixMultilineText": "Text Multiline",
|
||||
"VixTextConcatenate": "Text Concatenate",
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-visionatrix"
|
||||
description = "The ComfyUI-Visionatrix nodes are designed for convenient ComfyUI to [a/Visionatrix](https://github.com/Visionatrix/Visionatrix) workflow support migration, in particular to extract prompt input params (input, textarea, checkbox, select, range, file) to be used in simplified Visionatrix UI."
|
||||
version = "1.0.8"
|
||||
version = "1.1.0"
|
||||
license = {file = "LICENSE"}
|
||||
urls.Repository = "https://github.com/Visionatrix/ComfyUI-Visionatrix"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user