File size: 1,017 Bytes
b373569
d79aee0
 
 
b373569
 
 
d79aee0
 
 
b373569
d79aee0
b373569
 
 
 
 
d79aee0
b373569
 
d79aee0
b373569
 
 
 
d79aee0
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Launch Flux LoRA training - split model across 2 GPUs
# GPU 0: VAE + CLIP + T5 (encoding)
# GPU 1: Flux Transformer (training)
# Usage: bash scripts/training/run_train_flux.sh

export PYTHONPATH="/home/adminuser/chungcat:$PYTHONPATH"
export HF_HOME="/home/adminuser/.cache/huggingface"
export WANDB_MODE=disabled
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True

python3 /home/adminuser/chungcat/scripts/training/train_flux_lora.py \
    --model-name "black-forest-labs/FLUX.1-schnell" \
    --data-dir "/home/adminuser/chungcat/data/processed/flux_train/shards" \
    --output-dir "/home/adminuser/chungcat/checkpoints/flux_lora" \
    --resolution 1024 \
    --batch-size 1 \
    --gradient-accumulation 8 \
    --learning-rate 1e-4 \
    --lr-scheduler cosine \
    --lr-warmup-steps 1000 \
    --max-train-steps 100000 \
    --save-steps 5000 \
    --lora-rank 128 \
    --lora-alpha 128 \
    --seed 42 \
    --gradient-checkpointing \
    --encode-device cuda:0 \
    --train-device cuda:1