-
Notifications
You must be signed in to change notification settings - Fork 2
/
run.sh
29 lines (26 loc) · 1003 Bytes
/
run.sh
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
classes=cat_dog # the input image
pretrained_model_path=checkpoints/v1-5-pruned.ckpt
datapath=datasets/images/$classes
caption="<new1> cat and <new2> dog" # the training input prompt
modifier_token="<new1>+<new2>" # new tokens
newtoken=2 # the number of new tokens
fine_yaml=full.yaml
seed=1
suffix="full_${seed}"
name=$classes_${suffix}
save_path=DisenDiff/$classes
class_prompt="a cat and a dog"
python src/retrieve.py --class_prompt "$class_prompt" --class_data_dir real_reg/samples_${classes}
python -u train.py \
--base configs/$fine_yaml \
-t --gpus=1 \
--resume-from-checkpoint-custom $pretrained_model_path \
--caption "$caption" \
--datapath $datapath \
--reg_datapath "real_reg/samples_${classes}/images.txt" \
--reg_caption "real_reg/samples_${classes}/caption.txt" \
--modifier_token "$modifier_token" \
--name "$name" \
--logdir $save_path \
--accumulate_grad_batches 4 \
--seed $seed