ComfyUI > Nodes > Realtime LoRA Trainer > Realtime LoRA Trainer (SDXL - sd-scripts)

ComfyUI Node: Realtime LoRA Trainer (SDXL - sd-scripts)

Class Name

SDXLLoraTrainer

Category
loaders
Author
ShootTheSound (Account age: 1239days)
Extension
Realtime LoRA Trainer
Latest Updated
2025-12-23
Github Stars
0.28K

How to Install Realtime LoRA Trainer

Install this extension via the ComfyUI Manager by searching for Realtime LoRA Trainer
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Realtime LoRA Trainer in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Realtime LoRA Trainer (SDXL - sd-scripts) Description

SDXLLoraTrainer enables real-time SDXL LoRA training with kohya sd-scripts for AI art customization.

Realtime LoRA Trainer (SDXL - sd-scripts):

The SDXLLoraTrainer is a specialized node within the ComfyUI framework designed to facilitate the training of SDXL LoRAs (Low-Rank Adaptations) using the kohya-ss/sd-scripts. This node operates independently from the AI-Toolkit based trainer, providing a streamlined and efficient method for training LoRAs directly from images. The primary goal of the SDXLLoraTrainer is to enable real-time training of LoRAs, allowing for on-the-fly adjustments and optimizations during the image generation process. By leveraging the kohya sd-scripts, this node offers a robust and flexible solution for AI artists looking to enhance their models with custom LoRAs, ultimately improving the quality and specificity of generated images. The SDXLLoraTrainer is particularly beneficial for users who require a high degree of customization and control over their LoRA training processes, making it an essential tool for advanced AI art creation.

Realtime LoRA Trainer (SDXL - sd-scripts) Input Parameters:

sd_scripts_path

This parameter specifies the file path to the kohya sd-scripts, which are essential for the training process. It determines where the training scripts are located, ensuring that the node can access and execute them correctly. The correct path is crucial for the node's operation, as it directly impacts the ability to train LoRAs effectively.

ckpt_name

The ckpt_name parameter defines the name of the checkpoint file used during training. This file contains the model's weights and is critical for initializing the training process. Choosing an appropriate checkpoint can influence the training outcome, as it serves as the starting point for the model's learning.

caption

This parameter provides a textual description or label for the images used in training. Captions are used to guide the model in associating specific features with the corresponding images, enhancing the model's ability to generate accurate and contextually relevant outputs.

training_steps

training_steps indicates the number of iterations the training process will undergo. More steps generally lead to better model performance, but they also require more computational resources and time. Balancing the number of steps is key to achieving optimal results without overfitting.

learning_rate

The learning_rate parameter controls the step size at each iteration while moving toward a minimum of the loss function. A higher learning rate can speed up training but may cause instability, while a lower rate ensures stability but may slow down the process. Finding the right balance is crucial for effective training.

lora_rank

This parameter specifies the rank of the LoRA, which affects the model's capacity and complexity. A higher rank allows for more complex adaptations but requires more computational resources. Selecting an appropriate rank is important for balancing model performance and resource usage.

vram_mode

vram_mode determines how the node manages video RAM (VRAM) during training. Different modes can optimize the use of VRAM, allowing for efficient training on various hardware configurations. Choosing the right mode can prevent memory overflow and ensure smooth operation.

keep_lora

This boolean parameter indicates whether to retain the trained LoRA after the training process. Keeping the LoRA allows for reuse and further analysis, which can be beneficial for iterative development and refinement of models.

output_name

The output_name parameter defines the name of the output file where the trained LoRA will be saved. This name is used to identify and retrieve the LoRA for future use, making it important for organization and management of trained models.

custom_python_exe

This parameter allows the specification of a custom Python executable to be used during training. It provides flexibility in choosing the Python environment, which can be useful for compatibility with specific libraries or dependencies.

no_half_vae

The no_half_vae parameter is a boolean flag that determines whether to use half-precision for the VAE (Variational Autoencoder) during training. Disabling half-precision can improve numerical stability at the cost of increased memory usage.

Realtime LoRA Trainer (SDXL - sd-scripts) Output Parameters:

lora_path

The lora_path output parameter provides the file path to the trained SDXL LoRA file. This path is essential for accessing and utilizing the trained LoRA in subsequent processes, such as applying it to new image generation tasks. The output path ensures that the trained model is easily retrievable and can be integrated into workflows seamlessly.

Realtime LoRA Trainer (SDXL - sd-scripts) Usage Tips:

  • Ensure that the sd_scripts_path is correctly set to the location of the kohya sd-scripts to avoid any execution errors during training.
  • Adjust the training_steps and learning_rate parameters to find a balance between training time and model performance, especially when working with limited computational resources.
  • Use the keep_lora option to retain trained LoRAs for future use, which can save time and resources in iterative development processes.
  • Experiment with different vram_mode settings to optimize memory usage based on your hardware configuration, preventing potential memory overflow issues.

Realtime LoRA Trainer (SDXL - sd-scripts) Common Errors and Solutions:

FileNotFoundError: [Errno 2] No such file or directory: 'sd_scripts_path'

  • Explanation: This error occurs when the specified path to the kohya sd-scripts is incorrect or the files are missing.
  • Solution: Verify that the sd_scripts_path is correctly set and that the kohya sd-scripts are present in the specified directory.

ValueError: Invalid learning rate

  • Explanation: This error indicates that the learning_rate parameter is set to an invalid value, which could be outside the acceptable range.
  • Solution: Ensure that the learning_rate is set to a positive number, typically between 0.0001 and 0.1, depending on the specific training requirements.

MemoryError: Unable to allocate VRAM

  • Explanation: This error occurs when the node runs out of available video RAM during training.
  • Solution: Try reducing the training_steps or lora_rank, or adjust the vram_mode to a more efficient setting to manage memory usage better.

Realtime LoRA Trainer (SDXL - sd-scripts) Related Nodes

Go back to the extension to check out more related nodes.
Realtime LoRA Trainer
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.