ComfyUI Node: Init Flux Training

Authored by kijai

Created

Updated

785 stars

Category

FluxTrainer

Inputs

flux_models TRAIN_FLUX_MODELS
dataset JSON
optimizer_settings ARGS
output_name STRING
output_dir STRING
learning_rate FLOAT
max_train_steps INT
apply_t5_attn_mask BOOLEAN
t5xxl_max_token_length INT
cache_latents
  • disk
  • memory
  • disabled
cache_text_encoder_outputs
  • disk
  • memory
  • disabled
weighting_scheme
  • logit_normal
  • sigma_sqrt
  • mode
  • cosmap
  • none
logit_mean FLOAT
logit_std FLOAT
mode_scale FLOAT
loss_type
  • l1
  • l2
  • huber
  • smooth_l1
timestep_sampling
  • sigmoid
  • uniform
  • sigma
  • shift
  • flux_shift
sigmoid_scale FLOAT
model_prediction_type
  • raw
  • additive
  • sigma_scaled
cpu_offload_checkpointing BOOLEAN
optimizer_fusing
  • fused_backward_pass
  • blockwise_fused_optimizers
blocks_to_swap INT
guidance_scale FLOAT
discrete_flow_shift FLOAT
highvram BOOLEAN
fp8_base BOOLEAN
gradient_dtype
  • fp32
  • fp16
  • bf16
save_dtype
  • fp32
  • fp16
  • bf16
  • fp8_e4m3fn
attention_mode
  • sdpa
  • xformers
  • disabled
sample_prompts STRING
additional_args STRING
resume_args ARGS

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