diff --git a/README.md b/README.md index 81e8332..add50a2 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,11 @@ __๐Ÿ”ณ Aspect Ratio__ * CR SDXL Aspect Ratio * CR SD1.5 Aspect Ratio * CR Aspect Ratio (new 27/11/2023) +* CR Aspect Ratio Banners (new 18/12/2023) + +__๐Ÿ“œ List Nodes__ +* CR Font File List (new 18/12/2023) +* CR Text List (new 19/12/2023) __๐ŸŒŸ SDXL__ * CR SDXL Prompt Mix Presets @@ -39,6 +44,8 @@ __๐Ÿ’Š LoRA__ * CR Load LoRA * CR LoRA Stack * CR Apply LoRA Stack +* CR Random LoRA Stack (new 18/12/2023) +* CR Random Weight LoRA (new 18/12/2023) __๐Ÿ•น๏ธ ControlNet__ * CR Apply ControlNet @@ -77,6 +84,8 @@ __๐Ÿ‘ฝ Graphics - Template__ * CR Simple Meme Template * CR Simple Banner * CR Comic Panel Templates +* CR Simple Banner (new 18/12/2023) +* CR Simple Image Compare (new 18/12/2023) __๐ŸŒ Graphics - Layout__ * CR Image Panel @@ -123,7 +132,7 @@ __๐Ÿ”ข Index__ * CR Trigger __๐Ÿ”ง Conversion__ -* CR String To Number +* CR String To Number (changed 18/12/2023) * CR String To Combo * CR Float To String * CR Float To Integer @@ -151,6 +160,7 @@ __๐ŸŽฒ Random__ * CR Random RGB Gradient (new 8/12/2023) __๐Ÿ“ฆ Other__ +* CR Image Output (changed 18/12/2023) * CR Latent Batch Size * CR Prompt Text * CR Split String diff --git a/__init__.py b/__init__.py index eaa74e0..02ca998 100644 --- a/__init__.py +++ b/__init__.py @@ -44,7 +44,10 @@ "CR Split String":CR_SplitString, "CR Value": CR_Value, "CR Conditioning Mixer":CR_ConditioningMixer, - "CR Select Model": CR_SelectModel, + "CR Select Model": CR_SelectModel, + ### List Nodes + "CR Font File List": CR_FontFileList, + "CR Text List": CR_TextList, ### Aspect Ratio Nodes "CR SD1.5 Aspect Ratio":CR_AspectRatioSD15, "CR SDXL Aspect Ratio":CR_SDXLAspectRatio, @@ -60,9 +63,9 @@ ### LoRA Nodes "CR Load LoRA": CR_LoraLoader, "CR LoRA Stack": CR_LoRAStack, - "CR Apply LoRA Stack": CR_ApplyLoRAStack, "CR Random LoRA Stack": CR_RandomLoRAStack, - "CR Random Weight LoRA": CR_RandomWeightLoRA, + "CR Random Weight LoRA": CR_RandomWeightLoRA, + "CR Apply LoRA Stack": CR_ApplyLoRAStack, ### Model Merge Nodes "CR Apply Model Merge": CR_ApplyModelMerge, "CR Model Merge Stack": CR_ModelMergeStack, @@ -109,8 +112,7 @@ #"CR Arabic Text RTL": CR_ArabicTextRTL, "CR Simple Text Watermark": CR_SimpleTextWatermark, #"CR System TrueType Font": CR_SystemTrueTypeFont, - #"CR Display Font": CR_DisplayFont, - "CR Font File List": CR_FontFileList, + #"CR Display Font": CR_DisplayFont, ### Graphics Filter "CR Halftone Filter": CR_HalftoneFilter, "CR Color Tint": CR_ColorTint, @@ -199,7 +201,7 @@ # Lists "CR Model List": CR_ModelList, "CR LoRA List": CR_LoRAList, - "CR Text List": CR_TextList, + #"CR Text List": CR_TextList, "CR Text List Simple": CR_TextListSimple, "CR Image List": CR_ImageList, "CR Image List Simple": CR_ImageListSimple, @@ -213,7 +215,7 @@ # Utils "CR Debatch Frames": CR_DebatchFrames, "CR Current Frame": CR_CurrentFrame, - "CR Input Text List": CR_InputTextList, + #"CR Input Text List": CR_InputTextList, # IO "CR Load Animation Frames": CR_LoadAnimationFrames, "CR Load Flow Frames": CR_LoadFlowFrames, @@ -231,6 +233,9 @@ "CR Value": "โš™๏ธ CR Value", "CR Conditioning Mixer": "โš™๏ธ CR Conditioning Mixer", "CR Select Model": "๐Ÿ”ฎ CR Select Model", + ### List Nodes + "CR Font File List": "๐Ÿ“œ CR Font File List", + "CR Text List": "๐Ÿ“œ CR Text List", ### Aspect Ratio Nodes "CR SD1.5 Aspect Ratio": "๐Ÿ”ณ CR SD1.5 Aspect Ratio", "CR SDXL Aspect Ratio": "๐Ÿ”ณ CR SDXL Aspect Ratio", @@ -247,7 +252,7 @@ "CR Load LoRA": "๐Ÿ’Š CR Load LoRA", "CR LoRA Stack": "๐Ÿ’Š CR LoRA Stack", "CR Random LoRA Stack": "๐Ÿ’Š CR Random LoRA Stack", - "CR Random Weight LoRA": "๐Ÿ’Š CR Random Weight LoRA", + "CR Random Weight LoRA": "๐Ÿ’Š CR Random Weight LoRA", "CR Apply LoRA Stack": "๐Ÿ’Š CR Apply LoRA Stack", ### Model Merge Nodes "CR Apply Model Merge": "โ›๏ธ CR Apply Model Merge", @@ -383,7 +388,7 @@ # Lists "CR Model List": "๐Ÿ“ƒ CR Model List", "CR LoRA List": "๐Ÿ“ƒ CR LoRA List", - "CR Text List": "๐Ÿ“ƒ CR Text List", + #"CR Text List": "๐Ÿ“ƒ CR Text List", "CR Text List Simple": "๐Ÿ“ƒ CR Text List Simple", "CR Image List": "๐Ÿ“ƒ CR Image List", "CR Image List Simple": "๐Ÿ“ƒ CR Image List Simple", diff --git a/animation_nodes/lists.py b/animation_nodes/lists.py index 1ff83b2..072b638 100644 --- a/animation_nodes/lists.py +++ b/animation_nodes/lists.py @@ -154,6 +154,7 @@ def lora_list(self, lora_name1, model_strength_1, clip_strength_1, alias1, return (loras, show_text, ) #---------------------------------------------------------------------------------------------------------------------# +''' class CR_TextList: @classmethod @@ -221,7 +222,7 @@ def text_list(self, text_1, alias1, text_2, alias2, text_3, alias3, text_4, alia show_text = "".join(showtext) return (texts, show_text, ) - +''' #---------------------------------------------------------------------------------------------------------------------# class CR_TextListSimple: diff --git a/categories.py b/categories.py index 35ecdde..e6621bb 100644 --- a/categories.py +++ b/categories.py @@ -10,6 +10,7 @@ "Comfyroll/ControlNet": "๐Ÿงฉ Comfyroll/๐Ÿ•น๏ธ ControlNet", "Comfyroll/XY Grid": "๐Ÿงฉ Comfyroll/๐Ÿ“‰ XY Grid", "Comfyroll/SDXL": "๐Ÿงฉ Comfyroll/๐ŸŒŸ SDXL", + "Comfyroll/List": "๐Ÿงฉ Comfyroll/๐Ÿ“œ List", "Comfyroll/Aspect Ratio": "๐Ÿงฉ Comfyroll/๐Ÿ”ณ Aspect Ratio", "Comfyroll/Pipe/Module": "๐Ÿงฉ Comfyroll/๐ŸŽท Pipe/โœˆ๏ธ Module", "Comfyroll/Pipe/Image": "๐Ÿงฉ Comfyroll/๐ŸŽท Pipe/๐Ÿ›ฉ๏ธ Image", diff --git a/fonts/fonts.txt b/fonts/fonts.txt deleted file mode 100644 index d8a3281..0000000 --- a/fonts/fonts.txt +++ /dev/null @@ -1,23 +0,0 @@ -AlumniSansCollegiateOne-Regular.ttf -Asian.ttf -BOREX-Regular.ttf -CaslonAntique-Bold.ttf -comic.ttf -Easy Sunday (cursive).ttf -fonts.txt -Grand Stylus.ttf -halidians_blockserif.ttf -Horror.ttf -impact.ttf -JohnHancock_Regular.ttf -Kohelet.ttf -Norican-Regular (cursive).ttf -NoteMarker.ttf -OrcHordeBB_Reg.ttf -Oswald-Bold.ttf -PassionOne-Bold.ttf -PixelifySans-Bold.ttf -Quicksand-Bold.ttf -Roboto-Regular.ttf -witless_.ttf -YoungSerif-Regular.ttf diff --git a/nodes/nodes.py b/nodes/nodes.py index 8309970..2190470 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -351,7 +351,7 @@ def INPUT_TYPES(s): "output_type": (["Preview", "Save"],), "filename_prefix": ("STRING", {"default": "CR"}), "prefix_presets": (presets, ), - "file_format": (["webp", "jpg", "png", "tif"],), + "file_format": (["png", "jpg", "webp", "tif"],), }, "hidden": {"prompt": "PROMPT", "extra_pnginfo": "EXTRA_PNGINFO"}, "optional": @@ -709,7 +709,9 @@ def select_model(self, ckpt_name1, ckpt_name2, ckpt_name3, ckpt_name4, ckpt_name show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Other-Nodes#cr-select-model" return (model, clip, vae, model_name, show_help, ) - + +#---------------------------------------------------------------------------------------------------------------------# +# List Nodes #---------------------------------------------------------------------------------------------------------------------# class AnyType(str): """A special type that can be connected to any other types. Credit to pythongosssss""" @@ -724,37 +726,88 @@ class CR_FontFileList: @classmethod def INPUT_TYPES(s): - system_root = os.environ.get('SystemRoot') - font_dir = os.path.join(system_root, 'Fonts') - - return {"required": {}} + comfyroll_font_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "fonts") + comfyroll_file_list = [f for f in os.listdir(comfyroll_font_dir) if os.path.isfile(os.path.join(comfyroll_font_dir, f)) and f.lower().endswith(".ttf")] + + sources = ["System", "Comfyroll"] + + return {"required": {"source_folder": (sources,), + #"full_folder_path": + "start_index": ("INT", {"default": 0, "min": 0, "max": 9999}), + "max_rows": ("INT", {"default": 1000, "min": 1, "max": 9999}), + } + } - RETURN_TYPES = (any_type, any_type,) - RETURN_NAMES = ("LIST", "display_names", ) + RETURN_TYPES = (any_type, "STRING", ) + RETURN_NAMES = ("LIST", "show_help", ) OUTPUT_IS_LIST = (True,) - FUNCTION = "load_path" - CATEGORY = icons.get("Comfyroll/Other") + FUNCTION = "make_list" + CATEGORY = icons.get("Comfyroll/List") + + def make_list(self, source_folder, start_index, max_rows): + + if source_folder == "System": + system_root = os.environ.get('SystemRoot') + system_font_dir = os.path.join(system_root, 'Fonts') + file_list = [f for f in os.listdir(system_font_dir) if os.path.isfile(os.path.join(system_font_dir, f)) and f.lower().endswith(".ttf")] + #print(len(file_list)) + elif source_folder == "Comfyroll": + comfyroll_font_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "fonts") + file_list = [f for f in os.listdir(comfyroll_font_dir) if os.path.isfile(os.path.join(comfyroll_font_dir, f)) and f.lower().endswith(".ttf")] + #print(len(comfyroll_file_list)) + else: + pass + + # Ensure start_index is within the bounds of the list + start_index = max(0, min(start_index, len(file_list) - 1)) + + # Calculate the end index based on max_rows + end_index = min(start_index + max_rows, len(file_list)) + + # Extract the desired portion of the list + selected_files = file_list[start_index:end_index] + + show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Other-Nodes#cr-font-file-list" + + return (selected_files, show_help, ) + +#---------------------------------------------------------------------------------------------------------------------# +class CR_TextList: - def load_path(self, path: str = "./input/", image_load_limit: int = 0, start_index: int = 0): + @classmethod + def INPUT_TYPES(s): - system_root = os.environ.get('SystemRoot') - font_dir = os.path.join(system_root, 'Fonts') - file_list = [f for f in os.listdir(font_dir) if os.path.isfile(os.path.join(font_dir, f)) and f.lower().endswith(".ttf")] - print(len(file_list)) + return {"required": {"multiline_text": ("STRING", {"multiline": False, "default": "text"}), + "start_index": ("INT", {"default": 0, "min": 0, "max": 9999}), + "max_rows": ("INT", {"default": 1000, "min": 1, "max": 9999}), + } + } - import matplotlib.font_manager + RETURN_TYPES = ("STRING", "STRING", ) + RETURN_NAMES = ("STRING", "show_help", ) + OUTPUT_IS_LIST = (True,) + FUNCTION = "make_list" + CATEGORY = icons.get("Comfyroll/List") - # Get the list of available font names - font_list = matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf') + def make_list(self, multiline_text, start_index, max_rows): - # Retrieve the font properties to access the user-friendly name - font_props = matplotlib.font_manager.FontProperties(fname=font_list[0]) - font_names = font_props.get_name() - - files = "\n".join(file_list) + lines = multiline_text.split('\n') - #return {"ui": {"text": files,}, "result": (file_list,),} - return (file_list, font_names, font_list, ) + # Ensure start_index is within the bounds of the list + start_index = max(0, min(start_index, len(lines) - 1)) + + # Calculate the end index based on max_rows + end_index = min(start_index + max_rows, len(lines)) + + # Extract the desired portion of the list + selected_rows = lines[start_index:end_index] + + # Join the selected portion into a multiline string + text_list = "\n".join(selected_rows) + + show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Other-Nodes#cr-text-list" + + return (selected_rows, show_help, ) #---------------------------------------------------------------------------------------------------------------------# # MAPPINGS @@ -764,20 +817,22 @@ def load_path(self, path: str = "./input/", image_load_limit: int = 0, start_ind NODE_CLASS_MAPPINGS = { ### Aspect ratio "CR SD1.5 Aspect Ratio": CR_AspectRatioSD15, - "CR SDXL Aspect Ratio":CR_SDXLAspectRatio, + "CR SDXL Aspect Ratio": CR_SDXLAspectRatio, "CR Aspect Ratio": CR_AspectRatio, "CR Aspect Ratio Banners":CR_AspectRatioBanners, + ### List nodes + "CR Font File List": CR_FontFileList, + "CR Text List": CR_TextList, ### Other "CR Image Output": CR_ImageOutput, "CR Integer Multiple": CR_IntegerMultipleOf, - "CR Latent Batch Size":CR_LatentBatchSize - "CR Seed":CR_Seed, - "CR Prompt Text":CR_PromptText, - "CR Split String":CR_SplitString, + "CR Latent Batch Size": CR_LatentBatchSize, + "CR Seed": CR_Seed, + "CR Prompt Text": CR_PromptText, + "CR Split String": CR_SplitString, "CR Value": CR_Value, - "CR Conditioning Mixer":CR_ConditioningMixer, + "CR Conditioning Mixer": CR_ConditioningMixer, "CR Select Model": CR_SelectModel, - "CR Font File List": CR_FontFileList, } ''' diff --git a/nodes/pil_text.py b/nodes/pil_text.py index ef2fab4..a3a236f 100644 --- a/nodes/pil_text.py +++ b/nodes/pil_text.py @@ -406,7 +406,8 @@ def overlay_text(self, image, text, align, draw = ImageDraw.Draw(textlayer) # Load the font - font_file = "fonts\\" + str(font_name) + #font_file = "fonts\\" + str(font_name) + font_file = os.path.join("fonts", str(font_name)) resolved_font_path = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), font_file) font = ImageFont.truetype(str(resolved_font_path), size=font_size) @@ -452,6 +453,7 @@ def overlay_text(self, image, text, align, return (images_out, show_help, ) #---------------------------------------------------------------------------------------------------------------------# +''' class CR_SystemTrueTypeFont: def __init__(self): pass @@ -499,8 +501,9 @@ def truetype_font(self, font_name, font_size): show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Text-Nodes#cr-system-truetype-font" return (font_out, preview, show_help,) - +''' #---------------------------------------------------------------------------------------------------------------------# +''' class CR_DisplayFont: @classmethod @@ -535,7 +538,7 @@ def draw_font(self, font, text): show_help = "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes/wiki/Text-Nodes#cr-display-font" return (image_out, show_help,) - +''' #---------------------------------------------------------------------------------------------------------------------# # MAPPINGS #---------------------------------------------------------------------------------------------------------------------# @@ -548,9 +551,9 @@ def draw_font(self, font, text): "CR Composite Text":CR_CompositeText, "CR Draw Perspective Text":CR_DrawPerspectiveText, "CR Arabic Text RTL": CR_ArabicTextRTL, - "CR Simple Text Watermark": CR_SimpleTextWatermark, - "CR System TrueType Font": CR_SystemTrueTypeFont, - "CR Display Font": CR_DisplayFont, + #"CR Simple Text Watermark": CR_SimpleTextWatermark, + #"CR System TrueType Font": CR_SystemTrueTypeFont, + #"CR Display Font": CR_DisplayFont, } ''' diff --git a/workflows/Graphics/Template/CR_Simple_Banner_demo_v1.json b/workflows/Graphics/Template/CR_Simple_Banner_demo_v1.json new file mode 100644 index 0000000..e4c4390 --- /dev/null +++ b/workflows/Graphics/Template/CR_Simple_Banner_demo_v1.json @@ -0,0 +1,346 @@ +{ + "last_node_id": 25, + "last_link_id": 21, + "nodes": [ + { + "id": 19, + "type": "CR Simple Banner", + "pos": [ + 720, + -180 + ], + "size": { + "0": 400, + "1": 290 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 16 + }, + { + "name": "banner_text", + "type": "STRING", + "link": 19, + "widget": { + "name": "banner_text" + } + }, + { + "name": "font_name", + "type": "COMBO", + "link": 20, + "widget": { + "name": "font_name" + } + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 17 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Simple Banner", + "ttNbgOverride": { + "color": "#222", + "bgcolor": "#000", + "groupcolor": "#444" + } + }, + "widgets_values": [ + "text", + "Roboto-Regular.ttf", + 150, + "darkgray", + 0, + "custom", + 0, + "#000000", + "#000000" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 21, + "type": "PreviewImage", + "pos": [ + 1180, + -180 + ], + "size": { + "0": 420, + "1": 260 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 17 + } + ], + "properties": { + "Node name for S&R": "PreviewImage", + "ttNbgOverride": { + "color": "#222", + "bgcolor": "#000", + "groupcolor": "#444" + } + }, + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 23, + "type": "Text Multiline", + "pos": [ + 10, + -160 + ], + "size": { + "0": 210, + "1": 200 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 18 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Text Multiline", + "ttNbgOverride": { + "color": "#222", + "bgcolor": "#000", + "groupcolor": "#444" + } + }, + "widgets_values": [ + "Leonardo da Vinci\nVincent van Gogh\nPablo Picasso\nMichelangelo Buonarroti\nClaude Monet\nRembrandt van Rijn\nFrida Kahlo\nGeorgia O'Keeffe\nSalvador Dalรญ" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 24, + "type": "CR Text List", + "pos": [ + 300, + -160 + ], + "size": { + "0": 320, + "1": 130 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "multiline_text", + "type": 0, + "link": 18, + "widget": { + "name": "multiline_text" + } + } + ], + "outputs": [ + { + "name": "STRING", + "type": "STRING", + "links": [ + 19 + ], + "shape": 6, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Text List" + }, + "widgets_values": [ + "text", + 0, + 9 + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 11, + "type": "CR Font File List", + "pos": [ + 300, + 20 + ], + "size": [ + 320, + 130 + ], + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "LIST", + "type": "*", + "links": [ + 20 + ], + "shape": 6, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Font File List", + "ttNbgOverride": { + "color": "#222", + "bgcolor": "#000", + "groupcolor": "#444" + } + }, + "widgets_values": [ + "System", + 0, + 9 + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 20, + "type": "CR Color Panel", + "pos": [ + 300, + -390 + ], + "size": [ + 320, + 150 + ], + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 16 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Color Panel", + "ttNbgOverride": { + "color": "#222", + "bgcolor": "#000", + "groupcolor": "#444" + } + }, + "widgets_values": [ + 512, + 256, + "cyan", + "#000000" + ], + "color": "#222", + "bgcolor": "#000" + } + ], + "links": [ + [ + 16, + 20, + 0, + 19, + 0, + "IMAGE" + ], + [ + 17, + 19, + 0, + 21, + 0, + "IMAGE" + ], + [ + 18, + 23, + 0, + 24, + 0, + "STRING" + ], + [ + 19, + 24, + 0, + 19, + 1, + "STRING" + ], + [ + 20, + 11, + 0, + 19, + 2, + "COMBO" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/workflows/Graphics/Template/CR_Simple_Banner_demo_v2.json b/workflows/Graphics/Template/CR_Simple_Banner_demo_v2.json new file mode 100644 index 0000000..12a5b0b --- /dev/null +++ b/workflows/Graphics/Template/CR_Simple_Banner_demo_v2.json @@ -0,0 +1,284 @@ +{ + "last_node_id": 18, + "last_link_id": 21, + "nodes": [ + { + "id": 4, + "type": "PreviewImage", + "pos": [ + 750, + 210 + ], + "size": { + "0": 230, + "1": 250 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 4 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 5, + "type": "LoadImage", + "pos": [ + -90, + 210 + ], + "size": [ + 320, + 310 + ], + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 17 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "ComfyUI_temp_ztrsj_00020_.png", + "image" + ] + }, + { + "id": 2, + "type": "CR Simple Banner", + "pos": [ + 300, + 210 + ], + "size": { + "0": 400, + "1": 312 + }, + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 17 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 4 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Simple Banner" + }, + "widgets_values": [ + "BANNER", + "Oswald-Bold.ttf", + 1024, + "pink", + 3, + "red", + 20, + "#00FF00", + "#00FF00" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 18, + "type": "PreviewImage", + "pos": [ + 754, + -178 + ], + "size": { + "0": 230, + "1": 250 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 20 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 16, + "type": "CR Color Panel", + "pos": [ + -90, + -180 + ], + "size": { + "0": 315, + "1": 150 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 21 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Color Panel" + }, + "widgets_values": [ + 1024, + 512, + "orange", + "#000000" + ] + }, + { + "id": 17, + "type": "CR Simple Banner", + "pos": [ + 300, + -180 + ], + "size": { + "0": 400, + "1": 312 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 21 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [ + 20 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "show_help", + "type": "STRING", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "CR Simple Banner" + }, + "widgets_values": [ + "BANNER", + "Oswald-Bold.ttf", + 1024, + "pink", + 20, + "black", + 20, + "#00FF00", + "#00FF00" + ], + "color": "#222", + "bgcolor": "#000" + } + ], + "links": [ + [ + 4, + 2, + 0, + 4, + 0, + "IMAGE" + ], + [ + 17, + 5, + 0, + 2, + 0, + "IMAGE" + ], + [ + 20, + 17, + 0, + 18, + 0, + "IMAGE" + ], + [ + 21, + 16, + 0, + 17, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file diff --git a/workflows/Graphics/Text/CR_Simple_Text_Watermark_demo_v1.json b/workflows/Graphics/Text/CR_Simple_Text_Watermark_demo_v1.json new file mode 100644 index 0000000..40a700b --- /dev/null +++ b/workflows/Graphics/Text/CR_Simple_Text_Watermark_demo_v1.json @@ -0,0 +1,304 @@ +{ + "last_node_id": 16, + "last_link_id": 20, + "nodes": [ + { + "id": 12, + "type": "Make Image Batch", + "pos": [ + 20, + 30 + ], + "size": { + "0": 210, + "1": 126 + }, + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "image1", + "type": "IMAGE", + "link": 11 + }, + { + "name": "image2", + "type": "IMAGE", + "link": 13 + }, + { + "name": "image3", + "type": "IMAGE", + "link": 14 + }, + { + "name": "image4", + "type": "IMAGE", + "link": null + }, + { + "name": "image5", + "type": "IMAGE", + "link": null + }, + { + "name": "image6", + "type": "IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 12 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "Make Image Batch" + } + }, + { + "id": 4, + "type": "LoadImage", + "pos": [ + -420, + 20 + ], + "size": { + "0": 210, + "1": 360 + }, + "flags": {}, + "order": 0, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 11 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "SDXL10__00007_.png", + "image" + ] + }, + { + "id": 9, + "type": "LoadImage", + "pos": [ + -420, + 430 + ], + "size": { + "0": 210, + "1": 350 + }, + "flags": {}, + "order": 1, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 13 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "SDXL10__00008_.png", + "image" + ] + }, + { + "id": 13, + "type": "LoadImage", + "pos": [ + -420, + 830 + ], + "size": { + "0": 220, + "1": 380 + }, + "flags": {}, + "order": 2, + "mode": 0, + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 14 + ], + "shape": 3, + "slot_index": 0 + }, + { + "name": "MASK", + "type": "MASK", + "links": null, + "shape": 3 + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "SDXL10__00009_ (1).png", + "image" + ] + }, + { + "id": 16, + "type": "PreviewImage", + "pos": [ + 670, + 30 + ], + "size": { + "0": 270, + "1": 360 + }, + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 20 + } + ], + "properties": { + "Node name for S&R": "PreviewImage" + } + }, + { + "id": 3, + "type": "CR Simple Text Watermark", + "pos": [ + 300, + 30 + ], + "size": { + "0": 315, + "1": 250 + }, + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 12 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 20 + ], + "shape": 3, + "slot_index": 0 + } + ], + "properties": { + "Node name for S&R": "CR Simple Text Watermark" + }, + "widgets_values": [ + "@ your name", + "bottom right", + 0.5, + "Oswald-Bold.ttf", + 70, + "white", + 50, + 50, + "#FF0033" + ], + "color": "#222", + "bgcolor": "#000" + } + ], + "links": [ + [ + 11, + 4, + 0, + 12, + 0, + "IMAGE" + ], + [ + 12, + 12, + 0, + 3, + 0, + "IMAGE" + ], + [ + 13, + 9, + 0, + 12, + 1, + "IMAGE" + ], + [ + 14, + 13, + 0, + 12, + 2, + "IMAGE" + ], + [ + 20, + 3, + 0, + 16, + 0, + "IMAGE" + ] + ], + "groups": [], + "config": {}, + "extra": {}, + "version": 0.4 +} \ No newline at end of file