Upload config.yaml with huggingface_hub
Browse files- config.yaml +75 -0
config.yaml
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
model:
|
| 2 |
+
transport:
|
| 3 |
+
path_type: linear
|
| 4 |
+
prediction: v
|
| 5 |
+
weighting: lognormal
|
| 6 |
+
network:
|
| 7 |
+
target: nit.models.c2i.nit_model.NiT
|
| 8 |
+
params:
|
| 9 |
+
class_dropout_prob: 0.1
|
| 10 |
+
num_classes: 1000
|
| 11 |
+
depth: 28
|
| 12 |
+
hidden_size: 1152
|
| 13 |
+
patch_size: 1
|
| 14 |
+
in_channels: 32
|
| 15 |
+
num_heads: 16
|
| 16 |
+
qk_norm: True
|
| 17 |
+
encoder_depth: 8
|
| 18 |
+
z_dim: 1280
|
| 19 |
+
use_checkpoint: False
|
| 20 |
+
# pretrained_vae:
|
| 21 |
+
vae_dir: mit-han-lab/dc-ae-f32c32-sana-1.1-diffusers
|
| 22 |
+
slice_vae: False
|
| 23 |
+
tile_vae: False
|
| 24 |
+
# repa encoder
|
| 25 |
+
enc_type: radio
|
| 26 |
+
enc_dir: checkpoints/radio_v2.5-h.pth.tar
|
| 27 |
+
proj_coeff: 1.0
|
| 28 |
+
# ema
|
| 29 |
+
use_ema: True
|
| 30 |
+
ema_decay: 0.9999
|
| 31 |
+
|
| 32 |
+
data:
|
| 33 |
+
data_type: improved_pack
|
| 34 |
+
dataset:
|
| 35 |
+
packed_json: datasets/imagenet1k/sampler_meta/dc-ae-f32c32-sana-1.1-diffusers_merge_LPFHP_16384.json
|
| 36 |
+
jsonl_dir: datasets/imagenet1k/data_meta/dc-ae-f32c32-sana-1.1-diffusers_merge_meta.jsonl
|
| 37 |
+
data_types: ['native-resolution', 'fixed-256x256', 'fixed-512x512']
|
| 38 |
+
latent_dirs: [
|
| 39 |
+
'datasets/imagenet1k/dc-ae-f32c32-sana-1.1-diffusers-native-resolution',
|
| 40 |
+
'datasets/imagenet1k/dc-ae-f32c32-sana-1.1-diffusers-256x256',
|
| 41 |
+
'datasets/imagenet1k/dc-ae-f32c32-sana-1.1-diffusers-512x512',
|
| 42 |
+
]
|
| 43 |
+
image_dir: <Your imagenet1k directory>/train
|
| 44 |
+
dataloader:
|
| 45 |
+
num_workers: 4
|
| 46 |
+
batch_size: 1 # Batch size (per device) for the training dataloader.
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
training:
|
| 51 |
+
tracker: null
|
| 52 |
+
tracker_kwargs: {'wandb': {'group': 'c2i'}}
|
| 53 |
+
max_train_steps: 2000000
|
| 54 |
+
checkpointing_steps: 2000
|
| 55 |
+
checkpoints_total_limit: 2
|
| 56 |
+
resume_from_checkpoint: latest
|
| 57 |
+
learning_rate: 5.0e-5
|
| 58 |
+
learning_rate_base_batch_size: 4
|
| 59 |
+
scale_lr: True
|
| 60 |
+
lr_scheduler: constant # "linear", "cosine", "cosine_with_restarts", "polynomial", "constant", "constant_with_warmup"]
|
| 61 |
+
lr_warmup_steps: 0
|
| 62 |
+
gradient_accumulation_steps: 1
|
| 63 |
+
optimizer:
|
| 64 |
+
target: torch.optim.AdamW
|
| 65 |
+
params:
|
| 66 |
+
# betas: ${tuple:0.9, 0.999}
|
| 67 |
+
betas: [0.9, 0.95]
|
| 68 |
+
weight_decay: 1.0e-2
|
| 69 |
+
eps: 1.0e-6
|
| 70 |
+
max_grad_norm: 1.0
|
| 71 |
+
proportion_empty_prompts: 0.0
|
| 72 |
+
mixed_precision: bf16 # ["no", "fp16", "bf16"]
|
| 73 |
+
allow_tf32: True
|
| 74 |
+
validation_steps: 500
|
| 75 |
+
checkpoint_list: [200000, 500000, 100000, 150000]
|