File size: 5,506 Bytes
d09ccf3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: yingyi-run

trainer:
  model_url: 
  model_path: "/root/autodl-tmp/nd/knd19"
  init_batch_size: 1
  resolution: 768
  center_crop: false
  gradient_checkpointing: true
  clip_skip: 2
  seed: 1138
  precision: fp32
  use_ema: true
  half_encoder: false
  use_hivemind: false
  lr_scale: sqrt
  attention_slicing: false
  vae_slicing: false
  train_text_encoder: false
  
  # note: only works with init_batch_size > 1
  use_xformers: true
  
checkpoint:
  monitor: 'epoch'
  dirpath: checkpoint
  filename: 'knd-nd-epoch{epoch:02d}-loss{train_loss:.2f}'
  auto_insert_metric_name: false
  every_n_epochs: 5
  save_top_k: -1
  mode: 'max'
  save_last: false

lightning:
  accelerator: gpu
  devices: -1
  auto_select_gpus: true
  # limit_train_batches: 100
  max_epochs: 40
  precision: 16
  log_every_n_steps: 1
  accumulate_grad_batches: 2
  gradient_clip_val: 0.0
  auto_scale_batch_size: true
  auto_lr_find: false
  move_metrics_to_cpu: true

arb:
  enabled: true
  debug: false
  base_res: [768, 768]
  max_size: [768, 1536]
  divisible: 64
  max_ar_error: 4
  min_dim: 512
  dim_limit: 1728

dataset:
  img_path: 
    - "/root/autodl-tmp/knd_set2"
  center_crop: false
  ucg: 0.1
  debug_arb: false
  num_workers: 3
  process_tags: true
  important_tags: [yoisaki kanade, 25-ji night code de. (project sekai), project sekai, blue hair, grey hair]
  augment:
    enabled: true
    debug: false
    dropout: 0.5
    methods:
      flip: true
      adjust_brightness: 1.01
      adjust_contrast: 1.01
      rotate_with_crop: 2

scheduler:
  name: diffusers.DDIMScheduler
  params:
      beta_end: 0.012
      beta_schedule: "scaled_linear"
      beta_start: 0.00085
      clip_sample: false
      num_train_timesteps: 1000
      set_alpha_to_one: false
      steps_offset: 1
      trained_betas: null

optimizer:
  name: bitsandbytes.optim.AdamW8bit
  #name: torch.optim.AdamW
  params:
    lr: 2e-6
    weight_decay: 1e-2
    eps: 1e-8

lr_scheduler:
  name: torch.optim.lr_scheduler.CosineAnnealingWarmRestarts
  warmup: 
    enabled: false
    init_lr: 2e-8
    num_warmup: 50
    warmup_strategy: "cos"
  params:
    T_0: 10
    T_mult: 1
    eta_min: 7e-8
    last_epoch: -1

monitor:
  wandb_id: ""
  huggingface_repo: ""
  hf_auth_token: ""
  store_checkpoints: false

sampling:
  enabled: true
  use_wandb: true
  every_n_steps: -1
  every_n_epochs: 1
  save_dir: "/root/autodl-tmp/naifu-diffusion/samples"
  seed: 1139
  height: 512
  width: 512
  steps: 20
  cfg_scale: 9
  negative_prompts: 
    - "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
    - "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
    - "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
    - "lowres, bad anatomy, bad hands, text, error, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, normal quality, jpeg artifacts, signature, watermark, username, blurry"
  prompts: 
    - "yoisaki kanade, 25-ji night code de. (project sekai), 1girl, solo, blue eyes, long hair, white background, simple background, looking at viewer, jacket, blue jacket, hair between eyes, upper body, blush, closed mouth, nail polish, hands on own face, bangs, long sleeves, shirt, open clothes, open jacket, black camisole, blue nails, collarbone, camisole, ahoge, black shirt, blue hoodie, blue theme, embarrassed, grey hair, hood, hoodie, sidelocks, spaghetti strap, anataa, project sekai, absurdres, highres"
    - "yoisaki kanade, 25-ji night code de. (project sekai), 1girl, solo, long hair, blue eyes, jacket, ponytail, blue jacket, looking at viewer, shirt, shorts, simple background, white shirt, sitting, hair between eyes, blue hair, very long hair, long sleeves, grey background, bangs, closed mouth, alternate hairstyle, arms between legs, expressionless, grey shorts, messy hair, squatting, thighs, v arms, fuinagi (huyuu mm), project sekai, absurdres, highres, partial commentary"
    - "yoisaki kanade, 25-ji night code de. (project sekai), 1girl, solo, blue eyes, long hair, hood, neckerchief, hoodie, looking at viewer, hair between eyes, upper body, sleeves past wrists, signature, red neckerchief, expressionless, artist name, bangs, black hoodie, black neckerchief, blue hair, closed mouth, hair over shoulder, light blue hair, shadow, sidelocks, split mouth, two-tone neckerchief, very long hair, kusunokimizuha, project sekai, absurdres, highres"
    - "yoisaki kanade, 25-ji night code de. (project sekai), 1girl, solo, long hair, blue eyes, blurry background, looking at viewer, parted lips, red neckerchief, hood, hair between eyes, neckerchief, hoodie, blurry, long sleeves, hood down, very long hair, upper body, bangs, hand up, black hoodie, white hair, adjusting hair, arm at side, backlighting, black neckerchief, dot nose, expressionless, eyelashes, facing viewer, floating hair, grey hoodie, hand in own hair, outdoors, sideways glance, sleeves past wrists, straight hair, tsurime, two-tone hoodie, two-tone neckerchief, nannaspad, project sekai, absurdres, highres"

encoder:
  # Leave blank to load from model
  text: 
  vae: