-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdxl_process_data_dir.sh
executable file
·28 lines (25 loc) · 1.16 KB
/
sdxl_process_data_dir.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
#export CUDA_VISIBLE_DEVICES=0 #don't use this, use the single_gpu.yaml to select gpu
#export TRANSFORMERS_OFFLINE=1 #enable to run huggingface offline, using cache
#arguments:
# --cache_dir save cached latents to dir
# --data_dir image-caption.txt pair dir
# --basename basename is the name of the dataset folder
# example "/mnt/storage/comics_dataset/" basename is "comics_dataset
# this is used to keep the cache directory organized
# --pretrained_model_name_or_path sdxl model to train
# --max_resolution max training image resolution
# --min_resolution mix training image resolution
# --upscale_to_resolution resolution to upscale images to
# --upscale_use_GFPGAN use GFPGAN - for photos
# --save_upscale_samples saves copy of upscaled images
export NCCL_P2P_DISABLE=1
export NCCL_IB_DISABLE=1
source venv/bin/activate
accelerate launch --config_file single_gpu_0.yaml sdxl_process_data_dir_06.py \
--cache_dir /mnt/storage/cache/ \
--data_dir sample_dataset \
--basename sample_dataset \
--max_resolution 1024 \
--min_resolution 256 \
--upscale_to_resolution 1024 \
--pretrained_model_name_or_path stabilityai/stable-diffusion-xl-base-1.0