Files
2026-07-13 13:09:03 +08:00

42 lines
913 B
Bash

#/bin/bash
set -e
work_dir=output/debug_sCM_ladd
np=2
while [[ $# -gt 0 ]]; do
case $1 in
--np=*)
np="${1#*=}"
shift
;;
*.yaml)
config=$1
shift
;;
*)
other_args+=("$1")
shift
;;
esac
done
if [[ -z "$config" ]]; then
config="configs/sana_sprint_config/1024ms/SanaSprint_1600M_1024px_allqknorm_bf16_scm_ladd.yaml"
echo "Only support .yaml files, but get $1. Set to --config_path=$config"
fi
cmd="TRITON_PRINT_AUTOTUNING=1 \
torchrun --nproc_per_node=$np --master_port=$((RANDOM % 10000 + 20000)) \
train_scripts/train_scm_ladd.py \
--config_path=$config \
--work_dir=$work_dir \
--name=tmp \
--resume_from=latest \
--report_to=tensorboard \
--debug=true \
${other_args[@]}"
echo $cmd
eval $cmd