926 / mind3d_trellis2 /code /run_kabl.sh
jamie33's picture
Restore mind3d_trellis2 (docs, code, results, renders, paper)
7c61ee6 verified
Raw History Blame Contribute Delete
1.11 kB
# k ablation for the frozen-encoder head (validation only): k in {8, 32, 64}, CFG 50; k=16 is the main model.
source /home/hubin/venvs/trellis/bin/activate
cd /home/hubin/trellis_work
O=/home/hubin/trellis_work/outputs/supp/kabl
VAL=/home/hubin/trellis_work/outputs/valsel/val_ids.txt
mkdir -p $O
i=0
for K in 8 32 64; do
CUDA_VISIBLE_DEVICES=$((i % 2)) python mapper/train_ft.py --k $K --subjects 0001 --n_train_blocks 0 --freeze_patch \
--out_dir $O/k$K > $O/k$K.log 2>&1 &
i=$((i + 1))
done
wait
echo TRAIN_DONE
for K in 8 32 64; do d=$O/val_k${K}_cfg50; mkdir -p $d; ln -sf $O/k$K/sub0001/val/coef_rescaled/tokens.npy $d/tokens.npy; done
for w in 0 1; do
CUDA_VISIBLE_DEVICES=$w python gen_from_tokens.py --test_ids $VAL --variant_dirs $O/val_k8_cfg50 $O/val_k32_cfg50 $O/val_k64_cfg50 \
--cfg 50 --shard $w --num_shards 2 > $O/gen_w$w.log 2>&1 &
done
wait
for K in 8 32 64; do
d=$O/val_k${K}_cfg50
OMP_NUM_THREADS=8 OPENBLAS_NUM_THREADS=8 MKL_NUM_THREADS=8 python eval_shape.py --gen_dir $d/meshes --test_list $VAL \
--out $d/metrics.json > $d/eval.log 2>&1 &
done
wait
echo KABL_DONE