ComfyUI-FluxTrainer
Run ComfyUI Easily with InstaSD
Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:
- One-click deployment
- Any model, any node
- Powerful GPUs for rapid iteration
Available Nodes
TrainDatasetAdd
TrainDatasetAdd Node Documentation
Overview
The TrainDatasetAdd node is a component of the ComfyUI-FluxTrainer repository. This node is designed to manage and configure datasets for training within the ComfyUI workflow environment. It plays a critical role in setting up the dataset configuration for models being trained, ensuring that all dataset-specific parameters are specified and correctly incorporated into the training workflow.
Functionality
The primary function of the TrainDatasetAdd node is to generate a dataset configuration that can be used during the training of models. It facilitates the proper definition of dataset paths, parameters related to image resolution, batch size, and other augmentation settings necessary for effective model training.
Inputs
The TrainDatasetAdd node accepts the following inputs:
- Dataset Configuration (Required): A JSON object representing existing dataset configurations.
- Width (Required): The width of the images in the dataset, with a minimum value of 64 and a default value of 1024.
- Height (Required): The height of the images in the dataset, with a minimum value of 64 and a default value of 1024.
- Batch Size (Required): The number of images to process in a single batch, with a minimum value of 1 and a default value of 2.
- Dataset Path (Required): The file path to the dataset, which is rooted in the ComfyUI folder.
- Class Tokens (Required): Tokens or trigger words associated with classes in the dataset.
- Enable Bucket (Required): A boolean value controlling whether to use bucketing for multi-aspect ratio training.
- Bucket No Upscale (Required): A boolean value that, if true, prevents upscaling during bucketing.
- Number of Repeats (Required): The number of times to repeat the dataset for an epoch, with a default value of 1.
- Min Bucket Resolution (Required): The minimum resolution for the bucket, with a minimum value of 64 and a maximum value of 4096.
- Max Bucket Resolution (Required): The maximum resolution for the bucket, with a minimum value of 64 and a maximum value of 4096.
- Regularization (Optional): A JSON object containing regularization data directories.
Outputs
The TrainDatasetAdd node produces the following output:
- Dataset (JSON): An updated JSON configuration object that includes the new dataset details, which is suitable for use in training workflows.
Use in ComfyUI Workflows
The TrainDatasetAdd node is a foundational node in workflows that involve model training. It is used when creating a pipeline to train machine learning models within the ComfyUI interface. By providing comprehensive dataset configurations, it ensures that the training process has all the necessary data parameters set. This node can be connected to other nodes that handle model selection, training initialization, and optimization configurations to assemble a complete training workflow.
Special Features and Considerations
- Signature Management: This node generates a unique signature for each dataset configuration. This ensures that previously added datasets can be distinguished and managed separately.
- Upscaling Control: The option to control upscaling during bucketing provides flexibility in how datasets with varying aspect ratios are handled.
- Integration with ComfyUI: This node is specifically designed to work within the ComfyUI infrastructure, facilitating seamless integration with other aspects of the environment and other nodes in the same repository.
- Regularization Support: The node includes support for adding regularization subsets, which can be crucial for specific training regimes.
In summary, the TrainDatasetAdd node is a vital tool for configuring datasets in the training workflows supported by the ComfyUI-FluxTrainer. It provides the necessary inputs and generates outputs critical for progressing machine learning model training in a structured and efficient manner.