ComfyUI  >  Nodes  >  ComfyUI_FL-Trainer >  FL Kohya Adv Config

ComfyUI Node: FL Kohya Adv Config

Class Name

FL_KohyaSSAdvConfig

Category
🏵️Fill Nodes/Training
Author
filliptm (Account age: 1765 days)
Extension
ComfyUI_FL-Trainer
Latest Updated
7/23/2024
Github Stars
0.1K

How to Install ComfyUI_FL-Trainer

Install this extension via the ComfyUI Manager by searching for  ComfyUI_FL-Trainer
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_FL-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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

FL Kohya Adv Config Description

Facilitates advanced settings for KohyaSS training framework in ComfyUI, optimizing training efficiency and customization.

FL Kohya Adv Config:

FL_KohyaSSAdvConfig is a configuration node designed to facilitate advanced settings for the KohyaSS training framework within the ComfyUI environment. This node allows you to fine-tune various parameters that control the behavior and performance of the training process, providing a high degree of customization to meet specific needs. By leveraging this node, you can optimize training efficiency, manage resource usage, and tailor the training process to different types of neural networks and datasets. The primary goal of FL_KohyaSSAdvConfig is to offer a flexible and user-friendly interface for configuring complex training settings, making it easier for AI artists to achieve their desired outcomes without needing deep technical expertise.

FL Kohya Adv Config Input Parameters:

xformers

This parameter allows you to enable or disable the use of xformers, which can optimize memory usage and speed during training. Options are enable and disable, with the default being enable.

sdpa

This parameter controls the use of Scaled Dot-Product Attention (SDPA). Options are enable and disable, with the default being disable.

fp8_base

This parameter enables or disables the use of FP8 base precision, which can affect the precision and performance of the training. Options are enable and disable, with the default being disable.

mixed_precision

This parameter sets the type of mixed precision to be used during training. Options are no, fp16, and bf16, with the default being fp16.

gradient_accumulation_steps

This parameter specifies the number of steps to accumulate gradients before performing a backward/update pass. It accepts an integer value, with the default being 1.

gradient_checkpointing

This parameter enables or disables gradient checkpointing, which can save memory at the cost of additional computation. Options are enable and disable, with the default being disable.

cache_latents

This parameter controls whether to cache latents in memory. Options are enable and disable, with the default being enable.

cache_latents_to_disk

This parameter controls whether to cache latents to disk. Options are enable and disable, with the default being enable.

network_dim

This parameter sets the dimension of the network. It accepts an integer value, with the default being 16.

network_alpha

This parameter sets the alpha value for the network. It accepts an integer value, with the default being 8.

network_module

This parameter specifies the network module to be used. Options are networks.lora, networks.dylora, and networks.oft, with the default being networks.lora.

network_train_unet_only

This parameter controls whether to train only the U-Net part of the network. Options are enable and disable, with the default being enable.

lr_scheduler

This parameter sets the learning rate scheduler type. Options are linear, cosine, cosine_with_restarts, polynomial, constant, constant_with_warmup, and adafactor, with the default being cosine.

lr_scheduler_num_cycles

This parameter specifies the number of cycles for the learning rate scheduler. It accepts an integer value, with the default being 1.

optimizer_type

This parameter sets the type of optimizer to be used. Options are AdamW, AdamW8bit, PagedAdamW, PagedAdamW8bit, PagedAdamW32bit, Lion8bit, PagedLion8bit, Lion, SGDNesterov, SGDNesterov8bit, DAdaptation, DAdaptAdaGrad, DAdaptAdam, DAdaptAdan, DAdaptAdanIP, DAdaptLion, DAdaptSGD, and AdaFactor, with the default being AdamW.

lr_warmup_steps

This parameter specifies the number of warmup steps for the learning rate. It accepts an integer value, with the default being 0.

unet_lr

This parameter sets the learning rate for the U-Net. It accepts a string value, with the default being an empty string.

text_encoder_lr

This parameter sets the learning rate for the text encoder. It accepts a string value, with the default being an empty string.

shuffle_caption

This parameter controls whether to shuffle captions during training. Options are enable and disable, with the default being disable.

save_precision

This parameter sets the precision for saving models. Options are float, fp16, and bf16, with the default being fp16.

persistent_data_loader_workers

This parameter enables or disables persistent data loader workers. Options are enable and disable, with the default being enable.

no_metadata

This parameter controls whether to save metadata. Options are enable and disable, with the default being enable.

noise_offset

This parameter sets the noise offset value. It accepts a float value, with the default being 0.1.

no_half_vae

This parameter enables or disables the use of half-precision for the VAE. Options are enable and disable, with the default being enable.

lowram

This parameter enables or disables low RAM mode, which can reduce memory usage at the cost of performance. Options are enable and disable, with the default being disable.

FL Kohya Adv Config Output Parameters:

config

The output parameter config provides the final configuration settings after applying all the specified input parameters. This configuration is used to control the training process, ensuring that all the specified settings are applied correctly.

FL Kohya Adv Config Usage Tips:

  • Enable xformers to optimize memory usage and speed during training, especially for large models.
  • Use gradient_accumulation_steps to manage memory usage by accumulating gradients over multiple steps before updating.
  • Set mixed_precision to fp16 for a good balance between performance and precision.
  • Enable cache_latents to speed up training by caching intermediate results in memory.
  • Choose the appropriate optimizer_type based on your specific training needs and model requirements.

FL Kohya Adv Config Common Errors and Solutions:

Invalid value for parameter

  • Explanation: This error occurs when an input parameter is set to a value that is not recognized or supported.
  • Solution: Ensure that all input parameters are set to valid values as specified in the documentation.

Out of memory

  • Explanation: This error occurs when the training process exceeds the available memory.
  • Solution: Reduce the batch size, enable lowram mode, or increase the available memory.

Invalid learning rate

  • Explanation: This error occurs when the learning rate is set to an invalid value.
  • Solution: Ensure that the learning rate parameters unet_lr and text_encoder_lr are set to valid numeric values.

Unsupported optimizer type

  • Explanation: This error occurs when an unsupported optimizer type is specified.
  • Solution: Choose a valid optimizer type from the list of supported options.

Invalid network module

  • Explanation: This error occurs when an unsupported network module is specified.
  • Solution: Ensure that the network_module parameter is set to one of the supported options.

FL Kohya Adv Config Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_FL-Trainer
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.