File size: 2,183 Bytes
dcb029a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
model:
  checkpoint_path: "./models/aura_flow_0.3.bnb_nf4.safetensors"
  pretrained_model_name_or_path: fal/AuraFlow-v0.3

  dtype: bfloat16

  denoiser:
    use_flash_attn: true

    use_shortcut: true

  flow_matching_ratio: 0.75
  shortcut_max_steps: 128
  shortcut_cfg_scale: 1.0

  timestep_sampling_type: "sigmoid"

peft:
  - # linear layers
    config:
      type: lora
      rank: 4
      alpha: 1.0
      dropout: 0.0
      use_bias: false

      dtype: bfloat16

    include_keys: [
        ".attn.",
        ".mlp.",
        ".mlpC.",
        ".mlpX.",
        # include the AdaLN-Zero modulation layers
        ".modC.",
        ".modX.",
        ".modCX.",
      ]
    exclude_keys:
      [".text_encoder.", ".vae.", ".t_embedder.", ".final_linear.", ".modF."]

  - # shortcut embedder
    config:
      type: lora
      rank: 4
      alpha: 1.0
      dropout: 0.0
      use_bias: true # use bias

      dtype: bfloat16

    include_keys: [".t_embedder.", ".shortcut_embedder."]
    exclude_keys: [".text_encoder.", ".vae.", ".final_linear.", ".modF."]

dataset:
  folder: "data/pexels-1k-random"
  num_repeats: 2
  batch_size: 2

  bucket_base_size: 1024
  step: 128
  min_size: 384
  do_upscale: false

  caption_processors: []

optimizer:
  name: "schedulefree.RAdamScheduleFree"
  args:
    lr: 0.03

tracker:
  project_name: "auraflow-shortcut-1"
  loggers:
    - wandb

saving:
  strategy:
    per_epochs: 1
    per_steps: null
    save_last: true

  callbacks:
    - type: "hf_hub"
      # - type: "safetensors"
      name: "shortcut-10"
      save_dir: "./output/shortcut-10"

      hub_id: "p1atdev/afv03-lora"
      dir_in_repo: "shortcut-10"

preview:
  strategy:
    per_epochs: 1
    per_steps: 100

  callbacks:
    # - type: "local"
    #   save_dir: "./output/shortcut-08/preview"

    - type: "discord"
      url: "masked"

  data:
    path: "./projects/shortcut/preview.yml"

seed: 42
num_train_epochs: 20

trainer:
  # debug_mode: "1step"

  gradient_checkpointing: true
  gradient_accumulation_steps: 16

  clip_grad_norm: 1.0

  torch_compile: true
  torch_compile_args:
    mode: max-autotune
    fullgraph: true

  fp32_matmul_precision: "medium"