ComfyUI Node: Init Flux LoRA Training

Authored by kijai

Created

Updated

781 stars

Category

FluxTrainer

Inputs

flux_models TRAIN_FLUX_MODELS
dataset JSON
optimizer_settings ARGS
output_name STRING
output_dir STRING
network_dim INT
network_alpha FLOAT
learning_rate FLOAT
max_train_steps INT
apply_t5_attn_mask BOOLEAN
cache_latents
  • disk
  • memory
  • disabled
cache_text_encoder_outputs
  • disk
  • memory
  • disabled
blocks_to_swap INT
weighting_scheme
  • logit_normal
  • sigma_sqrt
  • mode
  • cosmap
  • none
logit_mean FLOAT
logit_std FLOAT
mode_scale FLOAT
timestep_sampling
  • sigmoid
  • uniform
  • sigma
  • shift
  • flux_shift
sigmoid_scale FLOAT
model_prediction_type
  • raw
  • additive
  • sigma_scaled
guidance_scale FLOAT
discrete_flow_shift FLOAT
highvram BOOLEAN
fp8_base BOOLEAN
gradient_dtype
  • fp32
  • fp16
  • bf16
save_dtype
  • fp32
  • fp16
  • bf16
  • fp8_e4m3fn
  • fp8_e5m2
attention_mode
  • sdpa
  • xformers
  • disabled
sample_prompts STRING
additional_args STRING
resume_args ARGS
train_text_encoder
  • disabled
  • clip_l
  • clip_l_fp8
  • clip_l+T5
  • clip_l+T5_fp8
clip_l_lr FLOAT
T5_lr FLOAT
block_args ARGS
gradient_checkpointing
  • enabled
  • enabled_with_cpu_offloading
  • disabled
loss_args ARGS
network_config NETWORK_CONFIG

Outputs

NETWORKTRAINER

INT

KOHYA_ARGS

Extension: ComfyUI Flux Trainer

Currently supports LoRA training, and untested full finetune with code from kohya's scripts: a/https://github.com/kohya-ss/sd-scripts

Authored by kijai

Run ComfyUI workflows in the Cloud!

No downloads or installs are required. Pay only for active GPU usage, not idle time. No complex setups and dependency issues

Learn more