Offering a series of utility nodes designed to simplify workflows and enhance efficiency
ComfyUI-MieNodes is a plugin for the ComfyUI ecosystem, offering a series of utility nodes designed to simplify workflows and enhance efficiency.
The plugin provides the following utility nodes, with a focus on dataset file management tasks in LoRA training workflows:
.txt
files to match image files..jpg
or .png
).The plugin also provides utility nodes for general-purpose tasks:
Function: Batch rename files and add a prefix and numbering.
Parameters:
directory
(str): Path to the directory.file_extension
(str): File extension to operate on (e.g., .jpg
, .txt
).numbering_format
(str): Numbering format (###
means three digits).update_caption_as_well
(bool): Whether to also rename .txt
files with the same name.prefix
(str, optional): Prefix to add to the file name.Function: Batch delete files with the specified extension and optional prefix.
Parameters:
directory
(str): Path to the directory.file_extension
(str): File extension to delete (e.g., .jpg
, .txt
).prefix
(str, optional): Prefix to check before deleting files.Function: Perform operations on text files (Insert, Append, Replace, or Remove).
Parameters:
directory
(str): Path to the directory.operation
(str): Type of operation (insert
, append
, replace
, remove
).file_extension
(str, optional): File extension to operate on (e.g., .txt
).target_text
(str, optional): Text to replace or remove (only used for Replace or Remove operations).new_text
(str, optional): New content to insert, append, or replace.Function: Add caption files (.txt
files with the same name) for image files in a directory.
Parameters:
directory
(str): Path to the directory.caption_content
(str): Content to populate in the caption file (e.g., "nazha,"
).Function: Summarize the content of all text files in a directory.
Parameters:
directory
(str): Path to the directory.add_separator
(bool): Whether to add a separator between file contents.save_to_file
(bool): Whether to save the summarized content to a file.file_extension
(str, optional): File extension to operate on (e.g., .txt
).summary_file_name
(str, optional): Name of the file to save the summary.Function: Convert all images in a specified directory to the target format.
Parameters:
directory
(str): Path to the directory.target_format
(str): Target image format (jpg
or png
).save_original
(bool): Whether to retain the original files after conversion.Function: Remove duplicate image files in a specific directory.
Parameters:
directory
(str): Path to the directory.max_distance_threshold
(int): Maximum Hamming distance threshold for identifying duplicates.Function: Print the input content as a string.
Parameters:
anything
(*): The input content to display.Function: Save data to a file in either TOML, JSON, or TXT format.
Parameters:
data
(*): The data to save.directory
(str): The directory to save the file in.file_name
(str): The name of the output file.save_format
(str): The format to save the data in ("json", "toml", or "txt").Function: Compare two files and return the differences. Parameter:
file1_path
(str): The path to the first file.file2_path
(str): The path to the second file.file_format
(str): The format of the files ("json" or "toml").ComfyUI-MieNodes is under active development and will expand its features in future updates. Planned additions include:
As the author is a content creator, the plugin will also include many practical tools developed to address specific video production needs. Stay tuned for more updates!