THEMES=( Monet Picasso Van_Gogh )
SMALL_THEMES=( monet picasso van_gogh )
DEVICE=0

RETAIN_CKPT=./logs/retain_seed0.ckpt
FULL_CKPT=../ckpts/diffusion/compvis/style50/compvis.ckpt
 
# Measure FADE between base model and retain model
for t_idx in "${!THEMES[@]}"
do
  THEME=${THEMES[$t_idx]}
  SMALL_THEME=${SMALL_THEMES[$t_idx]}

  DATA_PATH=output_images/retain0_forget/${THEME}
  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ${FULL_CKPT} \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path ${DATA_PATH} \
    --theme ${THEME} \
    --tag gen_retain0_vs_full_${THEME}

  DATA_PATH=output_images/full_forget/${THEME}
  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ${FULL_CKPT} \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path ${DATA_PATH} \
    --theme ${THEME} \
    --tag gen_full_vs_retain0_${THEME}

done

# Measure FADE across retain models
for t_idx in "${!THEMES[@]}"
do
  THEME=${THEMES[$t_idx]}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ./logs/retain_seed1.ckpt \
    --retain_ckpt ./logs/retain_seed0.ckpt \
    --data_path output_images/retain0_forget/${THEME} \
    --theme ${THEME} \
    --tag gen_retain0_vs_retain1_${THEME}

done

# Measure FADE between unlearned model and retain models
RETAIN_CKPT=./logs/retain_seed0.ckpt
for t_idx in "${!THEMES[@]}"
do
  THEME=${THEMES[$t_idx]}
  SMALL_THEME=${SMALL_THEMES[$t_idx]}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ../machine_unlearning/mu_concept_ablation_ca/logs/ca_${SMALL_THEME}/checkpoints/last.ckpt \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path output_images/unlearned_forget/CA/${THEME} \
    --theme ${THEME} \
    --tag gen_CA_vs_retain2_${THEME}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ../machine_unlearning/mu_erase_diff_ediff/results/${THEME}/sd.ckpt \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path output_images/unlearned_forget/EDiff/${THEME} \
    --theme ${THEME} \
    --tag gen_EDiff_vs_retain2_${THEME}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ../machine_unlearning/mu_erasing_concept_esd/results/style50/${THEME}.pth \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path output_images/unlearned_forget/ESD/${THEME} \
    --theme ${THEME} \
    --tag gen_ESD_vs_retain2_${THEME}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ../machine_unlearning/mu_saliency_unlearn_salun/results/style50/${THEME}/sd_0.4.ckpt \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path output_images/unlearned_forget/SalUn/${THEME} \
    --theme ${THEME} \
    --tag gen_SalUn_vs_retain2_${THEME}

  CUDA_VISIBLE_DEVICES=${DEVICE} python3 measure_fade.py \
    --unlearn_ckpt ../machine_unlearning/mu_scissorhands_shs/results/${THEME}/sd.ckpt \
    --retain_ckpt ${RETAIN_CKPT} \
    --data_path output_images/unlearned_forget/SHS/${THEME} \
    --theme ${THEME} \
    --tag gen_SHS_vs_retain2_${THEME}

done