Wiro - Train Flux Lora
AI-generatedOverview
This node facilitates training a Flux LoRA (Low-Rank Adaptation) model using the Wiro API. It is designed for fine-tuning FLUX models with various customizable parameters such as model name, description, reference model, training steps, learning rate, batch size, optimizer, and more. The node supports advanced options like quantization for low VRAM usage, autocaptioning for training images, gradient checkpointing, and sample generation during training. It is useful for users who want to train personalized or specialized AI models with fine control over the training process.
Use Case Examples
- Training a custom LoRA model for image generation with specific training steps and learning rate.
- Using autocaptioning to automatically generate captions for training images to improve model accuracy.
- Enabling quantization to reduce VRAM usage for training on low-memory GPUs.
Properties
| Name | Meaning |
|---|---|
| Trained Model Name | The name of the model to be trained, required for identification. |
| Train Model Description | Optional description of the training model to provide additional context. |
| Reference Model | The base model to use as a reference for training, required to specify the starting point. |
| Quantize | Whether to load the base model in a quantized format to reduce VRAM usage at the cost of slight quality decrease. |
| Trigger Word | A unique keyword combined with a classifier word to describe the subject for training, required for model specificity. |
| Training Steps | Total number of training steps to complete, recommended based on the number of sample images. |
| Learning Rate | Learning rate for training, balancing quality and training duration. |
| Batch Size | Number of samples processed in one training batch. |
| Save Every | Frequency (in steps) to save training checkpoints. |
| Checkpoints Total Limit | Maximum number of checkpoints to store during training. |
| Gradient Accumulation Steps | Number of steps to accumulate gradients before updating model weights. |
| Lora Rank | Rank parameter affecting training complexity and feature capture. |
| Resolution | Training image resolution(s), can be single or multiple values. |
| Gradient Checkpointing | Enable gradient checkpointing to save memory at the cost of training speed. |
| Caption Dropout Rate | Frequency at which captions are ignored during training to prevent overfitting. |
| Autocaption | Enable automatic captioning of images using a specific captioning model. |
| Autocaption Prefix | Optional text prefix for all generated captions to set context. |
| Autocaption Suffix | Optional text suffix for all generated captions to set concept. |
| Optimizer | Optimizer algorithm used for training, with multiple supported options. |
| Cache Latents | Enable caching of latent representations to reduce memory usage. |
| Cache Latents To Disk | Enable caching latents to disk to handle out-of-memory errors. |
| Disable Sampling | Disable sample generation during training, ignoring related input fields. |
| Prompt | Prompt used during validation to verify model learning. |
| Seed | Random seed for reproducibility; zero means random seed. |
| Guidancescale | Scale for classifier-free guidance during sample generation. |
| Generate Sample Every Steps | Frequency (in steps) to generate validation samples. |
| Sample Steps | Number of denoising steps for sample generation. |
| Select A Folder For Training Data | Folder path containing training images and optional captions. |
| ZIP URL For Training Data | URL to a ZIP file containing training images and optional captions. |
Output
JSON
taskid- Identifier of the training task.url- URL to the trained model or result.status- Status of the training task, e.g., 'completed' or 'failed'.
Dependencies
- Wiro API with API key and secret for authentication
Troubleshooting
- Error if the Wiro API does not return a valid task ID or socket access token, indicating an issue with the API request or credentials.
- Out of memory errors during training can be mitigated by enabling 'Cache Latents' or 'Cache Latents To Disk'.
- Incorrect or missing required parameters like 'trainModelName', 'referenceModel', or 'triggerWord' will cause the node to fail.
- Training may fail or produce poor results if the learning rate and training steps are not balanced properly.
Links
- Wiro API Documentation for Train Flux LoRA - Official API documentation for training Flux LoRA models using Wiro.