[code] [code] flux is the new one, list anything i miss
- User
!accelerate launch --num_cpu_threads_per_process=2 ./kohya_ss/sd-scripts/flux_train_network.py \ --pretrained_model_name_or_path /kaggle/input/flux/pytorch/flux.1-dev/1/flux1-dev.safetensors \ --clip_l /kaggle/input/clip-flux/pytorch/default/3/clip_l.safetensors \ --t5xxl /kaggle/input/clip-flux/pytorch/default/3/t5xxl_fp16.safetensors \ --ae /kaggle/input/clip-flux/pytorch/default/3/ae.sft \ --cache_latents_to_disk \ --save_model_as safetensors \ --sdpa \ --persistent_data_loader_workers \ --max_data_loader_n_workers 2 \ --gradient_checkpointing \ --gradient_accumulation_steps 1 \ --mixed_precision bf16 \ --save_precision fp16 \ --network_module networks.lora_flux \ --caption_extension ".txt" \ --resolution "1024,1024" \ --enable_bucket \ --bucket_no_upscale \ --min_bucket_reso 512 \ --max_bucket_reso 2048 \ --bucket_reso_steps 64 \ --flip_aug \ --network_alpha 1 \ --network_dim 64 \ --text_encoder_lr 1e-4 \ --learning_rate 1e-4 \ --train_batch_size 1 \ --vae_batch_size 1 \ --network_train_unet_only \ --cache_text_encoder_outputs \ --cache_text_encoder_outputs_to_disk \ --fp8_base \ --highvram \ --max_train_epochs 16 \ --save_every_n_epochs 4 \ --output_dir ./Output \ --output_name flux-lora-Erin \ --timestep_sampling sigmoid \ --model_prediction_type raw \ --guidance_scale 3.5 \ --loss_type l2 \ --optimizer_type adamwschedulefree \ --optimizer_args "relative_step=False" "scale_parameter=False" "warmup_init=False"!accelerate launch ./kohya_ss/sd-scripts/flux_train_network.py \ --pretrained_model_name_or_path /kaggle/input/flux/pytorch/flux.1-dev/1/flux1-dev.safetensors \ --clip_l /kaggle/input/clip-flux/pytorch/default/3/clip_l.safetensors \ --t5xxl /kaggle/input/clip-flux/pytorch/default/3/t5xxl_fp16.safetensors \ --ae /kaggle/input/clip-flux/pytorch/default/3/ae.sft \ --cache_latents_to_disk \ --save_model_as safetensors \ --sdpa \ --persistent_data_loader_workers \ --max_data_loader_n_workers 2 \ --gradient_checkpointing \ --gradient_accumulation_steps 1 \ --mixed_precision bf16 \ --save_precision fp16 \ --network_module networks.lora_flux \ --network_dim 64 \ --learning_rate 1e-4 \ --network_train_unet_only \ --cache_text_encoder_outputs \ --cache_text_encoder_outputs_to_disk \ --fp8_base \ --highvram \ --max_train_epochs 16 \ --save_every_n_epochs 4 \ --dataset_config ./dataset/dataset-config.toml \ --output_dir ./Output \ --output_name flux-lora-Erin \ --timestep_sampling sigmoid \ --model_prediction_type raw \ --guidance_scale 3.5 \ --loss_type l2 \ --optimizer_type adamwschedulefree \ --optimizer_args "relative_step=False" "scale_parameter=False" "warmup_init=False"flux is the new one, list anything i miss
- Assistant
In your new command (
flux), compared to the old one, you are missing the following options:-
CPU Threads Per Process:
- Missing Option:
--num_cpu_threads_per_process=2 - Explanation: This option sets the number of CPU threads per process. Without it, the default number of threads will be used, which might not be optimal for your setup.
- Missing Option:
-
Network Alpha:
- Missing Option:
--network_alpha 1 - Explanation: This sets the alpha value for your LoRA network. The default value might be different, affecting the scaling of the weights during training.
- Missing Option:
-
Text Encoder Learning Rate:
- Missing Option:
--text_encoder_lr 1e-4 - Explanation: Specifies a separate learning rate for the text encoder. Without this, the text encoder might use the default learning rate or not be trained if
--network_train_unet_onlyis set.
- Missing Option:
-
Batch Sizes:
- Missing Options:
--train_batch_size 1--vae_batch_size 1
- Explanation: Sets the batch sizes for training and VAE processing. If not specified, default batch sizes will be used, which could lead to memory issues or suboptimal training performance.
- Missing Options:
-
Data Augmentation (Flip Augmentation):
- Missing Option:
--flip_aug - Explanation: Enables horizontal flip augmentation during training. If this is not set in your dataset configuration file (
dataset-config.toml), you might miss out on this augmentation.
- Missing Option:
-
Caption Extension:
- Missing Option:
--caption_extension ".txt" - Explanation: Specifies the file extension for caption files. Without it, the script might not find your caption files unless they have the default extension.
- Missing Option:
-
Image Resolution and Bucketing Options:
- Missing Options:
--resolution "1024,1024"--enable_bucket--bucket_no_upscale--min_bucket_reso 512--max_bucket_reso 2048--bucket_reso_steps 64
- Explanation: These options control the resolution of the training images and how they are bucketed to handle different aspect ratios. If these are not specified in your
dataset-config.toml, you might not get the desired image processing behavior.
- Missing Options:
-
Data Loader Workers:
- Potential Issue: You have
--max_data_loader_n_workers 2in both commands, but without setting--num_cpu_threads_per_process=2, this might lead to performance issues.
- Potential Issue: You have
Recommendations:
-
Check Your
dataset-config.toml: Some of the missing options, especially those related to data processing (like resolution, flip augmentation, and caption extension), might be specified in your dataset configuration file. Ensure that all necessary settings are included there. -
Add Missing Options If Necessary: If the missing options are not covered elsewhere, consider adding them back into your command to ensure consistent behavior with your previous setup.
-
Verify Default Values: For any options you're omitting, make sure you're okay with the default values used by the script.
Updated Command with Missing Options (assuming they are not set elsewhere):
!accelerate launch --num_cpu_threads_per_process=2 ./kohya_ss/sd-scripts/flux_train_network.py \ --pretrained_model_name_or_path /kaggle/input/flux/pytorch/flux.1-dev/1/flux1-dev.safetensors \ --clip_l /kaggle/input/clip-flux/pytorch/default/3/clip_l.safetensors \ --t5xxl /kaggle/input/clip-flux/pytorch/default/3/t5xxl_fp16.safetensors \ --ae /kaggle/input/clip-flux/pytorch/default/3/ae.sft \ --cache_latents_to_disk \ --save_model_as safetensors \ --sdpa \ --persistent_data_loader_workers \ --max_data_loader_n_workers 2 \ --gradient_checkpointing \ --gradient_accumulation_steps 1 \ --mixed_precision bf16 \ --save_precision fp16 \ --network_module networks.lora_flux \ --network_dim 64 \ --network_alpha 1 \ --learning_rate 1e-4 \ --text_encoder_lr 1e-4 \ --train_batch_size 1 \ --vae_batch_size 1 \ --network_train_unet_only \ --cache_text_encoder_outputs \ --cache_text_encoder_outputs_to_disk \ --fp8_base \ --highvram \ --max_train_epochs 16 \ --save_every_n_epochs 4 \ --dataset_config ./dataset/dataset-config.toml \ --output_dir ./Output \ --output_name flux-lora-Erin \ --timestep_sampling sigmoid \ --model_prediction_type raw \ --guidance_scale 3.5 \ --loss_type l2 \ --optimizer_type adamwschedulefree \ --optimizer_args "relative_step=False" "scale_parameter=False" "warmup_init=False"Note: Ensure that any adjustments you make align with your training objectives and that you understand the impact of each option on your training process.
-