vaskers5 commited on
Commit
a43f408
·
verified ·
1 Parent(s): 73c1937

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. 01_11_2025/31/basicsr_options.yaml +222 -0
  2. 01_11_2025/31/train_31_20251101_183720.log +0 -0
  3. 01_11_2025/31_2/basicsr_options.yaml +215 -0
  4. 01_11_2025/31_2/train_31_2_20251101_103842.log +568 -0
  5. 01_11_2025/31_3/basicsr_options.yaml +215 -0
  6. 01_11_2025/31_3/train_31_3_20251101_104217.log +573 -0
  7. 01_11_2025/31_4/basicsr_options.yaml +222 -0
  8. 01_11_2025/31_4/train_31_4_20251101_172839.log +573 -0
  9. 01_11_2025/31_5/basicsr_options.yaml +222 -0
  10. 01_11_2025/31_5/train_31_5_20251101_173817.log +572 -0
  11. 01_11_2025/31_6/basicsr_options.yaml +222 -0
  12. 01_11_2025/31_6/train_31_6_20251101_174750.log +571 -0
  13. 01_11_2025/31_7/basicsr_options.yaml +222 -0
  14. 01_11_2025/31_7/train_31_7_20251101_175028.log +573 -0
  15. 01_11_2025/31_archived_20251101_104923/basicsr_options.yaml +237 -0
  16. 01_11_2025/31_archived_20251101_104923/train_31_20251101_095717.log +594 -0
  17. 01_11_2025/31_archived_20251101_163428/basicsr_options.yaml +215 -0
  18. 01_11_2025/31_archived_20251101_163428/train_31_20251101_104923.log +0 -0
  19. 01_11_2025/31_archived_20251101_163435/basicsr_options.yaml +222 -0
  20. 01_11_2025/31_archived_20251101_163435/train_31_20251101_163428.log +570 -0
  21. 01_11_2025/31_archived_20251101_175603/basicsr_options.yaml +222 -0
  22. 01_11_2025/31_archived_20251101_175603/train_31_20251101_163435.log +571 -0
  23. 01_11_2025/31_archived_20251101_175606/basicsr_options.yaml +222 -0
  24. 01_11_2025/31_archived_20251101_175606/train_31_20251101_175603.log +571 -0
  25. 01_11_2025/31_archived_20251101_180557/basicsr_options.yaml +222 -0
  26. 01_11_2025/31_archived_20251101_180557/train_31_20251101_175606.log +571 -0
  27. 01_11_2025/31_archived_20251101_181616/basicsr_options.yaml +222 -0
  28. 01_11_2025/31_archived_20251101_181616/train_31_20251101_180557.log +571 -0
  29. 01_11_2025/31_archived_20251101_182408/basicsr_options.yaml +222 -0
  30. 01_11_2025/31_archived_20251101_182408/train_31_20251101_181616.log +573 -0
  31. 01_11_2025/31_archived_20251101_183720/basicsr_options.yaml +222 -0
  32. 01_11_2025/32_2/basicsr_options.yaml +220 -0
  33. 01_11_2025/32_2/train_32_2_20251101_172859.log +569 -0
  34. 01_11_2025/32_3/basicsr_options.yaml +220 -0
  35. 01_11_2025/32_3/train_32_3_20251101_173103.log +569 -0
  36. 01_11_2025/32_3_archived_20251101_173103/basicsr_options.yaml +220 -0
  37. 01_11_2025/32_3_archived_20251101_173103/train_32_3_20251101_173102.log +569 -0
  38. 01_11_2025/32_4/basicsr_options.yaml +220 -0
  39. 01_11_2025/32_4/train_32_4_20251101_173315.log +570 -0
  40. 01_11_2025/32_4_archived_20251101_173315/train_32_4_20251101_173312.log +570 -0
  41. 01_11_2025/32_5/train_32_5_20251101_175216.log +569 -0
  42. 01_11_2025/32_6/basicsr_options.yaml +220 -0
  43. 01_11_2025/basicsr_options.yaml +216 -0
  44. 02_11_2025/basicsr_options.yaml +248 -0
  45. 26_10_2025/basicsr_options.yaml +175 -0
  46. 27_10_2025/basicsr_options.yaml +157 -0
  47. 28_10_2025/basicsr_options.yaml +142 -0
  48. 29_10_2025/basicsr_options.yaml +153 -0
  49. 30_10_2025/basicsr_options.yaml +222 -0
  50. 31_10_2025/basicsr_options.yaml +224 -0
01_11_2025/31/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 18:37:20 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31/train_31_20251101_183720.log ADDED
The diff for this file is too large to render. See raw diff
 
01_11_2025/31_2/basicsr_options.yaml ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 10:38:42 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 4
39
+ batch_size_per_gpu: 8
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ optim_g:
108
+ type: Adam
109
+ lr: 0.0002
110
+ weight_decay: 0
111
+ betas:
112
+ - 0.9
113
+ - 0.995
114
+ grad_clip:
115
+ enabled: true
116
+ generator:
117
+ type: norm
118
+ max_norm: 0.4
119
+ norm_type: 2.0
120
+ scheduler:
121
+ type: MultiStepLR
122
+ milestones:
123
+ - 62500
124
+ - 93750
125
+ - 112500
126
+ gamma: 0.5
127
+ total_steps: 125000
128
+ warmup_iter: -1
129
+ l1_latent_x2_opt:
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x2
135
+ l1_latent_x4_opt:
136
+ type: L1Loss
137
+ loss_weight: 1.0
138
+ reduction: mean
139
+ space: latent
140
+ target: x4
141
+ fft_latent_x2_opt:
142
+ type: FFTFrequencyLoss
143
+ loss_weight: 0.1
144
+ reduction: mean
145
+ space: latent
146
+ target: x2
147
+ norm: ortho
148
+ use_log_amplitude: false
149
+ alpha: 0.0
150
+ normalize_weight: true
151
+ eps: 1e-8
152
+ fft_latent_x4_opt:
153
+ type: FFTFrequencyLoss
154
+ loss_weight: 0.1
155
+ reduction: mean
156
+ space: latent
157
+ target: x4
158
+ norm: ortho
159
+ use_log_amplitude: false
160
+ alpha: 0.0
161
+ normalize_weight: true
162
+ eps: 1e-8
163
+ val:
164
+ val_freq: 100
165
+ save_img: true
166
+ head_evals:
167
+ x2:
168
+ save_img: true
169
+ label: val_x2
170
+ val_sizes:
171
+ lq: 256
172
+ gt: 512
173
+ metrics:
174
+ l1_latent:
175
+ type: L1Loss
176
+ space: latent
177
+ pixel_psnr_pt:
178
+ type: calculate_psnr_pt
179
+ space: pixel
180
+ crop_border: 2
181
+ test_y_channel: false
182
+ x4:
183
+ save_img: true
184
+ label: val_x4
185
+ val_sizes:
186
+ lq: 128
187
+ gt: 512
188
+ metrics:
189
+ l1_latent:
190
+ type: L1Loss
191
+ space: latent
192
+ l2_latent:
193
+ type: MSELoss
194
+ space: latent
195
+ pixel_psnr_pt:
196
+ type: calculate_psnr_pt
197
+ space: pixel
198
+ crop_border: 2
199
+ test_y_channel: false
200
+ logger:
201
+ print_freq: 100
202
+ save_checkpoint_freq: 5000
203
+ use_tb_logger: true
204
+ wandb:
205
+ project: Swin2SR-Latent-SR
206
+ entity: kazanplova-it-more
207
+ resume_id: null
208
+ max_val_images: 10
209
+ dist_params:
210
+ backend: nccl
211
+ port: 29500
212
+ dist: true
213
+ load_networks_only: false
214
+ exp_name: '31'
215
+ name: '31_2'
01_11_2025/31_2/train_31_2_20251101_103842.log ADDED
@@ -0,0 +1,568 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 10:38:42,366 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 10:38:42,366 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 4
46
+ batch_size_per_gpu: 8
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_2
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_2/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_2/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_2
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_2/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ optim_g:[
102
+ type: Adam
103
+ lr: 0.0002
104
+ weight_decay: 0
105
+ betas: [0.9, 0.995]
106
+ ]
107
+ grad_clip:[
108
+ enabled: True
109
+ generator:[
110
+ type: norm
111
+ max_norm: 0.4
112
+ norm_type: 2.0
113
+ ]
114
+ ]
115
+ scheduler:[
116
+ type: MultiStepLR
117
+ milestones: [62500, 93750, 112500]
118
+ gamma: 0.5
119
+ ]
120
+ total_steps: 125000
121
+ warmup_iter: -1
122
+ l1_latent_x2_opt:[
123
+ type: L1Loss
124
+ loss_weight: 1.0
125
+ reduction: mean
126
+ space: latent
127
+ target: x2
128
+ ]
129
+ l1_latent_x4_opt:[
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x4
135
+ ]
136
+ fft_latent_x2_opt:[
137
+ type: FFTFrequencyLoss
138
+ loss_weight: 0.1
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ norm: ortho
143
+ use_log_amplitude: False
144
+ alpha: 0.0
145
+ normalize_weight: True
146
+ eps: 1e-8
147
+ ]
148
+ fft_latent_x4_opt:[
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x4
154
+ norm: ortho
155
+ use_log_amplitude: False
156
+ alpha: 0.0
157
+ normalize_weight: True
158
+ eps: 1e-8
159
+ ]
160
+ ]
161
+ val:[
162
+ val_freq: 100
163
+ save_img: True
164
+ head_evals:[
165
+ x2:[
166
+ save_img: True
167
+ label: val_x2
168
+ val_sizes:[
169
+ lq: 256
170
+ gt: 512
171
+ ]
172
+ metrics:[
173
+ l1_latent:[
174
+ type: L1Loss
175
+ space: latent
176
+ ]
177
+ pixel_psnr_pt:[
178
+ type: calculate_psnr_pt
179
+ space: pixel
180
+ crop_border: 2
181
+ test_y_channel: False
182
+ ]
183
+ ]
184
+ ]
185
+ x4:[
186
+ save_img: True
187
+ label: val_x4
188
+ val_sizes:[
189
+ lq: 128
190
+ gt: 512
191
+ ]
192
+ metrics:[
193
+ l1_latent:[
194
+ type: L1Loss
195
+ space: latent
196
+ ]
197
+ l2_latent:[
198
+ type: MSELoss
199
+ space: latent
200
+ ]
201
+ pixel_psnr_pt:[
202
+ type: calculate_psnr_pt
203
+ space: pixel
204
+ crop_border: 2
205
+ test_y_channel: False
206
+ ]
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ logger:[
212
+ print_freq: 100
213
+ save_checkpoint_freq: 5000
214
+ use_tb_logger: True
215
+ wandb:[
216
+ project: Swin2SR-Latent-SR
217
+ entity: kazanplova-it-more
218
+ resume_id: None
219
+ max_val_images: 10
220
+ ]
221
+ ]
222
+ dist_params:[
223
+ backend: nccl
224
+ port: 29500
225
+ dist: True
226
+ ]
227
+ load_networks_only: False
228
+ exp_name: 31
229
+ name: 31_2
230
+ dist: False
231
+ rank: 0
232
+ world_size: 1
233
+ auto_resume: False
234
+ is_train: True
235
+ root_path: /data/kazanplova/latent_vae_upscale_train
236
+
237
+ 2025-11-01 10:38:44,023 INFO: Use wandb logger with id=7j8tr34z; project=Swin2SR-Latent-SR.
238
+ 2025-11-01 10:38:57,204 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
239
+ 2025-11-01 10:38:57,205 INFO: Training statistics:
240
+ Number of train images: 4858507
241
+ Dataset enlarge ratio: 1
242
+ Batch size per gpu: 8
243
+ World size (gpu number): 1
244
+ Steps per epoch: 607314
245
+ Configured training steps: 125000
246
+ Approximate epochs to cover: 1.
247
+ 2025-11-01 10:38:57,211 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
248
+ 2025-11-01 10:38:57,211 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
249
+ 2025-11-01 10:38:57,418 INFO: Network [SwinIRMultiHead] is created.
250
+ 2025-11-01 10:38:57,654 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
251
+ 2025-11-01 10:38:57,655 INFO: SwinIRMultiHead(
252
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
253
+ (patch_embed): PatchEmbed(
254
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
255
+ )
256
+ (patch_unembed): PatchUnEmbed()
257
+ (pos_drop): Dropout(p=0.0, inplace=False)
258
+ (layers): ModuleList(
259
+ (0): RSTB(
260
+ (residual_group): BasicLayer(
261
+ dim=180, input_resolution=(32, 32), depth=6
262
+ (blocks): ModuleList(
263
+ (0): SwinTransformerBlock(
264
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
265
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
266
+ (attn): WindowAttention(
267
+ dim=180, window_size=(8, 8), num_heads=6
268
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
269
+ (attn_drop): Dropout(p=0.0, inplace=False)
270
+ (proj): Linear(in_features=180, out_features=180, bias=True)
271
+ (proj_drop): Dropout(p=0.0, inplace=False)
272
+ (softmax): Softmax(dim=-1)
273
+ )
274
+ (drop_path): Identity()
275
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (mlp): Mlp(
277
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
278
+ (act): GELU(approximate='none')
279
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
280
+ (drop): Dropout(p=0.0, inplace=False)
281
+ )
282
+ )
283
+ (1): SwinTransformerBlock(
284
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
285
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (attn): WindowAttention(
287
+ dim=180, window_size=(8, 8), num_heads=6
288
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
289
+ (attn_drop): Dropout(p=0.0, inplace=False)
290
+ (proj): Linear(in_features=180, out_features=180, bias=True)
291
+ (proj_drop): Dropout(p=0.0, inplace=False)
292
+ (softmax): Softmax(dim=-1)
293
+ )
294
+ (drop_path): DropPath()
295
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (mlp): Mlp(
297
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
298
+ (act): GELU(approximate='none')
299
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
300
+ (drop): Dropout(p=0.0, inplace=False)
301
+ )
302
+ )
303
+ (2): SwinTransformerBlock(
304
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
305
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (attn): WindowAttention(
307
+ dim=180, window_size=(8, 8), num_heads=6
308
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
309
+ (attn_drop): Dropout(p=0.0, inplace=False)
310
+ (proj): Linear(in_features=180, out_features=180, bias=True)
311
+ (proj_drop): Dropout(p=0.0, inplace=False)
312
+ (softmax): Softmax(dim=-1)
313
+ )
314
+ (drop_path): DropPath()
315
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (mlp): Mlp(
317
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
318
+ (act): GELU(approximate='none')
319
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
320
+ (drop): Dropout(p=0.0, inplace=False)
321
+ )
322
+ )
323
+ (3): SwinTransformerBlock(
324
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
325
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (attn): WindowAttention(
327
+ dim=180, window_size=(8, 8), num_heads=6
328
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
329
+ (attn_drop): Dropout(p=0.0, inplace=False)
330
+ (proj): Linear(in_features=180, out_features=180, bias=True)
331
+ (proj_drop): Dropout(p=0.0, inplace=False)
332
+ (softmax): Softmax(dim=-1)
333
+ )
334
+ (drop_path): DropPath()
335
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (mlp): Mlp(
337
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
338
+ (act): GELU(approximate='none')
339
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
340
+ (drop): Dropout(p=0.0, inplace=False)
341
+ )
342
+ )
343
+ (4): SwinTransformerBlock(
344
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
345
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (attn): WindowAttention(
347
+ dim=180, window_size=(8, 8), num_heads=6
348
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
349
+ (attn_drop): Dropout(p=0.0, inplace=False)
350
+ (proj): Linear(in_features=180, out_features=180, bias=True)
351
+ (proj_drop): Dropout(p=0.0, inplace=False)
352
+ (softmax): Softmax(dim=-1)
353
+ )
354
+ (drop_path): DropPath()
355
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (mlp): Mlp(
357
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
358
+ (act): GELU(approximate='none')
359
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
360
+ (drop): Dropout(p=0.0, inplace=False)
361
+ )
362
+ )
363
+ (5): SwinTransformerBlock(
364
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
365
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (attn): WindowAttention(
367
+ dim=180, window_size=(8, 8), num_heads=6
368
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
369
+ (attn_drop): Dropout(p=0.0, inplace=False)
370
+ (proj): Linear(in_features=180, out_features=180, bias=True)
371
+ (proj_drop): Dropout(p=0.0, inplace=False)
372
+ (softmax): Softmax(dim=-1)
373
+ )
374
+ (drop_path): DropPath()
375
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (mlp): Mlp(
377
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
378
+ (act): GELU(approximate='none')
379
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
380
+ (drop): Dropout(p=0.0, inplace=False)
381
+ )
382
+ )
383
+ )
384
+ )
385
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
386
+ (patch_embed): PatchEmbed()
387
+ (patch_unembed): PatchUnEmbed()
388
+ )
389
+ (1-5): 5 x RSTB(
390
+ (residual_group): BasicLayer(
391
+ dim=180, input_resolution=(32, 32), depth=6
392
+ (blocks): ModuleList(
393
+ (0): SwinTransformerBlock(
394
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
395
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
396
+ (attn): WindowAttention(
397
+ dim=180, window_size=(8, 8), num_heads=6
398
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
399
+ (attn_drop): Dropout(p=0.0, inplace=False)
400
+ (proj): Linear(in_features=180, out_features=180, bias=True)
401
+ (proj_drop): Dropout(p=0.0, inplace=False)
402
+ (softmax): Softmax(dim=-1)
403
+ )
404
+ (drop_path): DropPath()
405
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (mlp): Mlp(
407
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
408
+ (act): GELU(approximate='none')
409
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
410
+ (drop): Dropout(p=0.0, inplace=False)
411
+ )
412
+ )
413
+ (1): SwinTransformerBlock(
414
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
415
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (attn): WindowAttention(
417
+ dim=180, window_size=(8, 8), num_heads=6
418
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
419
+ (attn_drop): Dropout(p=0.0, inplace=False)
420
+ (proj): Linear(in_features=180, out_features=180, bias=True)
421
+ (proj_drop): Dropout(p=0.0, inplace=False)
422
+ (softmax): Softmax(dim=-1)
423
+ )
424
+ (drop_path): DropPath()
425
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (mlp): Mlp(
427
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
428
+ (act): GELU(approximate='none')
429
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
430
+ (drop): Dropout(p=0.0, inplace=False)
431
+ )
432
+ )
433
+ (2): SwinTransformerBlock(
434
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
435
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (attn): WindowAttention(
437
+ dim=180, window_size=(8, 8), num_heads=6
438
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
439
+ (attn_drop): Dropout(p=0.0, inplace=False)
440
+ (proj): Linear(in_features=180, out_features=180, bias=True)
441
+ (proj_drop): Dropout(p=0.0, inplace=False)
442
+ (softmax): Softmax(dim=-1)
443
+ )
444
+ (drop_path): DropPath()
445
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (mlp): Mlp(
447
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
448
+ (act): GELU(approximate='none')
449
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
450
+ (drop): Dropout(p=0.0, inplace=False)
451
+ )
452
+ )
453
+ (3): SwinTransformerBlock(
454
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
455
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (attn): WindowAttention(
457
+ dim=180, window_size=(8, 8), num_heads=6
458
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
459
+ (attn_drop): Dropout(p=0.0, inplace=False)
460
+ (proj): Linear(in_features=180, out_features=180, bias=True)
461
+ (proj_drop): Dropout(p=0.0, inplace=False)
462
+ (softmax): Softmax(dim=-1)
463
+ )
464
+ (drop_path): DropPath()
465
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (mlp): Mlp(
467
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
468
+ (act): GELU(approximate='none')
469
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
470
+ (drop): Dropout(p=0.0, inplace=False)
471
+ )
472
+ )
473
+ (4): SwinTransformerBlock(
474
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
475
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (attn): WindowAttention(
477
+ dim=180, window_size=(8, 8), num_heads=6
478
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
479
+ (attn_drop): Dropout(p=0.0, inplace=False)
480
+ (proj): Linear(in_features=180, out_features=180, bias=True)
481
+ (proj_drop): Dropout(p=0.0, inplace=False)
482
+ (softmax): Softmax(dim=-1)
483
+ )
484
+ (drop_path): DropPath()
485
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (mlp): Mlp(
487
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
488
+ (act): GELU(approximate='none')
489
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
490
+ (drop): Dropout(p=0.0, inplace=False)
491
+ )
492
+ )
493
+ (5): SwinTransformerBlock(
494
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
495
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (attn): WindowAttention(
497
+ dim=180, window_size=(8, 8), num_heads=6
498
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
499
+ (attn_drop): Dropout(p=0.0, inplace=False)
500
+ (proj): Linear(in_features=180, out_features=180, bias=True)
501
+ (proj_drop): Dropout(p=0.0, inplace=False)
502
+ (softmax): Softmax(dim=-1)
503
+ )
504
+ (drop_path): DropPath()
505
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (mlp): Mlp(
507
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
508
+ (act): GELU(approximate='none')
509
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
510
+ (drop): Dropout(p=0.0, inplace=False)
511
+ )
512
+ )
513
+ )
514
+ )
515
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
516
+ (patch_embed): PatchEmbed()
517
+ (patch_unembed): PatchUnEmbed()
518
+ )
519
+ )
520
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
521
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
522
+ (heads): ModuleDict(
523
+ (x2): _SwinIRPixelShuffleHead(
524
+ (conv_before): Sequential(
525
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
527
+ )
528
+ (upsample): Upsample(
529
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (1): PixelShuffle(upscale_factor=2)
531
+ )
532
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
533
+ )
534
+ (x4): _SwinIRPixelShuffleHead(
535
+ (conv_before): Sequential(
536
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
537
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
538
+ )
539
+ (upsample): Upsample(
540
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ (1): PixelShuffle(upscale_factor=2)
542
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ (3): PixelShuffle(upscale_factor=2)
544
+ )
545
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
546
+ )
547
+ )
548
+ )
549
+ 2025-11-01 10:38:57,658 INFO: Use EMA with decay: 0.999
550
+ 2025-11-01 10:38:57,925 INFO: Network [SwinIRMultiHead] is created.
551
+ 2025-11-01 10:38:57,977 INFO: Loss [L1Loss] is created.
552
+ 2025-11-01 10:38:57,978 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
553
+ 2025-11-01 10:38:57,979 INFO: Loss [L1Loss] is created.
554
+ 2025-11-01 10:38:57,981 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
555
+ 2025-11-01 10:38:57,981 INFO: Loss [FFTFrequencyLoss] is created.
556
+ 2025-11-01 10:38:57,982 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
557
+ 2025-11-01 10:38:57,983 INFO: Loss [FFTFrequencyLoss] is created.
558
+ 2025-11-01 10:38:57,984 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
559
+ 2025-11-01 10:38:57,986 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
560
+ 2025-11-01 10:38:57,986 INFO: Model [SwinIRLatentModelMultiHead] is created.
561
+ 2025-11-01 10:38:58,755 INFO: Start training from epoch: 0, step: 0
562
+ 2025-11-01 10:39:11,060 INFO: [31_2..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 3:27:13, time (data): 0.123 (0.009)] l1_latent_x2_opt: 1.1373e+00 l1_latent_x4_opt: 1.2887e+00 fft_latent_x2_opt: 9.2951e-01 fft_latent_x4_opt: 1.0501e+00
563
+ 2025-11-01 10:39:11,774 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
564
+ 2025-11-01 10:40:22,636 INFO: Validation val_x2
565
+ # l1_latent: 1.8805 Best: 1.8805 @ 100 iter
566
+ # pixel_psnr_pt: 12.6803 Best: 12.6803 @ 100 iter
567
+
568
+ 2025-11-01 10:40:23,261 WARNING: Validation override for head 'x4' requested lq=128, but no matching latent tensor was found.
01_11_2025/31_3/basicsr_options.yaml ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 10:42:17 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ optim_g:
108
+ type: Adam
109
+ lr: 0.0002
110
+ weight_decay: 0
111
+ betas:
112
+ - 0.9
113
+ - 0.995
114
+ grad_clip:
115
+ enabled: true
116
+ generator:
117
+ type: norm
118
+ max_norm: 0.4
119
+ norm_type: 2.0
120
+ scheduler:
121
+ type: MultiStepLR
122
+ milestones:
123
+ - 62500
124
+ - 93750
125
+ - 112500
126
+ gamma: 0.5
127
+ total_steps: 125000
128
+ warmup_iter: -1
129
+ l1_latent_x2_opt:
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x2
135
+ l1_latent_x4_opt:
136
+ type: L1Loss
137
+ loss_weight: 1.0
138
+ reduction: mean
139
+ space: latent
140
+ target: x4
141
+ fft_latent_x2_opt:
142
+ type: FFTFrequencyLoss
143
+ loss_weight: 0.1
144
+ reduction: mean
145
+ space: latent
146
+ target: x2
147
+ norm: ortho
148
+ use_log_amplitude: false
149
+ alpha: 0.0
150
+ normalize_weight: true
151
+ eps: 1e-8
152
+ fft_latent_x4_opt:
153
+ type: FFTFrequencyLoss
154
+ loss_weight: 0.1
155
+ reduction: mean
156
+ space: latent
157
+ target: x4
158
+ norm: ortho
159
+ use_log_amplitude: false
160
+ alpha: 0.0
161
+ normalize_weight: true
162
+ eps: 1e-8
163
+ val:
164
+ val_freq: 100
165
+ save_img: true
166
+ head_evals:
167
+ x2:
168
+ save_img: true
169
+ label: val_x2
170
+ val_sizes:
171
+ lq: 512
172
+ gt: 1024
173
+ metrics:
174
+ l1_latent:
175
+ type: L1Loss
176
+ space: latent
177
+ pixel_psnr_pt:
178
+ type: calculate_psnr_pt
179
+ space: pixel
180
+ crop_border: 2
181
+ test_y_channel: false
182
+ x4:
183
+ save_img: true
184
+ label: val_x4
185
+ val_sizes:
186
+ lq: 256
187
+ gt: 1024
188
+ metrics:
189
+ l1_latent:
190
+ type: L1Loss
191
+ space: latent
192
+ l2_latent:
193
+ type: MSELoss
194
+ space: latent
195
+ pixel_psnr_pt:
196
+ type: calculate_psnr_pt
197
+ space: pixel
198
+ crop_border: 2
199
+ test_y_channel: false
200
+ logger:
201
+ print_freq: 100
202
+ save_checkpoint_freq: 5000
203
+ use_tb_logger: true
204
+ wandb:
205
+ project: Swin2SR-Latent-SR
206
+ entity: kazanplova-it-more
207
+ resume_id: null
208
+ max_val_images: 10
209
+ dist_params:
210
+ backend: nccl
211
+ port: 29500
212
+ dist: true
213
+ load_networks_only: false
214
+ exp_name: '31'
215
+ name: '31_3'
01_11_2025/31_3/train_31_3_20251101_104217.log ADDED
@@ -0,0 +1,573 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 10:42:17,678 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 10:42:17,679 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 256
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_3
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_3/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_3/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_3
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_3/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ optim_g:[
102
+ type: Adam
103
+ lr: 0.0002
104
+ weight_decay: 0
105
+ betas: [0.9, 0.995]
106
+ ]
107
+ grad_clip:[
108
+ enabled: True
109
+ generator:[
110
+ type: norm
111
+ max_norm: 0.4
112
+ norm_type: 2.0
113
+ ]
114
+ ]
115
+ scheduler:[
116
+ type: MultiStepLR
117
+ milestones: [62500, 93750, 112500]
118
+ gamma: 0.5
119
+ ]
120
+ total_steps: 125000
121
+ warmup_iter: -1
122
+ l1_latent_x2_opt:[
123
+ type: L1Loss
124
+ loss_weight: 1.0
125
+ reduction: mean
126
+ space: latent
127
+ target: x2
128
+ ]
129
+ l1_latent_x4_opt:[
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x4
135
+ ]
136
+ fft_latent_x2_opt:[
137
+ type: FFTFrequencyLoss
138
+ loss_weight: 0.1
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ norm: ortho
143
+ use_log_amplitude: False
144
+ alpha: 0.0
145
+ normalize_weight: True
146
+ eps: 1e-8
147
+ ]
148
+ fft_latent_x4_opt:[
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x4
154
+ norm: ortho
155
+ use_log_amplitude: False
156
+ alpha: 0.0
157
+ normalize_weight: True
158
+ eps: 1e-8
159
+ ]
160
+ ]
161
+ val:[
162
+ val_freq: 100
163
+ save_img: True
164
+ head_evals:[
165
+ x2:[
166
+ save_img: True
167
+ label: val_x2
168
+ val_sizes:[
169
+ lq: 512
170
+ gt: 1024
171
+ ]
172
+ metrics:[
173
+ l1_latent:[
174
+ type: L1Loss
175
+ space: latent
176
+ ]
177
+ pixel_psnr_pt:[
178
+ type: calculate_psnr_pt
179
+ space: pixel
180
+ crop_border: 2
181
+ test_y_channel: False
182
+ ]
183
+ ]
184
+ ]
185
+ x4:[
186
+ save_img: True
187
+ label: val_x4
188
+ val_sizes:[
189
+ lq: 256
190
+ gt: 1024
191
+ ]
192
+ metrics:[
193
+ l1_latent:[
194
+ type: L1Loss
195
+ space: latent
196
+ ]
197
+ l2_latent:[
198
+ type: MSELoss
199
+ space: latent
200
+ ]
201
+ pixel_psnr_pt:[
202
+ type: calculate_psnr_pt
203
+ space: pixel
204
+ crop_border: 2
205
+ test_y_channel: False
206
+ ]
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ logger:[
212
+ print_freq: 100
213
+ save_checkpoint_freq: 5000
214
+ use_tb_logger: True
215
+ wandb:[
216
+ project: Swin2SR-Latent-SR
217
+ entity: kazanplova-it-more
218
+ resume_id: None
219
+ max_val_images: 10
220
+ ]
221
+ ]
222
+ dist_params:[
223
+ backend: nccl
224
+ port: 29500
225
+ dist: True
226
+ ]
227
+ load_networks_only: False
228
+ exp_name: 31
229
+ name: 31_3
230
+ dist: False
231
+ rank: 0
232
+ world_size: 1
233
+ auto_resume: False
234
+ is_train: True
235
+ root_path: /data/kazanplova/latent_vae_upscale_train
236
+
237
+ 2025-11-01 10:42:19,455 INFO: Use wandb logger with id=qyvihyij; project=Swin2SR-Latent-SR.
238
+ 2025-11-01 10:42:31,771 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
239
+ 2025-11-01 10:42:31,772 INFO: Training statistics:
240
+ Number of train images: 4858507
241
+ Dataset enlarge ratio: 1
242
+ Batch size per gpu: 256
243
+ World size (gpu number): 1
244
+ Steps per epoch: 18979
245
+ Configured training steps: 125000
246
+ Approximate epochs to cover: 7.
247
+ 2025-11-01 10:42:31,777 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
248
+ 2025-11-01 10:42:31,777 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
249
+ 2025-11-01 10:42:31,981 INFO: Network [SwinIRMultiHead] is created.
250
+ 2025-11-01 10:42:32,150 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
251
+ 2025-11-01 10:42:32,150 INFO: SwinIRMultiHead(
252
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
253
+ (patch_embed): PatchEmbed(
254
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
255
+ )
256
+ (patch_unembed): PatchUnEmbed()
257
+ (pos_drop): Dropout(p=0.0, inplace=False)
258
+ (layers): ModuleList(
259
+ (0): RSTB(
260
+ (residual_group): BasicLayer(
261
+ dim=180, input_resolution=(32, 32), depth=6
262
+ (blocks): ModuleList(
263
+ (0): SwinTransformerBlock(
264
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
265
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
266
+ (attn): WindowAttention(
267
+ dim=180, window_size=(8, 8), num_heads=6
268
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
269
+ (attn_drop): Dropout(p=0.0, inplace=False)
270
+ (proj): Linear(in_features=180, out_features=180, bias=True)
271
+ (proj_drop): Dropout(p=0.0, inplace=False)
272
+ (softmax): Softmax(dim=-1)
273
+ )
274
+ (drop_path): Identity()
275
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (mlp): Mlp(
277
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
278
+ (act): GELU(approximate='none')
279
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
280
+ (drop): Dropout(p=0.0, inplace=False)
281
+ )
282
+ )
283
+ (1): SwinTransformerBlock(
284
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
285
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (attn): WindowAttention(
287
+ dim=180, window_size=(8, 8), num_heads=6
288
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
289
+ (attn_drop): Dropout(p=0.0, inplace=False)
290
+ (proj): Linear(in_features=180, out_features=180, bias=True)
291
+ (proj_drop): Dropout(p=0.0, inplace=False)
292
+ (softmax): Softmax(dim=-1)
293
+ )
294
+ (drop_path): DropPath()
295
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (mlp): Mlp(
297
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
298
+ (act): GELU(approximate='none')
299
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
300
+ (drop): Dropout(p=0.0, inplace=False)
301
+ )
302
+ )
303
+ (2): SwinTransformerBlock(
304
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
305
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (attn): WindowAttention(
307
+ dim=180, window_size=(8, 8), num_heads=6
308
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
309
+ (attn_drop): Dropout(p=0.0, inplace=False)
310
+ (proj): Linear(in_features=180, out_features=180, bias=True)
311
+ (proj_drop): Dropout(p=0.0, inplace=False)
312
+ (softmax): Softmax(dim=-1)
313
+ )
314
+ (drop_path): DropPath()
315
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (mlp): Mlp(
317
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
318
+ (act): GELU(approximate='none')
319
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
320
+ (drop): Dropout(p=0.0, inplace=False)
321
+ )
322
+ )
323
+ (3): SwinTransformerBlock(
324
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
325
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (attn): WindowAttention(
327
+ dim=180, window_size=(8, 8), num_heads=6
328
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
329
+ (attn_drop): Dropout(p=0.0, inplace=False)
330
+ (proj): Linear(in_features=180, out_features=180, bias=True)
331
+ (proj_drop): Dropout(p=0.0, inplace=False)
332
+ (softmax): Softmax(dim=-1)
333
+ )
334
+ (drop_path): DropPath()
335
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (mlp): Mlp(
337
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
338
+ (act): GELU(approximate='none')
339
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
340
+ (drop): Dropout(p=0.0, inplace=False)
341
+ )
342
+ )
343
+ (4): SwinTransformerBlock(
344
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
345
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (attn): WindowAttention(
347
+ dim=180, window_size=(8, 8), num_heads=6
348
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
349
+ (attn_drop): Dropout(p=0.0, inplace=False)
350
+ (proj): Linear(in_features=180, out_features=180, bias=True)
351
+ (proj_drop): Dropout(p=0.0, inplace=False)
352
+ (softmax): Softmax(dim=-1)
353
+ )
354
+ (drop_path): DropPath()
355
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (mlp): Mlp(
357
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
358
+ (act): GELU(approximate='none')
359
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
360
+ (drop): Dropout(p=0.0, inplace=False)
361
+ )
362
+ )
363
+ (5): SwinTransformerBlock(
364
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
365
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (attn): WindowAttention(
367
+ dim=180, window_size=(8, 8), num_heads=6
368
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
369
+ (attn_drop): Dropout(p=0.0, inplace=False)
370
+ (proj): Linear(in_features=180, out_features=180, bias=True)
371
+ (proj_drop): Dropout(p=0.0, inplace=False)
372
+ (softmax): Softmax(dim=-1)
373
+ )
374
+ (drop_path): DropPath()
375
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (mlp): Mlp(
377
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
378
+ (act): GELU(approximate='none')
379
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
380
+ (drop): Dropout(p=0.0, inplace=False)
381
+ )
382
+ )
383
+ )
384
+ )
385
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
386
+ (patch_embed): PatchEmbed()
387
+ (patch_unembed): PatchUnEmbed()
388
+ )
389
+ (1-5): 5 x RSTB(
390
+ (residual_group): BasicLayer(
391
+ dim=180, input_resolution=(32, 32), depth=6
392
+ (blocks): ModuleList(
393
+ (0): SwinTransformerBlock(
394
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
395
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
396
+ (attn): WindowAttention(
397
+ dim=180, window_size=(8, 8), num_heads=6
398
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
399
+ (attn_drop): Dropout(p=0.0, inplace=False)
400
+ (proj): Linear(in_features=180, out_features=180, bias=True)
401
+ (proj_drop): Dropout(p=0.0, inplace=False)
402
+ (softmax): Softmax(dim=-1)
403
+ )
404
+ (drop_path): DropPath()
405
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (mlp): Mlp(
407
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
408
+ (act): GELU(approximate='none')
409
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
410
+ (drop): Dropout(p=0.0, inplace=False)
411
+ )
412
+ )
413
+ (1): SwinTransformerBlock(
414
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
415
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (attn): WindowAttention(
417
+ dim=180, window_size=(8, 8), num_heads=6
418
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
419
+ (attn_drop): Dropout(p=0.0, inplace=False)
420
+ (proj): Linear(in_features=180, out_features=180, bias=True)
421
+ (proj_drop): Dropout(p=0.0, inplace=False)
422
+ (softmax): Softmax(dim=-1)
423
+ )
424
+ (drop_path): DropPath()
425
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (mlp): Mlp(
427
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
428
+ (act): GELU(approximate='none')
429
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
430
+ (drop): Dropout(p=0.0, inplace=False)
431
+ )
432
+ )
433
+ (2): SwinTransformerBlock(
434
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
435
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (attn): WindowAttention(
437
+ dim=180, window_size=(8, 8), num_heads=6
438
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
439
+ (attn_drop): Dropout(p=0.0, inplace=False)
440
+ (proj): Linear(in_features=180, out_features=180, bias=True)
441
+ (proj_drop): Dropout(p=0.0, inplace=False)
442
+ (softmax): Softmax(dim=-1)
443
+ )
444
+ (drop_path): DropPath()
445
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (mlp): Mlp(
447
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
448
+ (act): GELU(approximate='none')
449
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
450
+ (drop): Dropout(p=0.0, inplace=False)
451
+ )
452
+ )
453
+ (3): SwinTransformerBlock(
454
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
455
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (attn): WindowAttention(
457
+ dim=180, window_size=(8, 8), num_heads=6
458
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
459
+ (attn_drop): Dropout(p=0.0, inplace=False)
460
+ (proj): Linear(in_features=180, out_features=180, bias=True)
461
+ (proj_drop): Dropout(p=0.0, inplace=False)
462
+ (softmax): Softmax(dim=-1)
463
+ )
464
+ (drop_path): DropPath()
465
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (mlp): Mlp(
467
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
468
+ (act): GELU(approximate='none')
469
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
470
+ (drop): Dropout(p=0.0, inplace=False)
471
+ )
472
+ )
473
+ (4): SwinTransformerBlock(
474
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
475
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (attn): WindowAttention(
477
+ dim=180, window_size=(8, 8), num_heads=6
478
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
479
+ (attn_drop): Dropout(p=0.0, inplace=False)
480
+ (proj): Linear(in_features=180, out_features=180, bias=True)
481
+ (proj_drop): Dropout(p=0.0, inplace=False)
482
+ (softmax): Softmax(dim=-1)
483
+ )
484
+ (drop_path): DropPath()
485
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (mlp): Mlp(
487
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
488
+ (act): GELU(approximate='none')
489
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
490
+ (drop): Dropout(p=0.0, inplace=False)
491
+ )
492
+ )
493
+ (5): SwinTransformerBlock(
494
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
495
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (attn): WindowAttention(
497
+ dim=180, window_size=(8, 8), num_heads=6
498
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
499
+ (attn_drop): Dropout(p=0.0, inplace=False)
500
+ (proj): Linear(in_features=180, out_features=180, bias=True)
501
+ (proj_drop): Dropout(p=0.0, inplace=False)
502
+ (softmax): Softmax(dim=-1)
503
+ )
504
+ (drop_path): DropPath()
505
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (mlp): Mlp(
507
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
508
+ (act): GELU(approximate='none')
509
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
510
+ (drop): Dropout(p=0.0, inplace=False)
511
+ )
512
+ )
513
+ )
514
+ )
515
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
516
+ (patch_embed): PatchEmbed()
517
+ (patch_unembed): PatchUnEmbed()
518
+ )
519
+ )
520
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
521
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
522
+ (heads): ModuleDict(
523
+ (x2): _SwinIRPixelShuffleHead(
524
+ (conv_before): Sequential(
525
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
527
+ )
528
+ (upsample): Upsample(
529
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (1): PixelShuffle(upscale_factor=2)
531
+ )
532
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
533
+ )
534
+ (x4): _SwinIRPixelShuffleHead(
535
+ (conv_before): Sequential(
536
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
537
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
538
+ )
539
+ (upsample): Upsample(
540
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ (1): PixelShuffle(upscale_factor=2)
542
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ (3): PixelShuffle(upscale_factor=2)
544
+ )
545
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
546
+ )
547
+ )
548
+ )
549
+ 2025-11-01 10:42:32,153 INFO: Use EMA with decay: 0.999
550
+ 2025-11-01 10:42:32,330 INFO: Network [SwinIRMultiHead] is created.
551
+ 2025-11-01 10:42:32,414 INFO: Loss [L1Loss] is created.
552
+ 2025-11-01 10:42:32,415 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
553
+ 2025-11-01 10:42:32,417 INFO: Loss [L1Loss] is created.
554
+ 2025-11-01 10:42:32,417 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
555
+ 2025-11-01 10:42:32,417 INFO: Loss [FFTFrequencyLoss] is created.
556
+ 2025-11-01 10:42:32,418 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
557
+ 2025-11-01 10:42:32,419 INFO: Loss [FFTFrequencyLoss] is created.
558
+ 2025-11-01 10:42:32,419 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
559
+ 2025-11-01 10:42:32,421 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
560
+ 2025-11-01 10:42:32,421 INFO: Model [SwinIRLatentModelMultiHead] is created.
561
+ 2025-11-01 10:42:33,508 INFO: Start training from epoch: 0, step: 0
562
+ 2025-11-01 10:43:17,958 INFO: [31_3..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 11:25:47, time (data): 0.444 (0.086)] l1_latent_x2_opt: 9.2028e-01 l1_latent_x4_opt: 1.0901e+00 fft_latent_x2_opt: 7.6166e-01 fft_latent_x4_opt: 9.4386e-01
563
+ 2025-11-01 10:43:18,993 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
564
+ 2025-11-01 10:45:35,403 INFO: Validation val_x2
565
+ # l1_latent: 1.9877 Best: 1.9877 @ 100 iter
566
+ # pixel_psnr_pt: 12.8638 Best: 12.8638 @ 100 iter
567
+
568
+ 2025-11-01 10:47:53,381 INFO: Validation val_x4
569
+ # l1_latent: 2.0204 Best: 2.0204 @ 100 iter
570
+ # l2_latent: 6.7555 Best: 6.7555 @ 100 iter
571
+ # pixel_psnr_pt: 12.5414 Best: 12.5414 @ 100 iter
572
+
573
+ 2025-11-01 10:48:26,379 INFO: [31_3..][epoch: 0, step: 200, lr:(2.000e-04,)] [eta: 2 days, 10:55:55, time (data): 0.387 (0.043)] l1_latent_x2_opt: 8.4277e-01 l1_latent_x4_opt: 1.0169e+00 fft_latent_x2_opt: 6.8381e-01 fft_latent_x4_opt: 8.8940e-01
01_11_2025/31_4/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:28:39 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 4
39
+ batch_size_per_gpu: 32
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31_4'
01_11_2025/31_4/train_31_4_20251101_172839.log ADDED
@@ -0,0 +1,573 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:28:39,374 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:28:39,375 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 4
46
+ batch_size_per_gpu: 32
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_4
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_4/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_4/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_4
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_4/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31_4
240
+ dist: False
241
+ rank: 0
242
+ world_size: 1
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:28:40,992 INFO: Use wandb logger with id=n19f2ofi; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:28:52,890 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:28:52,892 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 32
253
+ World size (gpu number): 1
254
+ Steps per epoch: 151829
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 1.
257
+ 2025-11-01 17:28:52,897 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:28:52,897 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:28:53,471 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:28:53,653 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:28:53,654 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:28:53,657 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:28:53,834 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:28:53,869 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:28:53,869 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:28:53,871 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:28:53,871 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:28:53,871 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:28:53,871 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:28:53,872 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:28:53,873 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:28:53,876 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:28:53,876 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 17:28:54,418 INFO: Start training from epoch: 0, step: 0
572
+ 2025-11-01 17:29:22,022 INFO: [31_4..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 8:29:02, time (data): 0.276 (0.013)] l1_latent_x2_opt: 9.7968e-01 fft_latent_x2_opt: 8.8036e-01 l1_latent_x4_opt: 1.1146e+00 fft_latent_x4_opt: 9.7135e-01
573
+ 2025-11-01 17:29:46,109 INFO: [31_4..][epoch: 0, step: 200, lr:(2.000e-04,)] [eta: 8:24:50, time (data): 0.258 (0.006)] l1_latent_x2_opt: 9.1172e-01 fft_latent_x2_opt: 7.8415e-01 l1_latent_x4_opt: 1.0477e+00 fft_latent_x4_opt: 8.9260e-01
01_11_2025/31_5/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:38:17 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 12
39
+ batch_size_per_gpu: 48
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31_5'
01_11_2025/31_5/train_31_5_20251101_173817.log ADDED
@@ -0,0 +1,572 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:38:17,588 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:38:17,589 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 12
46
+ batch_size_per_gpu: 48
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_5
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_5/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_5/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_5
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_5/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31_5
240
+ dist: False
241
+ rank: 0
242
+ world_size: 1
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:38:19,242 INFO: Use wandb logger with id=akx0wsjl; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:38:31,471 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:38:31,472 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 48
253
+ World size (gpu number): 1
254
+ Steps per epoch: 101219
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 2.
257
+ 2025-11-01 17:38:31,477 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:38:31,477 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:38:31,705 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:38:31,901 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:38:31,902 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:38:31,905 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:38:32,089 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:38:32,125 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:38:32,126 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:38:32,126 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:38:32,126 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:38:32,126 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:38:32,127 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:38:32,127 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:38:32,127 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:38:32,128 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:38:32,129 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 17:38:32,821 INFO: Start training from epoch: 0, step: 0
572
+ 2025-11-01 17:39:09,395 INFO: [31_5..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 11:09:17, time (data): 0.366 (0.015)] l1_latent_x2_opt: 9.6151e-01 fft_latent_x2_opt: 8.5312e-01 l1_latent_x4_opt: 1.1090e+00 fft_latent_x4_opt: 9.5126e-01
01_11_2025/31_6/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:47:50 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31_6'
01_11_2025/31_6/train_31_6_20251101_174750.log ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:47:50,239 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:47:50,239 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 256
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_6
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_6/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_6/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_6
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_6/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31_6
240
+ dist: False
241
+ rank: 0
242
+ world_size: 1
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:47:51,930 INFO: Use wandb logger with id=5rioc0e8; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:48:04,007 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:48:04,008 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 256
253
+ World size (gpu number): 1
254
+ Steps per epoch: 18979
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 7.
257
+ 2025-11-01 17:48:04,013 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:48:04,013 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:48:04,215 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:48:04,391 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:48:04,392 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:48:04,394 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:48:04,570 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:48:04,606 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:48:04,606 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:48:04,607 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:48:04,608 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:48:04,610 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:48:04,610 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:48:04,611 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:48:04,612 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:48:04,614 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:48:04,614 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 17:48:05,712 INFO: Start training from epoch: 0, step: 0
01_11_2025/31_7/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:50:28 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 128
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31_7'
01_11_2025/31_7/train_31_7_20251101_175028.log ADDED
@@ -0,0 +1,573 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:50:28,927 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:50:28,928 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 128
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_7
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_7/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_7/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_7
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31_7/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31_7
240
+ dist: False
241
+ rank: 0
242
+ world_size: 1
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:50:30,464 INFO: Use wandb logger with id=y3e7jhi4; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:50:42,399 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:50:42,400 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 128
253
+ World size (gpu number): 1
254
+ Steps per epoch: 37958
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 4.
257
+ 2025-11-01 17:50:42,405 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:50:42,405 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:50:42,646 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:50:42,816 INFO: Network: SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:50:42,817 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:50:42,819 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:50:42,997 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:50:43,032 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:50:43,033 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:50:43,033 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:50:43,034 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:50:43,035 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:50:43,036 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:50:43,037 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:50:43,037 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:50:43,039 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:50:43,040 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 17:50:44,139 INFO: Start training from epoch: 0, step: 0
572
+ 2025-11-01 17:52:03,893 INFO: [31_7..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 1 day, 0:20:59, time (data): 0.797 (0.059)] l1_latent_x2_opt: 9.4716e-01 fft_latent_x2_opt: 8.3336e-01 l1_latent_x4_opt: 1.1014e+00 fft_latent_x4_opt: 9.3095e-01
573
+ 2025-11-01 17:53:15,691 INFO: [31_7..][epoch: 0, step: 200, lr:(2.000e-04,)] [eta: 1 day, 0:36:31, time (data): 0.758 (0.030)] l1_latent_x2_opt: 9.0429e-01 fft_latent_x2_opt: 7.7518e-01 l1_latent_x4_opt: 1.0392e+00 fft_latent_x4_opt: 8.9716e-01
01_11_2025/31_archived_20251101_104923/basicsr_options.yaml ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 09:57:17 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 4
39
+ batch_size_per_gpu: 8
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ optim_g:
108
+ type: Adam
109
+ lr: 0.00012
110
+ weight_decay: 0
111
+ betas:
112
+ - 0.9
113
+ - 0.995
114
+ grad_clip:
115
+ enabled: true
116
+ generator:
117
+ type: norm
118
+ max_norm: 0.4
119
+ norm_type: 2.0
120
+ scheduler:
121
+ type: MultiStepLR
122
+ milestones:
123
+ - 62500
124
+ - 93750
125
+ - 112500
126
+ gamma: 0.5
127
+ total_steps: 125000
128
+ warmup_iter: -1
129
+ l1_latent_x2_opt:
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x2
135
+ l1_latent_x4_opt:
136
+ type: L1Loss
137
+ loss_weight: 1.0
138
+ reduction: mean
139
+ space: latent
140
+ target: x4
141
+ eagle_pixel_x2_opt:
142
+ type: Eagle_Loss
143
+ loss_weight: 5.0e-05
144
+ reduction: mean
145
+ space: pixel
146
+ target: x2
147
+ patch_size: 3
148
+ cutoff: 0.5
149
+ l1_pixel_x2_opt:
150
+ type: L1Loss
151
+ loss_weight: 1.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ fft_pixel_x2_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: pixel
160
+ target: x2
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ eagle_pixel_x4_opt:
167
+ type: Eagle_Loss
168
+ loss_weight: 5.0e-05
169
+ reduction: mean
170
+ space: pixel
171
+ target: x4
172
+ patch_size: 3
173
+ cutoff: 0.5
174
+ l1_pixel_x4_opt:
175
+ type: L1Loss
176
+ loss_weight: 1.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ fft_pixel_x4_opt:
181
+ type: FFTFrequencyLoss
182
+ loss_weight: 0.1
183
+ reduction: mean
184
+ space: pixel
185
+ target: x4
186
+ norm: ortho
187
+ use_log_amplitude: false
188
+ alpha: 0.0
189
+ normalize_weight: true
190
+ eps: 1e-8
191
+ val:
192
+ val_freq: 5000
193
+ save_img: true
194
+ head_evals:
195
+ x2:
196
+ save_img: true
197
+ label: val_x2
198
+ metrics:
199
+ l1_latent:
200
+ type: L1Loss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ x4:
208
+ save_img: true
209
+ label: val_x4
210
+ metrics:
211
+ l1_latent:
212
+ type: L1Loss
213
+ space: latent
214
+ l2_latent:
215
+ type: MSELoss
216
+ space: latent
217
+ pixel_psnr_pt:
218
+ type: calculate_psnr_pt
219
+ space: pixel
220
+ crop_border: 2
221
+ test_y_channel: false
222
+ logger:
223
+ print_freq: 100
224
+ save_checkpoint_freq: 5000
225
+ use_tb_logger: true
226
+ wandb:
227
+ project: Swin2SR-Latent-SR
228
+ entity: kazanplova-it-more
229
+ resume_id: null
230
+ max_val_images: 10
231
+ dist_params:
232
+ backend: nccl
233
+ port: 29500
234
+ dist: true
235
+ load_networks_only: false
236
+ exp_name: '31'
237
+ name: '31'
01_11_2025/31_archived_20251101_104923/train_31_20251101_095717.log ADDED
@@ -0,0 +1,594 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 09:57:17,409 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 09:57:17,409 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 4
46
+ batch_size_per_gpu: 8
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ optim_g:[
102
+ type: Adam
103
+ lr: 0.00012
104
+ weight_decay: 0
105
+ betas: [0.9, 0.995]
106
+ ]
107
+ grad_clip:[
108
+ enabled: True
109
+ generator:[
110
+ type: norm
111
+ max_norm: 0.4
112
+ norm_type: 2.0
113
+ ]
114
+ ]
115
+ scheduler:[
116
+ type: MultiStepLR
117
+ milestones: [62500, 93750, 112500]
118
+ gamma: 0.5
119
+ ]
120
+ total_steps: 125000
121
+ warmup_iter: -1
122
+ l1_latent_x2_opt:[
123
+ type: L1Loss
124
+ loss_weight: 1.0
125
+ reduction: mean
126
+ space: latent
127
+ target: x2
128
+ ]
129
+ l1_latent_x4_opt:[
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x4
135
+ ]
136
+ eagle_pixel_x2_opt:[
137
+ type: Eagle_Loss
138
+ loss_weight: 5e-05
139
+ reduction: mean
140
+ space: pixel
141
+ target: x2
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ ]
145
+ l1_pixel_x2_opt:[
146
+ type: L1Loss
147
+ loss_weight: 1.0
148
+ reduction: mean
149
+ space: pixel
150
+ target: x2
151
+ ]
152
+ fft_pixel_x2_opt:[
153
+ type: FFTFrequencyLoss
154
+ loss_weight: 0.1
155
+ reduction: mean
156
+ space: pixel
157
+ target: x2
158
+ norm: ortho
159
+ use_log_amplitude: False
160
+ alpha: 0.0
161
+ normalize_weight: True
162
+ eps: 1e-8
163
+ ]
164
+ eagle_pixel_x4_opt:[
165
+ type: Eagle_Loss
166
+ loss_weight: 5e-05
167
+ reduction: mean
168
+ space: pixel
169
+ target: x4
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ ]
173
+ l1_pixel_x4_opt:[
174
+ type: L1Loss
175
+ loss_weight: 1.0
176
+ reduction: mean
177
+ space: pixel
178
+ target: x4
179
+ ]
180
+ fft_pixel_x4_opt:[
181
+ type: FFTFrequencyLoss
182
+ loss_weight: 0.1
183
+ reduction: mean
184
+ space: pixel
185
+ target: x4
186
+ norm: ortho
187
+ use_log_amplitude: False
188
+ alpha: 0.0
189
+ normalize_weight: True
190
+ eps: 1e-8
191
+ ]
192
+ ]
193
+ val:[
194
+ val_freq: 5000
195
+ save_img: True
196
+ head_evals:[
197
+ x2:[
198
+ save_img: True
199
+ label: val_x2
200
+ metrics:[
201
+ l1_latent:[
202
+ type: L1Loss
203
+ space: latent
204
+ ]
205
+ pixel_psnr_pt:[
206
+ type: calculate_psnr_pt
207
+ space: pixel
208
+ crop_border: 2
209
+ test_y_channel: False
210
+ ]
211
+ ]
212
+ ]
213
+ x4:[
214
+ save_img: True
215
+ label: val_x4
216
+ metrics:[
217
+ l1_latent:[
218
+ type: L1Loss
219
+ space: latent
220
+ ]
221
+ l2_latent:[
222
+ type: MSELoss
223
+ space: latent
224
+ ]
225
+ pixel_psnr_pt:[
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: False
230
+ ]
231
+ ]
232
+ ]
233
+ ]
234
+ ]
235
+ logger:[
236
+ print_freq: 100
237
+ save_checkpoint_freq: 5000
238
+ use_tb_logger: True
239
+ wandb:[
240
+ project: Swin2SR-Latent-SR
241
+ entity: kazanplova-it-more
242
+ resume_id: None
243
+ max_val_images: 10
244
+ ]
245
+ ]
246
+ dist_params:[
247
+ backend: nccl
248
+ port: 29500
249
+ dist: True
250
+ ]
251
+ load_networks_only: False
252
+ exp_name: 31
253
+ name: 31
254
+ dist: True
255
+ rank: 0
256
+ world_size: 3
257
+ auto_resume: False
258
+ is_train: True
259
+ root_path: /data/kazanplova/latent_vae_upscale_train
260
+
261
+ 2025-11-01 09:57:19,113 INFO: Use wandb logger with id=3t1rzixa; project=Swin2SR-Latent-SR.
262
+ 2025-11-01 09:57:32,273 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
263
+ 2025-11-01 09:57:32,275 INFO: Training statistics:
264
+ Number of train images: 4858507
265
+ Dataset enlarge ratio: 1
266
+ Batch size per gpu: 8
267
+ World size (gpu number): 3
268
+ Steps per epoch: 202438
269
+ Configured training steps: 125000
270
+ Approximate epochs to cover: 1.
271
+ 2025-11-01 09:57:32,278 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
272
+ 2025-11-01 09:57:32,278 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
273
+ 2025-11-01 09:57:32,408 INFO: Network [SwinIRMultiHead] is created.
274
+ 2025-11-01 09:57:33,881 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
275
+ 2025-11-01 09:57:33,882 INFO: SwinIRMultiHead(
276
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
277
+ (patch_embed): PatchEmbed(
278
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
279
+ )
280
+ (patch_unembed): PatchUnEmbed()
281
+ (pos_drop): Dropout(p=0.0, inplace=False)
282
+ (layers): ModuleList(
283
+ (0): RSTB(
284
+ (residual_group): BasicLayer(
285
+ dim=180, input_resolution=(32, 32), depth=6
286
+ (blocks): ModuleList(
287
+ (0): SwinTransformerBlock(
288
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
289
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
290
+ (attn): WindowAttention(
291
+ dim=180, window_size=(8, 8), num_heads=6
292
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
293
+ (attn_drop): Dropout(p=0.0, inplace=False)
294
+ (proj): Linear(in_features=180, out_features=180, bias=True)
295
+ (proj_drop): Dropout(p=0.0, inplace=False)
296
+ (softmax): Softmax(dim=-1)
297
+ )
298
+ (drop_path): Identity()
299
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
300
+ (mlp): Mlp(
301
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
302
+ (act): GELU(approximate='none')
303
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
304
+ (drop): Dropout(p=0.0, inplace=False)
305
+ )
306
+ )
307
+ (1): SwinTransformerBlock(
308
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
309
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
310
+ (attn): WindowAttention(
311
+ dim=180, window_size=(8, 8), num_heads=6
312
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
313
+ (attn_drop): Dropout(p=0.0, inplace=False)
314
+ (proj): Linear(in_features=180, out_features=180, bias=True)
315
+ (proj_drop): Dropout(p=0.0, inplace=False)
316
+ (softmax): Softmax(dim=-1)
317
+ )
318
+ (drop_path): DropPath()
319
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
320
+ (mlp): Mlp(
321
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
322
+ (act): GELU(approximate='none')
323
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
324
+ (drop): Dropout(p=0.0, inplace=False)
325
+ )
326
+ )
327
+ (2): SwinTransformerBlock(
328
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
329
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
330
+ (attn): WindowAttention(
331
+ dim=180, window_size=(8, 8), num_heads=6
332
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
333
+ (attn_drop): Dropout(p=0.0, inplace=False)
334
+ (proj): Linear(in_features=180, out_features=180, bias=True)
335
+ (proj_drop): Dropout(p=0.0, inplace=False)
336
+ (softmax): Softmax(dim=-1)
337
+ )
338
+ (drop_path): DropPath()
339
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
340
+ (mlp): Mlp(
341
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
342
+ (act): GELU(approximate='none')
343
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
344
+ (drop): Dropout(p=0.0, inplace=False)
345
+ )
346
+ )
347
+ (3): SwinTransformerBlock(
348
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
349
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
350
+ (attn): WindowAttention(
351
+ dim=180, window_size=(8, 8), num_heads=6
352
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
353
+ (attn_drop): Dropout(p=0.0, inplace=False)
354
+ (proj): Linear(in_features=180, out_features=180, bias=True)
355
+ (proj_drop): Dropout(p=0.0, inplace=False)
356
+ (softmax): Softmax(dim=-1)
357
+ )
358
+ (drop_path): DropPath()
359
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
360
+ (mlp): Mlp(
361
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
362
+ (act): GELU(approximate='none')
363
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
364
+ (drop): Dropout(p=0.0, inplace=False)
365
+ )
366
+ )
367
+ (4): SwinTransformerBlock(
368
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
369
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
370
+ (attn): WindowAttention(
371
+ dim=180, window_size=(8, 8), num_heads=6
372
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
373
+ (attn_drop): Dropout(p=0.0, inplace=False)
374
+ (proj): Linear(in_features=180, out_features=180, bias=True)
375
+ (proj_drop): Dropout(p=0.0, inplace=False)
376
+ (softmax): Softmax(dim=-1)
377
+ )
378
+ (drop_path): DropPath()
379
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
380
+ (mlp): Mlp(
381
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
382
+ (act): GELU(approximate='none')
383
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
384
+ (drop): Dropout(p=0.0, inplace=False)
385
+ )
386
+ )
387
+ (5): SwinTransformerBlock(
388
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
389
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
390
+ (attn): WindowAttention(
391
+ dim=180, window_size=(8, 8), num_heads=6
392
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
393
+ (attn_drop): Dropout(p=0.0, inplace=False)
394
+ (proj): Linear(in_features=180, out_features=180, bias=True)
395
+ (proj_drop): Dropout(p=0.0, inplace=False)
396
+ (softmax): Softmax(dim=-1)
397
+ )
398
+ (drop_path): DropPath()
399
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
400
+ (mlp): Mlp(
401
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
402
+ (act): GELU(approximate='none')
403
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
404
+ (drop): Dropout(p=0.0, inplace=False)
405
+ )
406
+ )
407
+ )
408
+ )
409
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
410
+ (patch_embed): PatchEmbed()
411
+ (patch_unembed): PatchUnEmbed()
412
+ )
413
+ (1-5): 5 x RSTB(
414
+ (residual_group): BasicLayer(
415
+ dim=180, input_resolution=(32, 32), depth=6
416
+ (blocks): ModuleList(
417
+ (0): SwinTransformerBlock(
418
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
419
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
420
+ (attn): WindowAttention(
421
+ dim=180, window_size=(8, 8), num_heads=6
422
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
423
+ (attn_drop): Dropout(p=0.0, inplace=False)
424
+ (proj): Linear(in_features=180, out_features=180, bias=True)
425
+ (proj_drop): Dropout(p=0.0, inplace=False)
426
+ (softmax): Softmax(dim=-1)
427
+ )
428
+ (drop_path): DropPath()
429
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
430
+ (mlp): Mlp(
431
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
432
+ (act): GELU(approximate='none')
433
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
434
+ (drop): Dropout(p=0.0, inplace=False)
435
+ )
436
+ )
437
+ (1): SwinTransformerBlock(
438
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
439
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
440
+ (attn): WindowAttention(
441
+ dim=180, window_size=(8, 8), num_heads=6
442
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
443
+ (attn_drop): Dropout(p=0.0, inplace=False)
444
+ (proj): Linear(in_features=180, out_features=180, bias=True)
445
+ (proj_drop): Dropout(p=0.0, inplace=False)
446
+ (softmax): Softmax(dim=-1)
447
+ )
448
+ (drop_path): DropPath()
449
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
450
+ (mlp): Mlp(
451
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
452
+ (act): GELU(approximate='none')
453
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
454
+ (drop): Dropout(p=0.0, inplace=False)
455
+ )
456
+ )
457
+ (2): SwinTransformerBlock(
458
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
459
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
460
+ (attn): WindowAttention(
461
+ dim=180, window_size=(8, 8), num_heads=6
462
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
463
+ (attn_drop): Dropout(p=0.0, inplace=False)
464
+ (proj): Linear(in_features=180, out_features=180, bias=True)
465
+ (proj_drop): Dropout(p=0.0, inplace=False)
466
+ (softmax): Softmax(dim=-1)
467
+ )
468
+ (drop_path): DropPath()
469
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
470
+ (mlp): Mlp(
471
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
472
+ (act): GELU(approximate='none')
473
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
474
+ (drop): Dropout(p=0.0, inplace=False)
475
+ )
476
+ )
477
+ (3): SwinTransformerBlock(
478
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
479
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
480
+ (attn): WindowAttention(
481
+ dim=180, window_size=(8, 8), num_heads=6
482
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
483
+ (attn_drop): Dropout(p=0.0, inplace=False)
484
+ (proj): Linear(in_features=180, out_features=180, bias=True)
485
+ (proj_drop): Dropout(p=0.0, inplace=False)
486
+ (softmax): Softmax(dim=-1)
487
+ )
488
+ (drop_path): DropPath()
489
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
490
+ (mlp): Mlp(
491
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
492
+ (act): GELU(approximate='none')
493
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
494
+ (drop): Dropout(p=0.0, inplace=False)
495
+ )
496
+ )
497
+ (4): SwinTransformerBlock(
498
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
499
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
500
+ (attn): WindowAttention(
501
+ dim=180, window_size=(8, 8), num_heads=6
502
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
503
+ (attn_drop): Dropout(p=0.0, inplace=False)
504
+ (proj): Linear(in_features=180, out_features=180, bias=True)
505
+ (proj_drop): Dropout(p=0.0, inplace=False)
506
+ (softmax): Softmax(dim=-1)
507
+ )
508
+ (drop_path): DropPath()
509
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
510
+ (mlp): Mlp(
511
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
512
+ (act): GELU(approximate='none')
513
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
514
+ (drop): Dropout(p=0.0, inplace=False)
515
+ )
516
+ )
517
+ (5): SwinTransformerBlock(
518
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
519
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
520
+ (attn): WindowAttention(
521
+ dim=180, window_size=(8, 8), num_heads=6
522
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
523
+ (attn_drop): Dropout(p=0.0, inplace=False)
524
+ (proj): Linear(in_features=180, out_features=180, bias=True)
525
+ (proj_drop): Dropout(p=0.0, inplace=False)
526
+ (softmax): Softmax(dim=-1)
527
+ )
528
+ (drop_path): DropPath()
529
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
530
+ (mlp): Mlp(
531
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
532
+ (act): GELU(approximate='none')
533
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
534
+ (drop): Dropout(p=0.0, inplace=False)
535
+ )
536
+ )
537
+ )
538
+ )
539
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (patch_embed): PatchEmbed()
541
+ (patch_unembed): PatchUnEmbed()
542
+ )
543
+ )
544
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
545
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
546
+ (heads): ModuleDict(
547
+ (x2): _SwinIRPixelShuffleHead(
548
+ (conv_before): Sequential(
549
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
550
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
551
+ )
552
+ (upsample): Upsample(
553
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ (1): PixelShuffle(upscale_factor=2)
555
+ )
556
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
557
+ )
558
+ (x4): _SwinIRPixelShuffleHead(
559
+ (conv_before): Sequential(
560
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
561
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
562
+ )
563
+ (upsample): Upsample(
564
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
565
+ (1): PixelShuffle(upscale_factor=2)
566
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (3): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ )
572
+ )
573
+ 2025-11-01 09:57:33,886 INFO: Use EMA with decay: 0.999
574
+ 2025-11-01 09:57:34,079 INFO: Network [SwinIRMultiHead] is created.
575
+ 2025-11-01 09:57:34,127 INFO: Loss [L1Loss] is created.
576
+ 2025-11-01 09:57:34,128 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
577
+ 2025-11-01 09:57:34,130 INFO: Loss [L1Loss] is created.
578
+ 2025-11-01 09:57:34,131 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
579
+ 2025-11-01 09:57:34,132 INFO: Loss [Eagle_Loss] is created.
580
+ 2025-11-01 09:57:34,133 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=5e-05).
581
+ 2025-11-01 09:57:34,134 INFO: Loss [L1Loss] is created.
582
+ 2025-11-01 09:57:34,135 INFO: Initialized l1_pixel_x2_opt in pixel space (w=1.0).
583
+ 2025-11-01 09:57:34,136 INFO: Loss [FFTFrequencyLoss] is created.
584
+ 2025-11-01 09:57:34,136 INFO: Initialized fft_pixel_x2_opt in pixel space (w=0.1).
585
+ 2025-11-01 09:57:34,138 INFO: Loss [Eagle_Loss] is created.
586
+ 2025-11-01 09:57:34,139 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
587
+ 2025-11-01 09:57:34,140 INFO: Loss [L1Loss] is created.
588
+ 2025-11-01 09:57:34,141 INFO: Initialized l1_pixel_x4_opt in pixel space (w=1.0).
589
+ 2025-11-01 09:57:34,142 INFO: Loss [FFTFrequencyLoss] is created.
590
+ 2025-11-01 09:57:34,143 INFO: Initialized fft_pixel_x4_opt in pixel space (w=0.1).
591
+ 2025-11-01 09:57:34,146 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
592
+ 2025-11-01 09:57:34,146 INFO: Model [SwinIRLatentModelMultiHead] is created.
593
+ 2025-11-01 09:58:52,496 INFO: Start training from epoch: 0, step: 0
594
+ 2025-11-01 09:58:55,995 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
01_11_2025/31_archived_20251101_163428/basicsr_options.yaml ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 10:49:23 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ optim_g:
108
+ type: Adam
109
+ lr: 0.0002
110
+ weight_decay: 0
111
+ betas:
112
+ - 0.9
113
+ - 0.995
114
+ grad_clip:
115
+ enabled: true
116
+ generator:
117
+ type: norm
118
+ max_norm: 0.4
119
+ norm_type: 2.0
120
+ scheduler:
121
+ type: MultiStepLR
122
+ milestones:
123
+ - 62500
124
+ - 93750
125
+ - 112500
126
+ gamma: 0.5
127
+ total_steps: 125000
128
+ warmup_iter: -1
129
+ l1_latent_x2_opt:
130
+ type: L1Loss
131
+ loss_weight: 1.0
132
+ reduction: mean
133
+ space: latent
134
+ target: x2
135
+ l1_latent_x4_opt:
136
+ type: L1Loss
137
+ loss_weight: 1.0
138
+ reduction: mean
139
+ space: latent
140
+ target: x4
141
+ fft_latent_x2_opt:
142
+ type: FFTFrequencyLoss
143
+ loss_weight: 0.1
144
+ reduction: mean
145
+ space: latent
146
+ target: x2
147
+ norm: ortho
148
+ use_log_amplitude: false
149
+ alpha: 0.0
150
+ normalize_weight: true
151
+ eps: 1e-8
152
+ fft_latent_x4_opt:
153
+ type: FFTFrequencyLoss
154
+ loss_weight: 0.1
155
+ reduction: mean
156
+ space: latent
157
+ target: x4
158
+ norm: ortho
159
+ use_log_amplitude: false
160
+ alpha: 0.0
161
+ normalize_weight: true
162
+ eps: 1e-8
163
+ val:
164
+ val_freq: 5000
165
+ save_img: true
166
+ head_evals:
167
+ x2:
168
+ save_img: true
169
+ label: val_x2
170
+ val_sizes:
171
+ lq: 512
172
+ gt: 1024
173
+ metrics:
174
+ l1_latent:
175
+ type: L1Loss
176
+ space: latent
177
+ pixel_psnr_pt:
178
+ type: calculate_psnr_pt
179
+ space: pixel
180
+ crop_border: 2
181
+ test_y_channel: false
182
+ x4:
183
+ save_img: true
184
+ label: val_x4
185
+ val_sizes:
186
+ lq: 256
187
+ gt: 1024
188
+ metrics:
189
+ l1_latent:
190
+ type: L1Loss
191
+ space: latent
192
+ l2_latent:
193
+ type: MSELoss
194
+ space: latent
195
+ pixel_psnr_pt:
196
+ type: calculate_psnr_pt
197
+ space: pixel
198
+ crop_border: 2
199
+ test_y_channel: false
200
+ logger:
201
+ print_freq: 100
202
+ save_checkpoint_freq: 5000
203
+ use_tb_logger: true
204
+ wandb:
205
+ project: Swin2SR-Latent-SR
206
+ entity: kazanplova-it-more
207
+ resume_id: null
208
+ max_val_images: 10
209
+ dist_params:
210
+ backend: nccl
211
+ port: 29500
212
+ dist: true
213
+ load_networks_only: false
214
+ exp_name: '31'
215
+ name: '31'
01_11_2025/31_archived_20251101_163428/train_31_20251101_104923.log ADDED
The diff for this file is too large to render. See raw diff
 
01_11_2025/31_archived_20251101_163435/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 16:34:28 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_163435/train_31_20251101_163428.log ADDED
@@ -0,0 +1,570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 16:34:28,595 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 16:34:28,595 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 256
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 16:34:30,282 INFO: Use wandb logger with id=r1xuaoak; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 16:34:43,606 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 16:34:43,607 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 256
253
+ World size (gpu number): 3
254
+ Steps per epoch: 6327
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 20.
257
+ 2025-11-01 16:34:43,609 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 16:34:43,610 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 16:34:43,738 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 16:34:45,101 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 16:34:45,102 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 16:34:45,104 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 16:34:45,222 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 16:34:45,257 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 16:34:45,257 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 16:34:45,258 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 16:34:45,259 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 16:34:45,259 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 16:34:45,260 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 16:34:45,260 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 16:34:45,261 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 16:34:45,263 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 16:34:45,264 INFO: Model [SwinIRLatentModelMultiHead] is created.
01_11_2025/31_archived_20251101_175603/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 16:34:35 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 32
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_175603/train_31_20251101_163435.log ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 16:34:35,900 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 16:34:35,901 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 256
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 16:34:37,546 INFO: Use wandb logger with id=p6qx9i7h; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 16:34:50,916 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 16:34:50,917 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 256
253
+ World size (gpu number): 3
254
+ Steps per epoch: 6327
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 20.
257
+ 2025-11-01 16:34:50,921 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 16:34:50,921 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 16:34:51,051 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 16:34:52,595 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 16:34:52,596 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 16:34:52,598 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 16:34:52,718 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 16:34:52,756 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 16:34:52,757 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 16:34:52,758 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 16:34:52,759 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 16:34:52,759 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 16:34:52,760 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 16:34:52,760 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 16:34:52,761 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 16:34:52,763 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 16:34:52,764 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 16:45:08,778 INFO: Start training from epoch: 0, step: 0
01_11_2025/31_archived_20251101_175606/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:56:03 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_175606/train_31_20251101_175603.log ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:56:03,949 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:56:03,949 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 16
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:56:05,625 INFO: Use wandb logger with id=v7lltjw6; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:56:19,734 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:56:19,736 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 64
253
+ World size (gpu number): 3
254
+ Steps per epoch: 25305
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 5.
257
+ 2025-11-01 17:56:19,738 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:56:19,738 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:56:19,866 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:56:21,310 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:56:21,310 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:56:21,313 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:56:21,429 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:56:21,468 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:56:21,469 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:56:21,471 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:56:21,471 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:56:21,472 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:56:21,473 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:56:21,474 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:56:21,475 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:56:21,477 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:56:21,477 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 18:01:25,432 INFO: Start training from epoch: 0, step: 0
01_11_2025/31_archived_20251101_180557/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:56:06 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_180557/train_31_20251101_175606.log ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:56:06,891 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:56:06,892 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 16
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 17:56:08,557 INFO: Use wandb logger with id=njgnqqys; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 17:56:21,434 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 17:56:21,435 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 64
253
+ World size (gpu number): 3
254
+ Steps per epoch: 25305
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 5.
257
+ 2025-11-01 17:56:21,437 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 17:56:21,438 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 17:56:21,566 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 17:56:23,027 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 17:56:23,028 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 17:56:23,030 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 17:56:23,145 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 17:56:23,179 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:56:23,180 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 17:56:23,180 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 17:56:23,181 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 17:56:23,182 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:56:23,183 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 17:56:23,184 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 17:56:23,185 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 17:56:23,187 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 17:56:23,187 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 18:01:23,074 INFO: Start training from epoch: 0, step: 0
01_11_2025/31_archived_20251101_181616/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 18:05:57 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_181616/train_31_20251101_180557.log ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 18:05:57,267 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 18:05:57,267 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 16
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 18:05:59,009 INFO: Use wandb logger with id=os0y50mf; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 18:06:11,003 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 18:06:11,004 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 64
253
+ World size (gpu number): 3
254
+ Steps per epoch: 25305
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 5.
257
+ 2025-11-01 18:06:11,007 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 18:06:11,007 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 18:06:11,138 INFO: Network [SwinIRMultiHead] is created.
260
+ 2025-11-01 18:06:12,616 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
261
+ 2025-11-01 18:06:12,617 INFO: SwinIRMultiHead(
262
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
263
+ (patch_embed): PatchEmbed(
264
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
265
+ )
266
+ (patch_unembed): PatchUnEmbed()
267
+ (pos_drop): Dropout(p=0.0, inplace=False)
268
+ (layers): ModuleList(
269
+ (0): RSTB(
270
+ (residual_group): BasicLayer(
271
+ dim=180, input_resolution=(32, 32), depth=6
272
+ (blocks): ModuleList(
273
+ (0): SwinTransformerBlock(
274
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
275
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
276
+ (attn): WindowAttention(
277
+ dim=180, window_size=(8, 8), num_heads=6
278
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
279
+ (attn_drop): Dropout(p=0.0, inplace=False)
280
+ (proj): Linear(in_features=180, out_features=180, bias=True)
281
+ (proj_drop): Dropout(p=0.0, inplace=False)
282
+ (softmax): Softmax(dim=-1)
283
+ )
284
+ (drop_path): Identity()
285
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
286
+ (mlp): Mlp(
287
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
288
+ (act): GELU(approximate='none')
289
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
290
+ (drop): Dropout(p=0.0, inplace=False)
291
+ )
292
+ )
293
+ (1): SwinTransformerBlock(
294
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
295
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=180, window_size=(8, 8), num_heads=6
298
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=180, out_features=180, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): DropPath()
305
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (2): SwinTransformerBlock(
314
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
315
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=180, window_size=(8, 8), num_heads=6
318
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=180, out_features=180, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (3): SwinTransformerBlock(
334
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
335
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=180, window_size=(8, 8), num_heads=6
338
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=180, out_features=180, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (4): SwinTransformerBlock(
354
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
355
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=180, window_size=(8, 8), num_heads=6
358
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=180, out_features=180, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (5): SwinTransformerBlock(
374
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
375
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=180, window_size=(8, 8), num_heads=6
378
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=180, out_features=180, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ )
394
+ )
395
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
396
+ (patch_embed): PatchEmbed()
397
+ (patch_unembed): PatchUnEmbed()
398
+ )
399
+ (1-5): 5 x RSTB(
400
+ (residual_group): BasicLayer(
401
+ dim=180, input_resolution=(32, 32), depth=6
402
+ (blocks): ModuleList(
403
+ (0): SwinTransformerBlock(
404
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
405
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
406
+ (attn): WindowAttention(
407
+ dim=180, window_size=(8, 8), num_heads=6
408
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
409
+ (attn_drop): Dropout(p=0.0, inplace=False)
410
+ (proj): Linear(in_features=180, out_features=180, bias=True)
411
+ (proj_drop): Dropout(p=0.0, inplace=False)
412
+ (softmax): Softmax(dim=-1)
413
+ )
414
+ (drop_path): DropPath()
415
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
416
+ (mlp): Mlp(
417
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
418
+ (act): GELU(approximate='none')
419
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
420
+ (drop): Dropout(p=0.0, inplace=False)
421
+ )
422
+ )
423
+ (1): SwinTransformerBlock(
424
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
425
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=180, window_size=(8, 8), num_heads=6
428
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=180, out_features=180, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (2): SwinTransformerBlock(
444
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
445
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=180, window_size=(8, 8), num_heads=6
448
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=180, out_features=180, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (3): SwinTransformerBlock(
464
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
465
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=180, window_size=(8, 8), num_heads=6
468
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=180, out_features=180, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (4): SwinTransformerBlock(
484
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
485
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=180, window_size=(8, 8), num_heads=6
488
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=180, out_features=180, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (5): SwinTransformerBlock(
504
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
505
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=180, window_size=(8, 8), num_heads=6
508
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=180, out_features=180, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ )
524
+ )
525
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
526
+ (patch_embed): PatchEmbed()
527
+ (patch_unembed): PatchUnEmbed()
528
+ )
529
+ )
530
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
531
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
532
+ (heads): ModuleDict(
533
+ (x2): _SwinIRPixelShuffleHead(
534
+ (conv_before): Sequential(
535
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
536
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
537
+ )
538
+ (upsample): Upsample(
539
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
540
+ (1): PixelShuffle(upscale_factor=2)
541
+ )
542
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
543
+ )
544
+ (x4): _SwinIRPixelShuffleHead(
545
+ (conv_before): Sequential(
546
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
547
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
548
+ )
549
+ (upsample): Upsample(
550
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (1): PixelShuffle(upscale_factor=2)
552
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (3): PixelShuffle(upscale_factor=2)
554
+ )
555
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ )
557
+ )
558
+ )
559
+ 2025-11-01 18:06:12,620 INFO: Use EMA with decay: 0.999
560
+ 2025-11-01 18:06:12,734 INFO: Network [SwinIRMultiHead] is created.
561
+ 2025-11-01 18:06:12,767 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 18:06:12,768 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
563
+ 2025-11-01 18:06:12,769 INFO: Loss [L1Loss] is created.
564
+ 2025-11-01 18:06:12,769 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
565
+ 2025-11-01 18:06:12,770 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 18:06:12,770 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
567
+ 2025-11-01 18:06:12,771 INFO: Loss [FFTFrequencyLoss] is created.
568
+ 2025-11-01 18:06:12,772 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
569
+ 2025-11-01 18:06:12,774 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
570
+ 2025-11-01 18:06:12,774 INFO: Model [SwinIRLatentModelMultiHead] is created.
571
+ 2025-11-01 18:11:28,453 INFO: Start training from epoch: 0, step: 0
01_11_2025/31_archived_20251101_182408/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 18:16:16 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/31_archived_20251101_182408/train_31_20251101_181616.log ADDED
@@ -0,0 +1,573 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 18:16:16,842 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 18:16:16,842 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 3
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 16
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 8
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 180
76
+ num_heads: [6, 6, 6, 6, 6, 6]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ head_num_feat: 128
80
+ primary_head: x4
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ path:[
84
+ pretrain_network_g: None
85
+ strict_load_g: False
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/31/visualization
91
+ ]
92
+ compile:[
93
+ enabled: False
94
+ mode: max-autotune
95
+ dynamic: True
96
+ fullgraph: False
97
+ backend: None
98
+ ]
99
+ train:[
100
+ ema_decay: 0.999
101
+ head_inputs:[
102
+ x2:[
103
+ lq: 256
104
+ gt: 512
105
+ ]
106
+ x4:[
107
+ lq: 128
108
+ gt: 512
109
+ ]
110
+ ]
111
+ optim_g:[
112
+ type: Adam
113
+ lr: 0.0002
114
+ weight_decay: 0
115
+ betas: [0.9, 0.995]
116
+ ]
117
+ grad_clip:[
118
+ enabled: True
119
+ generator:[
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ ]
124
+ ]
125
+ scheduler:[
126
+ type: MultiStepLR
127
+ milestones: [62500, 93750, 112500]
128
+ gamma: 0.5
129
+ ]
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:[
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ ]
139
+ l1_latent_x4_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x4
145
+ ]
146
+ fft_latent_x2_opt:[
147
+ type: FFTFrequencyLoss
148
+ loss_weight: 0.1
149
+ reduction: mean
150
+ space: latent
151
+ target: x2
152
+ norm: ortho
153
+ use_log_amplitude: False
154
+ alpha: 0.0
155
+ normalize_weight: True
156
+ eps: 1e-8
157
+ ]
158
+ fft_latent_x4_opt:[
159
+ type: FFTFrequencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: latent
163
+ target: x4
164
+ norm: ortho
165
+ use_log_amplitude: False
166
+ alpha: 0.0
167
+ normalize_weight: True
168
+ eps: 1e-8
169
+ ]
170
+ ]
171
+ val:[
172
+ val_freq: 5000
173
+ save_img: True
174
+ head_evals:[
175
+ x2:[
176
+ save_img: True
177
+ label: val_x2
178
+ val_sizes:[
179
+ lq: 512
180
+ gt: 1024
181
+ ]
182
+ metrics:[
183
+ l1_latent:[
184
+ type: L1Loss
185
+ space: latent
186
+ ]
187
+ pixel_psnr_pt:[
188
+ type: calculate_psnr_pt
189
+ space: pixel
190
+ crop_border: 2
191
+ test_y_channel: False
192
+ ]
193
+ ]
194
+ ]
195
+ x4:[
196
+ save_img: True
197
+ label: val_x4
198
+ val_sizes:[
199
+ lq: 256
200
+ gt: 1024
201
+ ]
202
+ metrics:[
203
+ l1_latent:[
204
+ type: L1Loss
205
+ space: latent
206
+ ]
207
+ l2_latent:[
208
+ type: MSELoss
209
+ space: latent
210
+ ]
211
+ pixel_psnr_pt:[
212
+ type: calculate_psnr_pt
213
+ space: pixel
214
+ crop_border: 2
215
+ test_y_channel: False
216
+ ]
217
+ ]
218
+ ]
219
+ ]
220
+ ]
221
+ logger:[
222
+ print_freq: 100
223
+ save_checkpoint_freq: 5000
224
+ use_tb_logger: True
225
+ wandb:[
226
+ project: Swin2SR-Latent-SR
227
+ entity: kazanplova-it-more
228
+ resume_id: None
229
+ max_val_images: 10
230
+ ]
231
+ ]
232
+ dist_params:[
233
+ backend: nccl
234
+ port: 29500
235
+ dist: True
236
+ ]
237
+ load_networks_only: False
238
+ exp_name: 31
239
+ name: 31
240
+ dist: True
241
+ rank: 0
242
+ world_size: 3
243
+ auto_resume: False
244
+ is_train: True
245
+ root_path: /data/kazanplova/latent_vae_upscale_train
246
+
247
+ 2025-11-01 18:16:18,521 INFO: Use wandb logger with id=4kso9jn0; project=Swin2SR-Latent-SR.
248
+ 2025-11-01 18:16:31,295 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
249
+ 2025-11-01 18:16:31,296 INFO: Training statistics:
250
+ Number of train images: 4858507
251
+ Dataset enlarge ratio: 1
252
+ Batch size per gpu: 64
253
+ World size (gpu number): 3
254
+ Steps per epoch: 25305
255
+ Configured training steps: 125000
256
+ Approximate epochs to cover: 5.
257
+ 2025-11-01 18:16:31,300 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
258
+ 2025-11-01 18:16:31,300 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
259
+ 2025-11-01 18:16:31,302 INFO: Enabled find_unused_parameters=True for multi-head training overrides.
260
+ 2025-11-01 18:16:31,432 INFO: Network [SwinIRMultiHead] is created.
261
+ 2025-11-01 18:16:32,923 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
262
+ 2025-11-01 18:16:32,923 INFO: SwinIRMultiHead(
263
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
264
+ (patch_embed): PatchEmbed(
265
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
266
+ )
267
+ (patch_unembed): PatchUnEmbed()
268
+ (pos_drop): Dropout(p=0.0, inplace=False)
269
+ (layers): ModuleList(
270
+ (0): RSTB(
271
+ (residual_group): BasicLayer(
272
+ dim=180, input_resolution=(32, 32), depth=6
273
+ (blocks): ModuleList(
274
+ (0): SwinTransformerBlock(
275
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
276
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
277
+ (attn): WindowAttention(
278
+ dim=180, window_size=(8, 8), num_heads=6
279
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
280
+ (attn_drop): Dropout(p=0.0, inplace=False)
281
+ (proj): Linear(in_features=180, out_features=180, bias=True)
282
+ (proj_drop): Dropout(p=0.0, inplace=False)
283
+ (softmax): Softmax(dim=-1)
284
+ )
285
+ (drop_path): Identity()
286
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
287
+ (mlp): Mlp(
288
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
289
+ (act): GELU(approximate='none')
290
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
291
+ (drop): Dropout(p=0.0, inplace=False)
292
+ )
293
+ )
294
+ (1): SwinTransformerBlock(
295
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
296
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
297
+ (attn): WindowAttention(
298
+ dim=180, window_size=(8, 8), num_heads=6
299
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
300
+ (attn_drop): Dropout(p=0.0, inplace=False)
301
+ (proj): Linear(in_features=180, out_features=180, bias=True)
302
+ (proj_drop): Dropout(p=0.0, inplace=False)
303
+ (softmax): Softmax(dim=-1)
304
+ )
305
+ (drop_path): DropPath()
306
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
307
+ (mlp): Mlp(
308
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
309
+ (act): GELU(approximate='none')
310
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
311
+ (drop): Dropout(p=0.0, inplace=False)
312
+ )
313
+ )
314
+ (2): SwinTransformerBlock(
315
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
316
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
317
+ (attn): WindowAttention(
318
+ dim=180, window_size=(8, 8), num_heads=6
319
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
320
+ (attn_drop): Dropout(p=0.0, inplace=False)
321
+ (proj): Linear(in_features=180, out_features=180, bias=True)
322
+ (proj_drop): Dropout(p=0.0, inplace=False)
323
+ (softmax): Softmax(dim=-1)
324
+ )
325
+ (drop_path): DropPath()
326
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
327
+ (mlp): Mlp(
328
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
329
+ (act): GELU(approximate='none')
330
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
331
+ (drop): Dropout(p=0.0, inplace=False)
332
+ )
333
+ )
334
+ (3): SwinTransformerBlock(
335
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
336
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
337
+ (attn): WindowAttention(
338
+ dim=180, window_size=(8, 8), num_heads=6
339
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
340
+ (attn_drop): Dropout(p=0.0, inplace=False)
341
+ (proj): Linear(in_features=180, out_features=180, bias=True)
342
+ (proj_drop): Dropout(p=0.0, inplace=False)
343
+ (softmax): Softmax(dim=-1)
344
+ )
345
+ (drop_path): DropPath()
346
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
347
+ (mlp): Mlp(
348
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
349
+ (act): GELU(approximate='none')
350
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
351
+ (drop): Dropout(p=0.0, inplace=False)
352
+ )
353
+ )
354
+ (4): SwinTransformerBlock(
355
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
356
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
357
+ (attn): WindowAttention(
358
+ dim=180, window_size=(8, 8), num_heads=6
359
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
360
+ (attn_drop): Dropout(p=0.0, inplace=False)
361
+ (proj): Linear(in_features=180, out_features=180, bias=True)
362
+ (proj_drop): Dropout(p=0.0, inplace=False)
363
+ (softmax): Softmax(dim=-1)
364
+ )
365
+ (drop_path): DropPath()
366
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
367
+ (mlp): Mlp(
368
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
369
+ (act): GELU(approximate='none')
370
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
371
+ (drop): Dropout(p=0.0, inplace=False)
372
+ )
373
+ )
374
+ (5): SwinTransformerBlock(
375
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
376
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
377
+ (attn): WindowAttention(
378
+ dim=180, window_size=(8, 8), num_heads=6
379
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
380
+ (attn_drop): Dropout(p=0.0, inplace=False)
381
+ (proj): Linear(in_features=180, out_features=180, bias=True)
382
+ (proj_drop): Dropout(p=0.0, inplace=False)
383
+ (softmax): Softmax(dim=-1)
384
+ )
385
+ (drop_path): DropPath()
386
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
387
+ (mlp): Mlp(
388
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
389
+ (act): GELU(approximate='none')
390
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
391
+ (drop): Dropout(p=0.0, inplace=False)
392
+ )
393
+ )
394
+ )
395
+ )
396
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
397
+ (patch_embed): PatchEmbed()
398
+ (patch_unembed): PatchUnEmbed()
399
+ )
400
+ (1-5): 5 x RSTB(
401
+ (residual_group): BasicLayer(
402
+ dim=180, input_resolution=(32, 32), depth=6
403
+ (blocks): ModuleList(
404
+ (0): SwinTransformerBlock(
405
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
406
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
407
+ (attn): WindowAttention(
408
+ dim=180, window_size=(8, 8), num_heads=6
409
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
410
+ (attn_drop): Dropout(p=0.0, inplace=False)
411
+ (proj): Linear(in_features=180, out_features=180, bias=True)
412
+ (proj_drop): Dropout(p=0.0, inplace=False)
413
+ (softmax): Softmax(dim=-1)
414
+ )
415
+ (drop_path): DropPath()
416
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
417
+ (mlp): Mlp(
418
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
419
+ (act): GELU(approximate='none')
420
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
421
+ (drop): Dropout(p=0.0, inplace=False)
422
+ )
423
+ )
424
+ (1): SwinTransformerBlock(
425
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
426
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
427
+ (attn): WindowAttention(
428
+ dim=180, window_size=(8, 8), num_heads=6
429
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
430
+ (attn_drop): Dropout(p=0.0, inplace=False)
431
+ (proj): Linear(in_features=180, out_features=180, bias=True)
432
+ (proj_drop): Dropout(p=0.0, inplace=False)
433
+ (softmax): Softmax(dim=-1)
434
+ )
435
+ (drop_path): DropPath()
436
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
437
+ (mlp): Mlp(
438
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
439
+ (act): GELU(approximate='none')
440
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
441
+ (drop): Dropout(p=0.0, inplace=False)
442
+ )
443
+ )
444
+ (2): SwinTransformerBlock(
445
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
446
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
447
+ (attn): WindowAttention(
448
+ dim=180, window_size=(8, 8), num_heads=6
449
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
450
+ (attn_drop): Dropout(p=0.0, inplace=False)
451
+ (proj): Linear(in_features=180, out_features=180, bias=True)
452
+ (proj_drop): Dropout(p=0.0, inplace=False)
453
+ (softmax): Softmax(dim=-1)
454
+ )
455
+ (drop_path): DropPath()
456
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
457
+ (mlp): Mlp(
458
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
459
+ (act): GELU(approximate='none')
460
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
461
+ (drop): Dropout(p=0.0, inplace=False)
462
+ )
463
+ )
464
+ (3): SwinTransformerBlock(
465
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
466
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
467
+ (attn): WindowAttention(
468
+ dim=180, window_size=(8, 8), num_heads=6
469
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
470
+ (attn_drop): Dropout(p=0.0, inplace=False)
471
+ (proj): Linear(in_features=180, out_features=180, bias=True)
472
+ (proj_drop): Dropout(p=0.0, inplace=False)
473
+ (softmax): Softmax(dim=-1)
474
+ )
475
+ (drop_path): DropPath()
476
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
477
+ (mlp): Mlp(
478
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
479
+ (act): GELU(approximate='none')
480
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
481
+ (drop): Dropout(p=0.0, inplace=False)
482
+ )
483
+ )
484
+ (4): SwinTransformerBlock(
485
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
486
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
487
+ (attn): WindowAttention(
488
+ dim=180, window_size=(8, 8), num_heads=6
489
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
490
+ (attn_drop): Dropout(p=0.0, inplace=False)
491
+ (proj): Linear(in_features=180, out_features=180, bias=True)
492
+ (proj_drop): Dropout(p=0.0, inplace=False)
493
+ (softmax): Softmax(dim=-1)
494
+ )
495
+ (drop_path): DropPath()
496
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
497
+ (mlp): Mlp(
498
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
499
+ (act): GELU(approximate='none')
500
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
501
+ (drop): Dropout(p=0.0, inplace=False)
502
+ )
503
+ )
504
+ (5): SwinTransformerBlock(
505
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
506
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
507
+ (attn): WindowAttention(
508
+ dim=180, window_size=(8, 8), num_heads=6
509
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
510
+ (attn_drop): Dropout(p=0.0, inplace=False)
511
+ (proj): Linear(in_features=180, out_features=180, bias=True)
512
+ (proj_drop): Dropout(p=0.0, inplace=False)
513
+ (softmax): Softmax(dim=-1)
514
+ )
515
+ (drop_path): DropPath()
516
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
517
+ (mlp): Mlp(
518
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
519
+ (act): GELU(approximate='none')
520
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
521
+ (drop): Dropout(p=0.0, inplace=False)
522
+ )
523
+ )
524
+ )
525
+ )
526
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
527
+ (patch_embed): PatchEmbed()
528
+ (patch_unembed): PatchUnEmbed()
529
+ )
530
+ )
531
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
532
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
533
+ (heads): ModuleDict(
534
+ (x2): _SwinIRPixelShuffleHead(
535
+ (conv_before): Sequential(
536
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
537
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
538
+ )
539
+ (upsample): Upsample(
540
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ (1): PixelShuffle(upscale_factor=2)
542
+ )
543
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
544
+ )
545
+ (x4): _SwinIRPixelShuffleHead(
546
+ (conv_before): Sequential(
547
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
548
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
549
+ )
550
+ (upsample): Upsample(
551
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
552
+ (1): PixelShuffle(upscale_factor=2)
553
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ (3): PixelShuffle(upscale_factor=2)
555
+ )
556
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
557
+ )
558
+ )
559
+ )
560
+ 2025-11-01 18:16:32,926 INFO: Use EMA with decay: 0.999
561
+ 2025-11-01 18:16:33,037 INFO: Network [SwinIRMultiHead] is created.
562
+ 2025-11-01 18:16:33,071 INFO: Loss [L1Loss] is created.
563
+ 2025-11-01 18:16:33,072 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
564
+ 2025-11-01 18:16:33,073 INFO: Loss [L1Loss] is created.
565
+ 2025-11-01 18:16:33,073 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
566
+ 2025-11-01 18:16:33,074 INFO: Loss [FFTFrequencyLoss] is created.
567
+ 2025-11-01 18:16:33,075 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
568
+ 2025-11-01 18:16:33,076 INFO: Loss [FFTFrequencyLoss] is created.
569
+ 2025-11-01 18:16:33,077 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
570
+ 2025-11-01 18:16:33,079 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
571
+ 2025-11-01 18:16:33,079 INFO: Model [SwinIRLatentModelMultiHead] is created.
572
+ 2025-11-01 18:21:42,738 INFO: Start training from epoch: 0, step: 0
573
+ 2025-11-01 18:22:46,265 INFO: [31..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 18:55:44, time (data): 0.635 (0.060)] l1_latent_x2_opt: 9.5564e-01 fft_latent_x2_opt: 8.4872e-01 l1_latent_x4_opt: 1.1058e+00 fft_latent_x4_opt: 9.5144e-01
01_11_2025/31_archived_20251101_183720/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 18:24:08 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml --launcher pytorch --local_rank 0
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 256
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 8
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 180
76
+ num_heads:
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ - 6
82
+ - 6
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ head_num_feat: 128
86
+ primary_head: x4
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ path:
96
+ pretrain_network_g: null
97
+ strict_load_g: false
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
99
+ compile:
100
+ enabled: false
101
+ mode: max-autotune
102
+ dynamic: true
103
+ fullgraph: false
104
+ backend: null
105
+ train:
106
+ ema_decay: 0.999
107
+ head_inputs:
108
+ x2:
109
+ lq: 256
110
+ gt: 512
111
+ x4:
112
+ lq: 128
113
+ gt: 512
114
+ optim_g:
115
+ type: Adam
116
+ lr: 0.0002
117
+ weight_decay: 0
118
+ betas:
119
+ - 0.9
120
+ - 0.995
121
+ grad_clip:
122
+ enabled: true
123
+ generator:
124
+ type: norm
125
+ max_norm: 0.4
126
+ norm_type: 2.0
127
+ scheduler:
128
+ type: MultiStepLR
129
+ milestones:
130
+ - 62500
131
+ - 93750
132
+ - 112500
133
+ gamma: 0.5
134
+ total_steps: 125000
135
+ warmup_iter: -1
136
+ l1_latent_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: latent
141
+ target: x2
142
+ l1_latent_x4_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x4
148
+ fft_latent_x2_opt:
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 0.1
151
+ reduction: mean
152
+ space: latent
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: false
156
+ alpha: 0.0
157
+ normalize_weight: true
158
+ eps: 1e-8
159
+ fft_latent_x4_opt:
160
+ type: FFTFrequencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: latent
164
+ target: x4
165
+ norm: ortho
166
+ use_log_amplitude: false
167
+ alpha: 0.0
168
+ normalize_weight: true
169
+ eps: 1e-8
170
+ val:
171
+ val_freq: 5000
172
+ save_img: true
173
+ head_evals:
174
+ x2:
175
+ save_img: true
176
+ label: val_x2
177
+ val_sizes:
178
+ lq: 512
179
+ gt: 1024
180
+ metrics:
181
+ l1_latent:
182
+ type: L1Loss
183
+ space: latent
184
+ pixel_psnr_pt:
185
+ type: calculate_psnr_pt
186
+ space: pixel
187
+ crop_border: 2
188
+ test_y_channel: false
189
+ x4:
190
+ save_img: true
191
+ label: val_x4
192
+ val_sizes:
193
+ lq: 256
194
+ gt: 1024
195
+ metrics:
196
+ l1_latent:
197
+ type: L1Loss
198
+ space: latent
199
+ l2_latent:
200
+ type: MSELoss
201
+ space: latent
202
+ pixel_psnr_pt:
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: false
207
+ logger:
208
+ print_freq: 100
209
+ save_checkpoint_freq: 5000
210
+ use_tb_logger: true
211
+ wandb:
212
+ project: Swin2SR-Latent-SR
213
+ entity: kazanplova-it-more
214
+ resume_id: null
215
+ max_val_images: 10
216
+ dist_params:
217
+ backend: nccl
218
+ port: 29500
219
+ dist: true
220
+ load_networks_only: false
221
+ exp_name: '31'
222
+ name: '31'
01_11_2025/32_2/basicsr_options.yaml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:28:59 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 4
39
+ batch_size_per_gpu: 32
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 16
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 360
76
+ num_heads:
77
+ - 12
78
+ - 12
79
+ - 12
80
+ - 12
81
+ - 12
82
+ - 12
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ primary_head: x4
86
+ head_num_feat: 256
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ compile:
96
+ enabled: false
97
+ mode: max-autotune
98
+ dynamic: true
99
+ fullgraph: false
100
+ backend: null
101
+ train:
102
+ ema_decay: 0.999
103
+ head_inputs:
104
+ x2:
105
+ lq: 256
106
+ gt: 512
107
+ x4:
108
+ lq: 128
109
+ gt: 512
110
+ optim_g:
111
+ type: Adam
112
+ lr: 0.0002
113
+ weight_decay: 0
114
+ betas:
115
+ - 0.9
116
+ - 0.995
117
+ grad_clip:
118
+ enabled: true
119
+ generator:
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ scheduler:
124
+ type: MultiStepLR
125
+ milestones:
126
+ - 62500
127
+ - 93750
128
+ - 112500
129
+ gamma: 0.5
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ l1_latent_x4_opt:
139
+ type: L1Loss
140
+ loss_weight: 1.0
141
+ reduction: mean
142
+ space: latent
143
+ target: x4
144
+ fft_latent_x2_opt:
145
+ type: FFTFrequencyLoss
146
+ loss_weight: 0.1
147
+ reduction: mean
148
+ space: latent
149
+ target: x2
150
+ norm: ortho
151
+ use_log_amplitude: false
152
+ alpha: 0.0
153
+ normalize_weight: true
154
+ eps: 1e-8
155
+ fft_latent_x4_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: latent
160
+ target: x4
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ val:
167
+ val_freq: 5000
168
+ save_img: true
169
+ head_evals:
170
+ x2:
171
+ save_img: true
172
+ label: val_x2
173
+ val_sizes:
174
+ lq: 512
175
+ gt: 1024
176
+ metrics:
177
+ l1_latent:
178
+ type: L1Loss
179
+ space: latent
180
+ pixel_psnr_pt:
181
+ type: calculate_psnr_pt
182
+ space: pixel
183
+ crop_border: 2
184
+ test_y_channel: false
185
+ x4:
186
+ save_img: true
187
+ label: val_x4
188
+ val_sizes:
189
+ lq: 256
190
+ gt: 1024
191
+ metrics:
192
+ l1_latent:
193
+ type: L1Loss
194
+ space: latent
195
+ l2_latent:
196
+ type: MSELoss
197
+ space: latent
198
+ pixel_psnr_pt:
199
+ type: calculate_psnr_pt
200
+ space: pixel
201
+ crop_border: 2
202
+ test_y_channel: false
203
+ logger:
204
+ print_freq: 100
205
+ save_checkpoint_freq: 5000
206
+ use_tb_logger: true
207
+ wandb:
208
+ project: Swin2SR-Latent-SR
209
+ entity: kazanplova-it-more
210
+ resume_id: null
211
+ max_val_images: 10
212
+ dist_params:
213
+ backend: nccl
214
+ port: 29500
215
+ dist: true
216
+ load_networks_only: false
217
+ exp_name: '32'
218
+ name: '32_2'
219
+ path:
220
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
01_11_2025/32_2/train_32_2_20251101_172859.log ADDED
@@ -0,0 +1,569 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:28:59,124 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:28:59,124 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 4
46
+ batch_size_per_gpu: 32
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_2
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_2
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_2/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_2/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_2
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_2/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:29:00,958 INFO: Use wandb logger with id=g60627ml; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:29:13,477 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:29:13,479 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 32
251
+ World size (gpu number): 1
252
+ Steps per epoch: 151829
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 1.
255
+ 2025-11-01 17:29:13,482 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:29:13,483 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:29:14,148 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:29:14,392 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:29:14,393 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:29:14,395 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:29:14,962 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:29:15,036 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:29:15,036 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:29:15,038 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:29:15,038 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:29:15,038 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:29:15,038 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:29:15,038 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:29:15,039 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:29:15,041 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:29:15,041 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:29:15,635 INFO: Start training from epoch: 0, step: 0
01_11_2025/32_3/basicsr_options.yaml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:31:03 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 12
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 16
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 360
76
+ num_heads:
77
+ - 12
78
+ - 12
79
+ - 12
80
+ - 12
81
+ - 12
82
+ - 12
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ primary_head: x4
86
+ head_num_feat: 256
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ compile:
96
+ enabled: false
97
+ mode: max-autotune
98
+ dynamic: true
99
+ fullgraph: false
100
+ backend: null
101
+ train:
102
+ ema_decay: 0.999
103
+ head_inputs:
104
+ x2:
105
+ lq: 256
106
+ gt: 512
107
+ x4:
108
+ lq: 128
109
+ gt: 512
110
+ optim_g:
111
+ type: Adam
112
+ lr: 0.0002
113
+ weight_decay: 0
114
+ betas:
115
+ - 0.9
116
+ - 0.995
117
+ grad_clip:
118
+ enabled: true
119
+ generator:
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ scheduler:
124
+ type: MultiStepLR
125
+ milestones:
126
+ - 62500
127
+ - 93750
128
+ - 112500
129
+ gamma: 0.5
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ l1_latent_x4_opt:
139
+ type: L1Loss
140
+ loss_weight: 1.0
141
+ reduction: mean
142
+ space: latent
143
+ target: x4
144
+ fft_latent_x2_opt:
145
+ type: FFTFrequencyLoss
146
+ loss_weight: 0.1
147
+ reduction: mean
148
+ space: latent
149
+ target: x2
150
+ norm: ortho
151
+ use_log_amplitude: false
152
+ alpha: 0.0
153
+ normalize_weight: true
154
+ eps: 1e-8
155
+ fft_latent_x4_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: latent
160
+ target: x4
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ val:
167
+ val_freq: 5000
168
+ save_img: true
169
+ head_evals:
170
+ x2:
171
+ save_img: true
172
+ label: val_x2
173
+ val_sizes:
174
+ lq: 512
175
+ gt: 1024
176
+ metrics:
177
+ l1_latent:
178
+ type: L1Loss
179
+ space: latent
180
+ pixel_psnr_pt:
181
+ type: calculate_psnr_pt
182
+ space: pixel
183
+ crop_border: 2
184
+ test_y_channel: false
185
+ x4:
186
+ save_img: true
187
+ label: val_x4
188
+ val_sizes:
189
+ lq: 256
190
+ gt: 1024
191
+ metrics:
192
+ l1_latent:
193
+ type: L1Loss
194
+ space: latent
195
+ l2_latent:
196
+ type: MSELoss
197
+ space: latent
198
+ pixel_psnr_pt:
199
+ type: calculate_psnr_pt
200
+ space: pixel
201
+ crop_border: 2
202
+ test_y_channel: false
203
+ logger:
204
+ print_freq: 100
205
+ save_checkpoint_freq: 5000
206
+ use_tb_logger: true
207
+ wandb:
208
+ project: Swin2SR-Latent-SR
209
+ entity: kazanplova-it-more
210
+ resume_id: null
211
+ max_val_images: 10
212
+ dist_params:
213
+ backend: nccl
214
+ port: 29500
215
+ dist: true
216
+ load_networks_only: false
217
+ exp_name: '32'
218
+ name: '32_3'
219
+ path:
220
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
01_11_2025/32_3/train_32_3_20251101_173103.log ADDED
@@ -0,0 +1,569 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:31:03,886 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:31:03,886 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 12
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_3
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:31:05,446 INFO: Use wandb logger with id=kbbo079n; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:31:18,343 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:31:18,344 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 64
251
+ World size (gpu number): 1
252
+ Steps per epoch: 75915
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 2.
255
+ 2025-11-01 17:31:18,347 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:31:18,347 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:31:19,019 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:31:19,237 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:31:19,238 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:31:19,240 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:31:19,819 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:31:19,893 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:31:19,893 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:31:19,895 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:31:19,895 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:31:19,895 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:31:19,896 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:31:19,897 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:31:19,898 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:31:19,900 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:31:19,900 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:31:20,737 INFO: Start training from epoch: 0, step: 0
01_11_2025/32_3_archived_20251101_173103/basicsr_options.yaml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:31:02 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 12
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 16
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 360
76
+ num_heads:
77
+ - 12
78
+ - 12
79
+ - 12
80
+ - 12
81
+ - 12
82
+ - 12
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ primary_head: x4
86
+ head_num_feat: 256
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ compile:
96
+ enabled: false
97
+ mode: max-autotune
98
+ dynamic: true
99
+ fullgraph: false
100
+ backend: null
101
+ train:
102
+ ema_decay: 0.999
103
+ head_inputs:
104
+ x2:
105
+ lq: 256
106
+ gt: 512
107
+ x4:
108
+ lq: 128
109
+ gt: 512
110
+ optim_g:
111
+ type: Adam
112
+ lr: 0.0002
113
+ weight_decay: 0
114
+ betas:
115
+ - 0.9
116
+ - 0.995
117
+ grad_clip:
118
+ enabled: true
119
+ generator:
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ scheduler:
124
+ type: MultiStepLR
125
+ milestones:
126
+ - 62500
127
+ - 93750
128
+ - 112500
129
+ gamma: 0.5
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ l1_latent_x4_opt:
139
+ type: L1Loss
140
+ loss_weight: 1.0
141
+ reduction: mean
142
+ space: latent
143
+ target: x4
144
+ fft_latent_x2_opt:
145
+ type: FFTFrequencyLoss
146
+ loss_weight: 0.1
147
+ reduction: mean
148
+ space: latent
149
+ target: x2
150
+ norm: ortho
151
+ use_log_amplitude: false
152
+ alpha: 0.0
153
+ normalize_weight: true
154
+ eps: 1e-8
155
+ fft_latent_x4_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: latent
160
+ target: x4
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ val:
167
+ val_freq: 5000
168
+ save_img: true
169
+ head_evals:
170
+ x2:
171
+ save_img: true
172
+ label: val_x2
173
+ val_sizes:
174
+ lq: 512
175
+ gt: 1024
176
+ metrics:
177
+ l1_latent:
178
+ type: L1Loss
179
+ space: latent
180
+ pixel_psnr_pt:
181
+ type: calculate_psnr_pt
182
+ space: pixel
183
+ crop_border: 2
184
+ test_y_channel: false
185
+ x4:
186
+ save_img: true
187
+ label: val_x4
188
+ val_sizes:
189
+ lq: 256
190
+ gt: 1024
191
+ metrics:
192
+ l1_latent:
193
+ type: L1Loss
194
+ space: latent
195
+ l2_latent:
196
+ type: MSELoss
197
+ space: latent
198
+ pixel_psnr_pt:
199
+ type: calculate_psnr_pt
200
+ space: pixel
201
+ crop_border: 2
202
+ test_y_channel: false
203
+ logger:
204
+ print_freq: 100
205
+ save_checkpoint_freq: 5000
206
+ use_tb_logger: true
207
+ wandb:
208
+ project: Swin2SR-Latent-SR
209
+ entity: kazanplova-it-more
210
+ resume_id: null
211
+ max_val_images: 10
212
+ dist_params:
213
+ backend: nccl
214
+ port: 29500
215
+ dist: true
216
+ load_networks_only: false
217
+ exp_name: '32'
218
+ name: '32_3'
219
+ path:
220
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
01_11_2025/32_3_archived_20251101_173103/train_32_3_20251101_173102.log ADDED
@@ -0,0 +1,569 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:31:02,184 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:31:02,184 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 12
46
+ batch_size_per_gpu: 64
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_3
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_3/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:31:03,910 INFO: Use wandb logger with id=qkopcxv2; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:31:16,258 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:31:16,259 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 64
251
+ World size (gpu number): 1
252
+ Steps per epoch: 75915
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 2.
255
+ 2025-11-01 17:31:16,264 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:31:16,264 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:31:16,907 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:31:17,126 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:31:17,127 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:31:17,130 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:31:17,726 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:31:17,797 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:31:17,798 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:31:17,799 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:31:17,799 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:31:17,799 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:31:17,800 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:31:17,800 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:31:17,801 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:31:17,803 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:31:17,804 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:31:18,697 INFO: Start training from epoch: 0, step: 0
01_11_2025/32_4/basicsr_options.yaml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:33:15 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 12
39
+ batch_size_per_gpu: 48
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 16
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 360
76
+ num_heads:
77
+ - 12
78
+ - 12
79
+ - 12
80
+ - 12
81
+ - 12
82
+ - 12
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ primary_head: x4
86
+ head_num_feat: 256
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ compile:
96
+ enabled: false
97
+ mode: max-autotune
98
+ dynamic: true
99
+ fullgraph: false
100
+ backend: null
101
+ train:
102
+ ema_decay: 0.999
103
+ head_inputs:
104
+ x2:
105
+ lq: 256
106
+ gt: 512
107
+ x4:
108
+ lq: 128
109
+ gt: 512
110
+ optim_g:
111
+ type: Adam
112
+ lr: 0.0002
113
+ weight_decay: 0
114
+ betas:
115
+ - 0.9
116
+ - 0.995
117
+ grad_clip:
118
+ enabled: true
119
+ generator:
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ scheduler:
124
+ type: MultiStepLR
125
+ milestones:
126
+ - 62500
127
+ - 93750
128
+ - 112500
129
+ gamma: 0.5
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ l1_latent_x4_opt:
139
+ type: L1Loss
140
+ loss_weight: 1.0
141
+ reduction: mean
142
+ space: latent
143
+ target: x4
144
+ fft_latent_x2_opt:
145
+ type: FFTFrequencyLoss
146
+ loss_weight: 0.1
147
+ reduction: mean
148
+ space: latent
149
+ target: x2
150
+ norm: ortho
151
+ use_log_amplitude: false
152
+ alpha: 0.0
153
+ normalize_weight: true
154
+ eps: 1e-8
155
+ fft_latent_x4_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: latent
160
+ target: x4
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ val:
167
+ val_freq: 5000
168
+ save_img: true
169
+ head_evals:
170
+ x2:
171
+ save_img: true
172
+ label: val_x2
173
+ val_sizes:
174
+ lq: 512
175
+ gt: 1024
176
+ metrics:
177
+ l1_latent:
178
+ type: L1Loss
179
+ space: latent
180
+ pixel_psnr_pt:
181
+ type: calculate_psnr_pt
182
+ space: pixel
183
+ crop_border: 2
184
+ test_y_channel: false
185
+ x4:
186
+ save_img: true
187
+ label: val_x4
188
+ val_sizes:
189
+ lq: 256
190
+ gt: 1024
191
+ metrics:
192
+ l1_latent:
193
+ type: L1Loss
194
+ space: latent
195
+ l2_latent:
196
+ type: MSELoss
197
+ space: latent
198
+ pixel_psnr_pt:
199
+ type: calculate_psnr_pt
200
+ space: pixel
201
+ crop_border: 2
202
+ test_y_channel: false
203
+ logger:
204
+ print_freq: 100
205
+ save_checkpoint_freq: 5000
206
+ use_tb_logger: true
207
+ wandb:
208
+ project: Swin2SR-Latent-SR
209
+ entity: kazanplova-it-more
210
+ resume_id: null
211
+ max_val_images: 10
212
+ dist_params:
213
+ backend: nccl
214
+ port: 29500
215
+ dist: true
216
+ load_networks_only: false
217
+ exp_name: '32'
218
+ name: '32_4'
219
+ path:
220
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
01_11_2025/32_4/train_32_4_20251101_173315.log ADDED
@@ -0,0 +1,570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:33:15,556 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:33:15,557 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 12
46
+ batch_size_per_gpu: 48
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_4
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:33:17,136 INFO: Use wandb logger with id=6ukysoy2; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:33:30,521 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:33:30,522 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 48
251
+ World size (gpu number): 1
252
+ Steps per epoch: 101219
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 2.
255
+ 2025-11-01 17:33:30,525 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:33:30,526 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:33:31,148 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:33:31,364 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:33:31,364 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:33:31,366 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:33:32,057 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:33:32,153 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:33:32,153 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:33:32,154 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:33:32,155 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:33:32,156 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:33:32,157 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:33:32,158 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:33:32,159 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:33:32,160 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:33:32,160 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:33:32,929 INFO: Start training from epoch: 0, step: 0
570
+ 2025-11-01 17:35:01,495 INFO: [32_4..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 1 day, 5:05:51, time (data): 0.886 (0.012)] l1_latent_x2_opt: 9.3943e-01 fft_latent_x2_opt: 8.1907e-01 l1_latent_x4_opt: 1.0842e+00 fft_latent_x4_opt: 9.2859e-01
01_11_2025/32_4_archived_20251101_173315/train_32_4_20251101_173312.log ADDED
@@ -0,0 +1,570 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:33:12,469 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:33:12,469 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 12
46
+ batch_size_per_gpu: 48
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_4
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_4/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:33:14,206 INFO: Use wandb logger with id=abib7bhr; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:33:26,913 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:33:26,914 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 48
251
+ World size (gpu number): 1
252
+ Steps per epoch: 101219
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 2.
255
+ 2025-11-01 17:33:26,918 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:33:26,918 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:33:27,520 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:33:27,743 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:33:27,744 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:33:27,747 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:33:28,296 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:33:28,364 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:33:28,365 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:33:28,365 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:33:28,366 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:33:28,368 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:33:28,369 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:33:28,369 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:33:28,370 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:33:28,373 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:33:28,373 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:33:29,158 INFO: Start training from epoch: 0, step: 0
570
+ 2025-11-01 17:34:58,475 INFO: [32_4..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 1 day, 5:07:50, time (data): 0.893 (0.013)] l1_latent_x2_opt: 9.4505e-01 fft_latent_x2_opt: 8.2342e-01 l1_latent_x4_opt: 1.0919e+00 fft_latent_x4_opt: 9.2995e-01
01_11_2025/32_5/train_32_5_20251101_175216.log ADDED
@@ -0,0 +1,569 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-01 17:52:16,197 INFO:
2
+ ____ _ _____ ____
3
+ / __ ) ____ _ _____ (_)_____/ ___/ / __ \
4
+ / __ |/ __ `// ___// // ___/\__ \ / /_/ /
5
+ / /_/ // /_/ /(__ )/ // /__ ___/ // _, _/
6
+ /_____/ \__,_//____//_/ \___//____//_/ |_|
7
+ ______ __ __ __ __
8
+ / ____/____ ____ ____/ / / / __ __ _____ / /__ / /
9
+ / / __ / __ \ / __ \ / __ / / / / / / // ___// //_/ / /
10
+ / /_/ // /_/ // /_/ // /_/ / / /___/ /_/ // /__ / /< /_/
11
+ \____/ \____/ \____/ \____/ /_____/\____/ \___//_/|_| (_)
12
+
13
+ Version Information:
14
+ BasicSR: 1.4.2
15
+ PyTorch: 2.9.0+cu129
16
+ TorchVision: 0.24.0+cpu
17
+ 2025-11-01 17:52:16,197 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 1
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ vae_sources:[
25
+ flux_vae:[
26
+ hf_repo: wolfgangblack/flux_vae
27
+ vae_kind: kl
28
+ ]
29
+ ]
30
+ datasets:[
31
+ train:[
32
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
33
+ type: MultiScaleLatentCacheDataset
34
+ scales: [128, 256, 512]
35
+ cache_dirs: ['/data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae', '/data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae']
36
+ vae_names: ['flux_vae']
37
+ phase: train
38
+ filename_tmpl: {}
39
+ io_backend:[
40
+ type: disk
41
+ ]
42
+ scale: 4
43
+ mean: None
44
+ std: None
45
+ num_worker_per_gpu: 32
46
+ batch_size_per_gpu: 128
47
+ pin_memory: True
48
+ persistent_workers: True
49
+ ]
50
+ val:[
51
+ name: sdxk_120_1024x1024
52
+ type: MultiScaleLatentCacheDataset
53
+ scales: [256, 512, 1024]
54
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
55
+ vae_names: ['flux_vae']
56
+ phase: val
57
+ io_backend:[
58
+ type: disk
59
+ ]
60
+ scale: 4
61
+ mean: None
62
+ std: None
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: True
66
+ ]
67
+ ]
68
+ network_g:[
69
+ type: SwinIRMultiHead
70
+ in_chans: 16
71
+ img_size: 32
72
+ window_size: 16
73
+ img_range: 1.0
74
+ depths: [6, 6, 6, 6, 6, 6]
75
+ embed_dim: 360
76
+ num_heads: [12, 12, 12, 12, 12, 12]
77
+ mlp_ratio: 2
78
+ resi_connection: 1conv
79
+ primary_head: x4
80
+ head_num_feat: 256
81
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
82
+ ]
83
+ compile:[
84
+ enabled: False
85
+ mode: max-autotune
86
+ dynamic: True
87
+ fullgraph: False
88
+ backend: None
89
+ ]
90
+ train:[
91
+ ema_decay: 0.999
92
+ head_inputs:[
93
+ x2:[
94
+ lq: 256
95
+ gt: 512
96
+ ]
97
+ x4:[
98
+ lq: 128
99
+ gt: 512
100
+ ]
101
+ ]
102
+ optim_g:[
103
+ type: Adam
104
+ lr: 0.0002
105
+ weight_decay: 0
106
+ betas: [0.9, 0.995]
107
+ ]
108
+ grad_clip:[
109
+ enabled: True
110
+ generator:[
111
+ type: norm
112
+ max_norm: 0.4
113
+ norm_type: 2.0
114
+ ]
115
+ ]
116
+ scheduler:[
117
+ type: MultiStepLR
118
+ milestones: [62500, 93750, 112500]
119
+ gamma: 0.5
120
+ ]
121
+ total_steps: 125000
122
+ warmup_iter: -1
123
+ l1_latent_x2_opt:[
124
+ type: L1Loss
125
+ loss_weight: 1.0
126
+ reduction: mean
127
+ space: latent
128
+ target: x2
129
+ ]
130
+ l1_latent_x4_opt:[
131
+ type: L1Loss
132
+ loss_weight: 1.0
133
+ reduction: mean
134
+ space: latent
135
+ target: x4
136
+ ]
137
+ fft_latent_x2_opt:[
138
+ type: FFTFrequencyLoss
139
+ loss_weight: 0.1
140
+ reduction: mean
141
+ space: latent
142
+ target: x2
143
+ norm: ortho
144
+ use_log_amplitude: False
145
+ alpha: 0.0
146
+ normalize_weight: True
147
+ eps: 1e-8
148
+ ]
149
+ fft_latent_x4_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 0.1
152
+ reduction: mean
153
+ space: latent
154
+ target: x4
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ ]
162
+ val:[
163
+ val_freq: 5000
164
+ save_img: True
165
+ head_evals:[
166
+ x2:[
167
+ save_img: True
168
+ label: val_x2
169
+ val_sizes:[
170
+ lq: 512
171
+ gt: 1024
172
+ ]
173
+ metrics:[
174
+ l1_latent:[
175
+ type: L1Loss
176
+ space: latent
177
+ ]
178
+ pixel_psnr_pt:[
179
+ type: calculate_psnr_pt
180
+ space: pixel
181
+ crop_border: 2
182
+ test_y_channel: False
183
+ ]
184
+ ]
185
+ ]
186
+ x4:[
187
+ save_img: True
188
+ label: val_x4
189
+ val_sizes:[
190
+ lq: 256
191
+ gt: 1024
192
+ ]
193
+ metrics:[
194
+ l1_latent:[
195
+ type: L1Loss
196
+ space: latent
197
+ ]
198
+ l2_latent:[
199
+ type: MSELoss
200
+ space: latent
201
+ ]
202
+ pixel_psnr_pt:[
203
+ type: calculate_psnr_pt
204
+ space: pixel
205
+ crop_border: 2
206
+ test_y_channel: False
207
+ ]
208
+ ]
209
+ ]
210
+ ]
211
+ ]
212
+ logger:[
213
+ print_freq: 100
214
+ save_checkpoint_freq: 5000
215
+ use_tb_logger: True
216
+ wandb:[
217
+ project: Swin2SR-Latent-SR
218
+ entity: kazanplova-it-more
219
+ resume_id: None
220
+ max_val_images: 10
221
+ ]
222
+ ]
223
+ dist_params:[
224
+ backend: nccl
225
+ port: 29500
226
+ dist: True
227
+ ]
228
+ load_networks_only: False
229
+ exp_name: 32
230
+ name: 32_5
231
+ path:[
232
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_5
233
+ models: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_5/models
234
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_5/training_states
235
+ log: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_5
236
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/32_5/visualization
237
+ ]
238
+ dist: False
239
+ rank: 0
240
+ world_size: 1
241
+ auto_resume: False
242
+ is_train: True
243
+ root_path: /data/kazanplova/latent_vae_upscale_train
244
+
245
+ 2025-11-01 17:52:17,867 INFO: Use wandb logger with id=s3nh2uge; project=Swin2SR-Latent-SR.
246
+ 2025-11-01 17:52:30,929 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
247
+ 2025-11-01 17:52:30,930 INFO: Training statistics:
248
+ Number of train images: 4858507
249
+ Dataset enlarge ratio: 1
250
+ Batch size per gpu: 128
251
+ World size (gpu number): 1
252
+ Steps per epoch: 37958
253
+ Configured training steps: 125000
254
+ Approximate epochs to cover: 4.
255
+ 2025-11-01 17:52:30,935 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
256
+ 2025-11-01 17:52:30,935 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
257
+ 2025-11-01 17:52:31,580 INFO: Network [SwinIRMultiHead] is created.
258
+ 2025-11-01 17:52:31,804 INFO: Network: SwinIRMultiHead, with parameters: 54,917,584
259
+ 2025-11-01 17:52:31,804 INFO: SwinIRMultiHead(
260
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
261
+ (patch_embed): PatchEmbed(
262
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
263
+ )
264
+ (patch_unembed): PatchUnEmbed()
265
+ (pos_drop): Dropout(p=0.0, inplace=False)
266
+ (layers): ModuleList(
267
+ (0): RSTB(
268
+ (residual_group): BasicLayer(
269
+ dim=360, input_resolution=(32, 32), depth=6
270
+ (blocks): ModuleList(
271
+ (0): SwinTransformerBlock(
272
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
273
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
274
+ (attn): WindowAttention(
275
+ dim=360, window_size=(16, 16), num_heads=12
276
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
277
+ (attn_drop): Dropout(p=0.0, inplace=False)
278
+ (proj): Linear(in_features=360, out_features=360, bias=True)
279
+ (proj_drop): Dropout(p=0.0, inplace=False)
280
+ (softmax): Softmax(dim=-1)
281
+ )
282
+ (drop_path): Identity()
283
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ (mlp): Mlp(
285
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
286
+ (act): GELU(approximate='none')
287
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
288
+ (drop): Dropout(p=0.0, inplace=False)
289
+ )
290
+ )
291
+ (1): SwinTransformerBlock(
292
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
293
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
294
+ (attn): WindowAttention(
295
+ dim=360, window_size=(16, 16), num_heads=12
296
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
297
+ (attn_drop): Dropout(p=0.0, inplace=False)
298
+ (proj): Linear(in_features=360, out_features=360, bias=True)
299
+ (proj_drop): Dropout(p=0.0, inplace=False)
300
+ (softmax): Softmax(dim=-1)
301
+ )
302
+ (drop_path): DropPath()
303
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
304
+ (mlp): Mlp(
305
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
306
+ (act): GELU(approximate='none')
307
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
308
+ (drop): Dropout(p=0.0, inplace=False)
309
+ )
310
+ )
311
+ (2): SwinTransformerBlock(
312
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
313
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
314
+ (attn): WindowAttention(
315
+ dim=360, window_size=(16, 16), num_heads=12
316
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
317
+ (attn_drop): Dropout(p=0.0, inplace=False)
318
+ (proj): Linear(in_features=360, out_features=360, bias=True)
319
+ (proj_drop): Dropout(p=0.0, inplace=False)
320
+ (softmax): Softmax(dim=-1)
321
+ )
322
+ (drop_path): DropPath()
323
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
324
+ (mlp): Mlp(
325
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
326
+ (act): GELU(approximate='none')
327
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
328
+ (drop): Dropout(p=0.0, inplace=False)
329
+ )
330
+ )
331
+ (3): SwinTransformerBlock(
332
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
333
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
334
+ (attn): WindowAttention(
335
+ dim=360, window_size=(16, 16), num_heads=12
336
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
337
+ (attn_drop): Dropout(p=0.0, inplace=False)
338
+ (proj): Linear(in_features=360, out_features=360, bias=True)
339
+ (proj_drop): Dropout(p=0.0, inplace=False)
340
+ (softmax): Softmax(dim=-1)
341
+ )
342
+ (drop_path): DropPath()
343
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
344
+ (mlp): Mlp(
345
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
346
+ (act): GELU(approximate='none')
347
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
348
+ (drop): Dropout(p=0.0, inplace=False)
349
+ )
350
+ )
351
+ (4): SwinTransformerBlock(
352
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
353
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
354
+ (attn): WindowAttention(
355
+ dim=360, window_size=(16, 16), num_heads=12
356
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
357
+ (attn_drop): Dropout(p=0.0, inplace=False)
358
+ (proj): Linear(in_features=360, out_features=360, bias=True)
359
+ (proj_drop): Dropout(p=0.0, inplace=False)
360
+ (softmax): Softmax(dim=-1)
361
+ )
362
+ (drop_path): DropPath()
363
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
364
+ (mlp): Mlp(
365
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
366
+ (act): GELU(approximate='none')
367
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
368
+ (drop): Dropout(p=0.0, inplace=False)
369
+ )
370
+ )
371
+ (5): SwinTransformerBlock(
372
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
373
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
374
+ (attn): WindowAttention(
375
+ dim=360, window_size=(16, 16), num_heads=12
376
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
377
+ (attn_drop): Dropout(p=0.0, inplace=False)
378
+ (proj): Linear(in_features=360, out_features=360, bias=True)
379
+ (proj_drop): Dropout(p=0.0, inplace=False)
380
+ (softmax): Softmax(dim=-1)
381
+ )
382
+ (drop_path): DropPath()
383
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
384
+ (mlp): Mlp(
385
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
386
+ (act): GELU(approximate='none')
387
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
388
+ (drop): Dropout(p=0.0, inplace=False)
389
+ )
390
+ )
391
+ )
392
+ )
393
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
394
+ (patch_embed): PatchEmbed()
395
+ (patch_unembed): PatchUnEmbed()
396
+ )
397
+ (1-5): 5 x RSTB(
398
+ (residual_group): BasicLayer(
399
+ dim=360, input_resolution=(32, 32), depth=6
400
+ (blocks): ModuleList(
401
+ (0): SwinTransformerBlock(
402
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
403
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
404
+ (attn): WindowAttention(
405
+ dim=360, window_size=(16, 16), num_heads=12
406
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
407
+ (attn_drop): Dropout(p=0.0, inplace=False)
408
+ (proj): Linear(in_features=360, out_features=360, bias=True)
409
+ (proj_drop): Dropout(p=0.0, inplace=False)
410
+ (softmax): Softmax(dim=-1)
411
+ )
412
+ (drop_path): DropPath()
413
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
414
+ (mlp): Mlp(
415
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
416
+ (act): GELU(approximate='none')
417
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
418
+ (drop): Dropout(p=0.0, inplace=False)
419
+ )
420
+ )
421
+ (1): SwinTransformerBlock(
422
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
423
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
424
+ (attn): WindowAttention(
425
+ dim=360, window_size=(16, 16), num_heads=12
426
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
427
+ (attn_drop): Dropout(p=0.0, inplace=False)
428
+ (proj): Linear(in_features=360, out_features=360, bias=True)
429
+ (proj_drop): Dropout(p=0.0, inplace=False)
430
+ (softmax): Softmax(dim=-1)
431
+ )
432
+ (drop_path): DropPath()
433
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
434
+ (mlp): Mlp(
435
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
436
+ (act): GELU(approximate='none')
437
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
438
+ (drop): Dropout(p=0.0, inplace=False)
439
+ )
440
+ )
441
+ (2): SwinTransformerBlock(
442
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
443
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
444
+ (attn): WindowAttention(
445
+ dim=360, window_size=(16, 16), num_heads=12
446
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
447
+ (attn_drop): Dropout(p=0.0, inplace=False)
448
+ (proj): Linear(in_features=360, out_features=360, bias=True)
449
+ (proj_drop): Dropout(p=0.0, inplace=False)
450
+ (softmax): Softmax(dim=-1)
451
+ )
452
+ (drop_path): DropPath()
453
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
454
+ (mlp): Mlp(
455
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
456
+ (act): GELU(approximate='none')
457
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
458
+ (drop): Dropout(p=0.0, inplace=False)
459
+ )
460
+ )
461
+ (3): SwinTransformerBlock(
462
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
463
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
464
+ (attn): WindowAttention(
465
+ dim=360, window_size=(16, 16), num_heads=12
466
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
467
+ (attn_drop): Dropout(p=0.0, inplace=False)
468
+ (proj): Linear(in_features=360, out_features=360, bias=True)
469
+ (proj_drop): Dropout(p=0.0, inplace=False)
470
+ (softmax): Softmax(dim=-1)
471
+ )
472
+ (drop_path): DropPath()
473
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
474
+ (mlp): Mlp(
475
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
476
+ (act): GELU(approximate='none')
477
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
478
+ (drop): Dropout(p=0.0, inplace=False)
479
+ )
480
+ )
481
+ (4): SwinTransformerBlock(
482
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
483
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
484
+ (attn): WindowAttention(
485
+ dim=360, window_size=(16, 16), num_heads=12
486
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
487
+ (attn_drop): Dropout(p=0.0, inplace=False)
488
+ (proj): Linear(in_features=360, out_features=360, bias=True)
489
+ (proj_drop): Dropout(p=0.0, inplace=False)
490
+ (softmax): Softmax(dim=-1)
491
+ )
492
+ (drop_path): DropPath()
493
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
494
+ (mlp): Mlp(
495
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
496
+ (act): GELU(approximate='none')
497
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
498
+ (drop): Dropout(p=0.0, inplace=False)
499
+ )
500
+ )
501
+ (5): SwinTransformerBlock(
502
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
503
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
504
+ (attn): WindowAttention(
505
+ dim=360, window_size=(16, 16), num_heads=12
506
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
507
+ (attn_drop): Dropout(p=0.0, inplace=False)
508
+ (proj): Linear(in_features=360, out_features=360, bias=True)
509
+ (proj_drop): Dropout(p=0.0, inplace=False)
510
+ (softmax): Softmax(dim=-1)
511
+ )
512
+ (drop_path): DropPath()
513
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
514
+ (mlp): Mlp(
515
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
516
+ (act): GELU(approximate='none')
517
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
518
+ (drop): Dropout(p=0.0, inplace=False)
519
+ )
520
+ )
521
+ )
522
+ )
523
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
524
+ (patch_embed): PatchEmbed()
525
+ (patch_unembed): PatchUnEmbed()
526
+ )
527
+ )
528
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
529
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
530
+ (heads): ModuleDict(
531
+ (x2): _SwinIRPixelShuffleHead(
532
+ (conv_before): Sequential(
533
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
534
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
535
+ )
536
+ (upsample): Upsample(
537
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
538
+ (1): PixelShuffle(upscale_factor=2)
539
+ )
540
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
541
+ )
542
+ (x4): _SwinIRPixelShuffleHead(
543
+ (conv_before): Sequential(
544
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
546
+ )
547
+ (upsample): Upsample(
548
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
549
+ (1): PixelShuffle(upscale_factor=2)
550
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (3): PixelShuffle(upscale_factor=2)
552
+ )
553
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
554
+ )
555
+ )
556
+ )
557
+ 2025-11-01 17:52:31,806 INFO: Use EMA with decay: 0.999
558
+ 2025-11-01 17:52:32,504 INFO: Network [SwinIRMultiHead] is created.
559
+ 2025-11-01 17:52:32,577 INFO: Loss [L1Loss] is created.
560
+ 2025-11-01 17:52:32,577 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
561
+ 2025-11-01 17:52:32,578 INFO: Loss [L1Loss] is created.
562
+ 2025-11-01 17:52:32,579 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
563
+ 2025-11-01 17:52:32,579 INFO: Loss [FFTFrequencyLoss] is created.
564
+ 2025-11-01 17:52:32,580 INFO: Initialized fft_latent_x2_opt in latent space (w=0.1).
565
+ 2025-11-01 17:52:32,581 INFO: Loss [FFTFrequencyLoss] is created.
566
+ 2025-11-01 17:52:32,582 INFO: Initialized fft_latent_x4_opt in latent space (w=0.1).
567
+ 2025-11-01 17:52:32,584 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
568
+ 2025-11-01 17:52:32,584 INFO: Model [SwinIRLatentModelMultiHead] is created.
569
+ 2025-11-01 17:52:33,860 INFO: Start training from epoch: 0, step: 0
01_11_2025/32_6/basicsr_options.yaml ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Sat Nov 1 17:53:25 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025/basicsr_options.yaml
4
+
5
+ model_type: SwinIRLatentModelMultiHead
6
+ primary_head: x4
7
+ scale: 4
8
+ num_gpu: auto
9
+ manual_seed: 0
10
+ find_unused_parameters: false
11
+ vae_sources:
12
+ flux_vae:
13
+ hf_repo: wolfgangblack/flux_vae
14
+ vae_kind: kl
15
+ datasets:
16
+ train:
17
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
18
+ type: MultiScaleLatentCacheDataset
19
+ scales:
20
+ - 128
21
+ - 256
22
+ - 512
23
+ cache_dirs:
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
25
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
26
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
29
+ vae_names:
30
+ - flux_vae
31
+ phase: train
32
+ filename_tmpl: '{}'
33
+ io_backend:
34
+ type: disk
35
+ scale: 4
36
+ mean: null
37
+ std: null
38
+ num_worker_per_gpu: 16
39
+ batch_size_per_gpu: 64
40
+ pin_memory: true
41
+ persistent_workers: true
42
+ val:
43
+ name: sdxk_120_1024x1024
44
+ type: MultiScaleLatentCacheDataset
45
+ scales:
46
+ - 256
47
+ - 512
48
+ - 1024
49
+ cache_dirs:
50
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
51
+ vae_names:
52
+ - flux_vae
53
+ phase: val
54
+ io_backend:
55
+ type: disk
56
+ scale: 4
57
+ mean: null
58
+ std: null
59
+ batch_size_per_gpu: 16
60
+ num_worker_per_gpu: 4
61
+ pin_memory: true
62
+ network_g:
63
+ type: SwinIRMultiHead
64
+ in_chans: 16
65
+ img_size: 32
66
+ window_size: 16
67
+ img_range: 1.0
68
+ depths:
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ - 6
75
+ embed_dim: 360
76
+ num_heads:
77
+ - 12
78
+ - 12
79
+ - 12
80
+ - 12
81
+ - 12
82
+ - 12
83
+ mlp_ratio: 2
84
+ resi_connection: 1conv
85
+ primary_head: x4
86
+ head_num_feat: 256
87
+ heads:
88
+ - name: x2
89
+ scale: 2
90
+ out_chans: 16
91
+ - name: x4
92
+ scale: 4
93
+ out_chans: 16
94
+ primary: true
95
+ compile:
96
+ enabled: false
97
+ mode: max-autotune
98
+ dynamic: true
99
+ fullgraph: false
100
+ backend: null
101
+ train:
102
+ ema_decay: 0.999
103
+ head_inputs:
104
+ x2:
105
+ lq: 256
106
+ gt: 512
107
+ x4:
108
+ lq: 128
109
+ gt: 512
110
+ optim_g:
111
+ type: Adam
112
+ lr: 0.0002
113
+ weight_decay: 0
114
+ betas:
115
+ - 0.9
116
+ - 0.995
117
+ grad_clip:
118
+ enabled: true
119
+ generator:
120
+ type: norm
121
+ max_norm: 0.4
122
+ norm_type: 2.0
123
+ scheduler:
124
+ type: MultiStepLR
125
+ milestones:
126
+ - 62500
127
+ - 93750
128
+ - 112500
129
+ gamma: 0.5
130
+ total_steps: 125000
131
+ warmup_iter: -1
132
+ l1_latent_x2_opt:
133
+ type: L1Loss
134
+ loss_weight: 1.0
135
+ reduction: mean
136
+ space: latent
137
+ target: x2
138
+ l1_latent_x4_opt:
139
+ type: L1Loss
140
+ loss_weight: 1.0
141
+ reduction: mean
142
+ space: latent
143
+ target: x4
144
+ fft_latent_x2_opt:
145
+ type: FFTFrequencyLoss
146
+ loss_weight: 0.1
147
+ reduction: mean
148
+ space: latent
149
+ target: x2
150
+ norm: ortho
151
+ use_log_amplitude: false
152
+ alpha: 0.0
153
+ normalize_weight: true
154
+ eps: 1e-8
155
+ fft_latent_x4_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 0.1
158
+ reduction: mean
159
+ space: latent
160
+ target: x4
161
+ norm: ortho
162
+ use_log_amplitude: false
163
+ alpha: 0.0
164
+ normalize_weight: true
165
+ eps: 1e-8
166
+ val:
167
+ val_freq: 5000
168
+ save_img: true
169
+ head_evals:
170
+ x2:
171
+ save_img: true
172
+ label: val_x2
173
+ val_sizes:
174
+ lq: 512
175
+ gt: 1024
176
+ metrics:
177
+ l1_latent:
178
+ type: L1Loss
179
+ space: latent
180
+ pixel_psnr_pt:
181
+ type: calculate_psnr_pt
182
+ space: pixel
183
+ crop_border: 2
184
+ test_y_channel: false
185
+ x4:
186
+ save_img: true
187
+ label: val_x4
188
+ val_sizes:
189
+ lq: 256
190
+ gt: 1024
191
+ metrics:
192
+ l1_latent:
193
+ type: L1Loss
194
+ space: latent
195
+ l2_latent:
196
+ type: MSELoss
197
+ space: latent
198
+ pixel_psnr_pt:
199
+ type: calculate_psnr_pt
200
+ space: pixel
201
+ crop_border: 2
202
+ test_y_channel: false
203
+ logger:
204
+ print_freq: 100
205
+ save_checkpoint_freq: 5000
206
+ use_tb_logger: true
207
+ wandb:
208
+ project: Swin2SR-Latent-SR
209
+ entity: kazanplova-it-more
210
+ resume_id: null
211
+ max_val_images: 10
212
+ dist_params:
213
+ backend: nccl
214
+ port: 29500
215
+ dist: true
216
+ load_networks_only: false
217
+ exp_name: '32'
218
+ name: '32_6'
219
+ path:
220
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
01_11_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModelMultiHead
2
+ primary_head: x4
3
+ scale: 4
4
+ num_gpu: auto
5
+ manual_seed: 0
6
+ find_unused_parameters: false
7
+ vae_sources:
8
+ flux_vae:
9
+ hf_repo: wolfgangblack/flux_vae
10
+ vae_kind: kl
11
+ datasets:
12
+ train:
13
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
14
+ type: MultiScaleLatentCacheDataset
15
+ scales:
16
+ - 128
17
+ - 256
18
+ - 512
19
+ cache_dirs:
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
21
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
22
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
23
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
25
+ vae_names:
26
+ - flux_vae
27
+ phase: train
28
+ filename_tmpl: '{}'
29
+ io_backend:
30
+ type: disk
31
+ scale: 4
32
+ mean: null
33
+ std: null
34
+ num_worker_per_gpu: 32
35
+ batch_size_per_gpu: 64
36
+ pin_memory: true
37
+ persistent_workers: true
38
+ val:
39
+ name: sdxk_120_1024x1024
40
+ type: MultiScaleLatentCacheDataset
41
+ scales:
42
+ - 256
43
+ - 512
44
+ - 1024
45
+ cache_dirs:
46
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
47
+ vae_names:
48
+ - flux_vae
49
+ phase: val
50
+ io_backend:
51
+ type: disk
52
+ scale: 4
53
+ mean: null
54
+ std: null
55
+ batch_size_per_gpu: 16
56
+ num_worker_per_gpu: 4
57
+ pin_memory: true
58
+ network_g:
59
+ type: SwinIRMultiHead
60
+ in_chans: 16
61
+ img_size: 32
62
+ window_size: 16
63
+ img_range: 1.0
64
+ depths:
65
+ - 6
66
+ - 6
67
+ - 6
68
+ - 6
69
+ - 6
70
+ - 6
71
+ embed_dim: 360
72
+ num_heads:
73
+ - 12
74
+ - 12
75
+ - 12
76
+ - 12
77
+ - 12
78
+ - 12
79
+ mlp_ratio: 2
80
+ resi_connection: 1conv
81
+ primary_head: x4
82
+ head_num_feat: 256
83
+ heads:
84
+ - name: x2
85
+ scale: 2
86
+ out_chans: 16
87
+ - name: x4
88
+ scale: 4
89
+ out_chans: 16
90
+ primary: true
91
+ compile:
92
+ enabled: false
93
+ mode: max-autotune
94
+ dynamic: true
95
+ fullgraph: false
96
+ backend: null
97
+ train:
98
+ ema_decay: 0.999
99
+ head_inputs:
100
+ x2:
101
+ lq: 256
102
+ gt: 512
103
+ x4:
104
+ lq: 128
105
+ gt: 512
106
+ optim_g:
107
+ type: Adam
108
+ lr: 0.0002
109
+ weight_decay: 0
110
+ betas:
111
+ - 0.9
112
+ - 0.995
113
+ grad_clip:
114
+ enabled: true
115
+ generator:
116
+ type: norm
117
+ max_norm: 0.4
118
+ norm_type: 2.0
119
+ scheduler:
120
+ type: MultiStepLR
121
+ milestones:
122
+ - 62500
123
+ - 93750
124
+ - 112500
125
+ gamma: 0.5
126
+ total_steps: 125000
127
+ warmup_iter: -1
128
+ l1_latent_x2_opt:
129
+ type: L1Loss
130
+ loss_weight: 1.0
131
+ reduction: mean
132
+ space: latent
133
+ target: x2
134
+ l1_latent_x4_opt:
135
+ type: L1Loss
136
+ loss_weight: 1.0
137
+ reduction: mean
138
+ space: latent
139
+ target: x4
140
+ fft_latent_x2_opt:
141
+ type: FFTFrequencyLoss
142
+ loss_weight: 0.1
143
+ reduction: mean
144
+ space: latent
145
+ target: x2
146
+ norm: ortho
147
+ use_log_amplitude: false
148
+ alpha: 0.0
149
+ normalize_weight: true
150
+ eps: 1e-8
151
+ fft_latent_x4_opt:
152
+ type: FFTFrequencyLoss
153
+ loss_weight: 0.1
154
+ reduction: mean
155
+ space: latent
156
+ target: x4
157
+ norm: ortho
158
+ use_log_amplitude: false
159
+ alpha: 0.0
160
+ normalize_weight: true
161
+ eps: 1e-8
162
+ val:
163
+ val_freq: 2500
164
+ save_img: true
165
+ head_evals:
166
+ x2:
167
+ save_img: true
168
+ label: val_x2
169
+ val_sizes:
170
+ lq: 512
171
+ gt: 1024
172
+ metrics:
173
+ l1_latent:
174
+ type: L1Loss
175
+ space: latent
176
+ pixel_psnr_pt:
177
+ type: calculate_psnr_pt
178
+ space: pixel
179
+ crop_border: 2
180
+ test_y_channel: false
181
+ x4:
182
+ save_img: true
183
+ label: val_x4
184
+ val_sizes:
185
+ lq: 256
186
+ gt: 1024
187
+ metrics:
188
+ l1_latent:
189
+ type: L1Loss
190
+ space: latent
191
+ l2_latent:
192
+ type: MSELoss
193
+ space: latent
194
+ pixel_psnr_pt:
195
+ type: calculate_psnr_pt
196
+ space: pixel
197
+ crop_border: 2
198
+ test_y_channel: false
199
+ logger:
200
+ print_freq: 100
201
+ save_checkpoint_freq: 2500
202
+ use_tb_logger: true
203
+ wandb:
204
+ project: Swin2SR-Latent-SR
205
+ entity: kazanplova-it-more
206
+ resume_id: null
207
+ max_val_images: 10
208
+ dist_params:
209
+ backend: nccl
210
+ port: 29500
211
+ dist: true
212
+ load_networks_only: false
213
+ exp_name: '32'
214
+ name: '32'
215
+ path:
216
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/01_11_2025
02_11_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,248 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModelMultiHead
2
+ primary_head: x4
3
+ scale: 4
4
+ num_gpu: auto
5
+ manual_seed: 0
6
+ find_unused_parameters: false
7
+ vae_sources:
8
+ flux_vae:
9
+ hf_repo: wolfgangblack/flux_vae
10
+ vae_kind: kl
11
+ datasets:
12
+ train:
13
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
14
+ type: MultiScaleLatentCacheDataset
15
+ scales:
16
+ - 128
17
+ - 256
18
+ - 512
19
+ cache_dirs:
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
21
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
22
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
23
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
25
+ vae_names:
26
+ - flux_vae
27
+ phase: train
28
+ filename_tmpl: '{}'
29
+ io_backend:
30
+ type: disk
31
+ scale: 4
32
+ mean: null
33
+ std: null
34
+ num_worker_per_gpu: 4
35
+ batch_size_per_gpu: 8
36
+ pin_memory: true
37
+ persistent_workers: true
38
+ val:
39
+ name: sdxk_120_1024x1024
40
+ type: MultiScaleLatentCacheDataset
41
+ scales:
42
+ - 256
43
+ - 512
44
+ - 1024
45
+ cache_dirs:
46
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
47
+ vae_names:
48
+ - flux_vae
49
+ phase: val
50
+ io_backend:
51
+ type: disk
52
+ scale: 4
53
+ mean: null
54
+ std: null
55
+ batch_size_per_gpu: 16
56
+ num_worker_per_gpu: 4
57
+ pin_memory: true
58
+ network_g:
59
+ type: SwinIRMultiHead
60
+ in_chans: 16
61
+ img_size: 32
62
+ window_size: 16
63
+ img_range: 1.0
64
+ depths:
65
+ - 6
66
+ - 6
67
+ - 6
68
+ - 6
69
+ - 6
70
+ - 6
71
+ embed_dim: 360
72
+ num_heads:
73
+ - 12
74
+ - 12
75
+ - 12
76
+ - 12
77
+ - 12
78
+ - 12
79
+ mlp_ratio: 2
80
+ resi_connection: 1conv
81
+ primary_head: x4
82
+ head_num_feat: 256
83
+ heads:
84
+ - name: x2
85
+ scale: 2
86
+ out_chans: 16
87
+ - name: x4
88
+ scale: 4
89
+ out_chans: 16
90
+ primary: true
91
+ compile:
92
+ enabled: false
93
+ mode: max-autotune
94
+ dynamic: true
95
+ fullgraph: false
96
+ backend: null
97
+ train:
98
+ ema_decay: 0.999
99
+ head_inputs:
100
+ x2:
101
+ lq: 256
102
+ gt: 512
103
+ x4:
104
+ lq: 128
105
+ gt: 512
106
+ optim_g:
107
+ type: Adam
108
+ lr: 0.0002
109
+ weight_decay: 0
110
+ betas:
111
+ - 0.9
112
+ - 0.995
113
+ grad_clip:
114
+ enabled: true
115
+ generator:
116
+ type: norm
117
+ max_norm: 0.4
118
+ norm_type: 2.0
119
+ scheduler:
120
+ type: MultiStepLR
121
+ milestones:
122
+ - 62500
123
+ - 93750
124
+ - 112500
125
+ gamma: 0.5
126
+ total_steps: 125000
127
+ warmup_iter: -1
128
+ l1_latent_x2_opt:
129
+ type: L1Loss
130
+ loss_weight: 1.0
131
+ reduction: mean
132
+ space: latent
133
+ target: x2
134
+ fft_frequency_x2_opt:
135
+ type: FFTFrequencyLoss
136
+ loss_weight: 0.1
137
+ reduction: mean
138
+ space: latent
139
+ target: x2
140
+ norm: ortho
141
+ use_log_amplitude: false
142
+ alpha: 0.0
143
+ normalize_weight: true
144
+ eps: 1e-8
145
+ aux_downsample_x2_opt:
146
+ type: DownsampleConsistencyLoss
147
+ loss_weight: 0.1
148
+ reduction: mean
149
+ space: pixel
150
+ target: x2
151
+ down_factor: 2
152
+ mode: bicubic
153
+ hf_pixel_x2_opt:
154
+ type: HighFrequencyL1Loss
155
+ loss_weight: 0.05
156
+ reduction: mean
157
+ space: pixel
158
+ target: x2
159
+ kernel_size: 5
160
+ sigma: 1.0
161
+ l1_latent_x4_opt:
162
+ type: L1Loss
163
+ loss_weight: 1.0
164
+ reduction: mean
165
+ space: latent
166
+ target: x4
167
+ fft_frequency_x4_opt:
168
+ type: FFTFrequencyLoss
169
+ loss_weight: 0.1
170
+ reduction: mean
171
+ space: latent
172
+ target: x4
173
+ norm: ortho
174
+ use_log_amplitude: false
175
+ alpha: 0.0
176
+ normalize_weight: true
177
+ eps: 1e-8
178
+ aux_downsample_x4_opt:
179
+ type: DownsampleConsistencyLoss
180
+ loss_weight: 0.1
181
+ reduction: mean
182
+ space: pixel
183
+ target: x4
184
+ down_factor: 2
185
+ mode: bicubic
186
+ hf_pixel_x4_opt:
187
+ type: HighFrequencyL1Loss
188
+ loss_weight: 0.05
189
+ reduction: mean
190
+ space: pixel
191
+ target: x4
192
+ kernel_size: 5
193
+ sigma: 1.0
194
+ val:
195
+ val_freq: 2500
196
+ save_img: true
197
+ head_evals:
198
+ x2:
199
+ save_img: true
200
+ label: val_x2
201
+ val_sizes:
202
+ lq: 512
203
+ gt: 1024
204
+ metrics:
205
+ l1_latent:
206
+ type: L1Loss
207
+ space: latent
208
+ pixel_psnr_pt:
209
+ type: calculate_psnr_pt
210
+ space: pixel
211
+ crop_border: 2
212
+ test_y_channel: false
213
+ x4:
214
+ save_img: true
215
+ label: val_x4
216
+ val_sizes:
217
+ lq: 256
218
+ gt: 1024
219
+ metrics:
220
+ l1_latent:
221
+ type: L1Loss
222
+ space: latent
223
+ l2_latent:
224
+ type: MSELoss
225
+ space: latent
226
+ pixel_psnr_pt:
227
+ type: calculate_psnr_pt
228
+ space: pixel
229
+ crop_border: 2
230
+ test_y_channel: false
231
+ logger:
232
+ print_freq: 100
233
+ save_checkpoint_freq: 2500
234
+ use_tb_logger: true
235
+ wandb:
236
+ project: Swin2SR-Latent-SR
237
+ entity: kazanplova-it-more
238
+ resume_id: null
239
+ max_val_images: 10
240
+ dist_params:
241
+ backend: nccl
242
+ port: 29500
243
+ dist: true
244
+ load_networks_only: false
245
+ exp_name: '34'
246
+ name: '34'
247
+ path:
248
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/02_11_2025
26_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModel
2
+ scale: 2
3
+ num_gpu: auto
4
+ manual_seed: 0
5
+ vae_sources:
6
+ flux_vae:
7
+ hf_repo: wolfgangblack/flux_vae
8
+ vae_kind: kl
9
+ datasets:
10
+ train:
11
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
12
+ type: LatentCacheDataset
13
+ high_res: 512
14
+ low_res: 256
15
+ cache_dirs:
16
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
17
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
18
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
19
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
21
+ vae_names:
22
+ - flux_vae
23
+ phase: train
24
+ filename_tmpl: '{}'
25
+ io_backend:
26
+ type: disk
27
+ scale: 2
28
+ mean: null
29
+ std: null
30
+ num_worker_per_gpu: 4
31
+ batch_size_per_gpu: 10
32
+ pin_memory: true
33
+ persistent_workers: true
34
+ val:
35
+ name: sdxk_120_1024x1024
36
+ type: LatentCacheDataset
37
+ high_res: 1024
38
+ low_res: 512
39
+ cache_dirs:
40
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
41
+ vae_names:
42
+ - flux_vae
43
+ phase: val
44
+ io_backend:
45
+ type: disk
46
+ scale: 2
47
+ mean: null
48
+ std: null
49
+ batch_size_per_gpu: 16
50
+ num_worker_per_gpu: 4
51
+ pin_memory: true
52
+ network_g:
53
+ type: Swin2SR
54
+ upscale: 2
55
+ in_chans: 16
56
+ img_size: 32
57
+ window_size: 8
58
+ img_range: 1.0
59
+ depths:
60
+ - 6
61
+ - 6
62
+ - 6
63
+ - 6
64
+ - 6
65
+ - 6
66
+ embed_dim: 180
67
+ num_heads:
68
+ - 6
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ mlp_ratio: 2
75
+ upsampler: pixelshuffle
76
+ resi_connection: 1conv
77
+ network_d:
78
+ type: UNetDiscriminatorSN
79
+ num_in_ch: 3
80
+ num_feat: 64
81
+ skip_connection: true
82
+ path:
83
+ pretrain_network_g: ./pretrained_weights/21_10_2025/swin2sr-x2_flux_vae_im256-512_1l1+0.1fft+0.1downsampleconsistency+0.05highfrequencyl1_b40x1_2025_10_20_2/models/net_g_35000.pth
84
+ strict_load_g: true
85
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/26_10_2025
86
+ compile:
87
+ enabled: false
88
+ mode: max-autotune
89
+ dynamic: true
90
+ fullgraph: false
91
+ backend: null
92
+ train:
93
+ ema_decay: 0.999
94
+ optim_g:
95
+ type: Adam
96
+ lr: 0.0002
97
+ weight_decay: 0
98
+ betas:
99
+ - 0.9
100
+ - 0.99
101
+ scheduler:
102
+ type: MultiStepLR
103
+ milestones:
104
+ - 62500
105
+ - 93750
106
+ - 112500
107
+ gamma: 0.5
108
+ total_steps: 125000
109
+ warmup_iter: -1
110
+ eagle_pixel_opt:
111
+ type: Eagle_Loss
112
+ loss_weight: 0.0001
113
+ reduction: mean
114
+ space: pixel
115
+ patch_size: 3
116
+ cutoff: 0.5
117
+ l1_pixel_opt:
118
+ type: L1Loss
119
+ loss_weight: 1.0
120
+ reduction: mean
121
+ space: pixel
122
+ fft_frequency_opt:
123
+ type: FFTFrequencyLoss
124
+ loss_weight: 0.05
125
+ reduction: mean
126
+ space: pixel
127
+ norm: ortho
128
+ use_log_amplitude: false
129
+ alpha: 0.0
130
+ normalize_weight: true
131
+ eps: 1e-8
132
+ gan_opt:
133
+ type: GANLoss
134
+ gan_type: hinge
135
+ loss_weight: 0.1
136
+ optim_d:
137
+ type: Adam
138
+ lr: 0.0003
139
+ weight_decay: 0
140
+ betas:
141
+ - 0.9
142
+ - 0.99
143
+ net_d_iters: 2
144
+ net_d_init_iters: 0
145
+ val:
146
+ val_freq: 5000
147
+ save_img: true
148
+ metrics:
149
+ l1_latent:
150
+ type: L1Loss
151
+ space: latent
152
+ l2_latent:
153
+ type: MSELoss
154
+ space: latent
155
+ pixel_psnr_pt:
156
+ type: calculate_psnr_pt
157
+ space: pixel
158
+ crop_border: 2
159
+ test_y_channel: false
160
+ logger:
161
+ print_freq: 100
162
+ save_checkpoint_freq: 5000
163
+ use_tb_logger: true
164
+ wandb:
165
+ project: Swin2SR-Latent-SR
166
+ entity: kazanplova-it-more
167
+ resume_id: null
168
+ max_val_images: 10
169
+ dist_params:
170
+ backend: nccl
171
+ port: 29500
172
+ dist: true
173
+ load_networks_only: false
174
+ exp_name: '22'
175
+ name: '22'
27_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModel
2
+ scale: 2
3
+ num_gpu: auto
4
+ manual_seed: 0
5
+ vae_sources:
6
+ flux_vae:
7
+ hf_repo: wolfgangblack/flux_vae
8
+ vae_kind: kl
9
+ datasets:
10
+ train:
11
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
12
+ type: LatentCacheDataset
13
+ high_res: 512
14
+ low_res: 256
15
+ cache_dirs:
16
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
17
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
18
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
19
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
21
+ vae_names:
22
+ - flux_vae
23
+ phase: train
24
+ filename_tmpl: '{}'
25
+ io_backend:
26
+ type: disk
27
+ scale: 2
28
+ mean: null
29
+ std: null
30
+ num_worker_per_gpu: 4
31
+ batch_size_per_gpu: 10
32
+ pin_memory: true
33
+ persistent_workers: true
34
+ val:
35
+ name: sdxk_120_1024x1024
36
+ type: LatentCacheDataset
37
+ high_res: 1024
38
+ low_res: 512
39
+ cache_dirs:
40
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
41
+ vae_names:
42
+ - flux_vae
43
+ phase: val
44
+ io_backend:
45
+ type: disk
46
+ scale: 2
47
+ mean: null
48
+ std: null
49
+ batch_size_per_gpu: 16
50
+ num_worker_per_gpu: 4
51
+ pin_memory: true
52
+ network_g:
53
+ type: Swin2SR
54
+ upscale: 2
55
+ in_chans: 16
56
+ img_size: 32
57
+ window_size: 8
58
+ img_range: 1.0
59
+ depths:
60
+ - 6
61
+ - 6
62
+ - 6
63
+ - 6
64
+ - 6
65
+ - 6
66
+ embed_dim: 180
67
+ num_heads:
68
+ - 6
69
+ - 6
70
+ - 6
71
+ - 6
72
+ - 6
73
+ - 6
74
+ mlp_ratio: 2
75
+ upsampler: pixelshuffle
76
+ resi_connection: 1conv
77
+ path:
78
+ pretrain_network_g: ./pretrained_weights/21_10_2025/swin2sr-x2_flux_vae_im256-512_1l1+0.1fft+0.1downsampleconsistency+0.05highfrequencyl1_b40x1_2025_10_20_2/models/net_g_35000.pth
79
+ strict_load_g: true
80
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/27_10_2025
81
+ compile:
82
+ enabled: false
83
+ mode: max-autotune
84
+ dynamic: true
85
+ fullgraph: false
86
+ backend: null
87
+ train:
88
+ ema_decay: 0.999
89
+ optim_g:
90
+ type: Adam
91
+ lr: 0.0002
92
+ weight_decay: 0
93
+ betas:
94
+ - 0.9
95
+ - 0.99
96
+ scheduler:
97
+ type: MultiStepLR
98
+ milestones:
99
+ - 62500
100
+ - 93750
101
+ - 112500
102
+ gamma: 0.5
103
+ total_steps: 125000
104
+ warmup_iter: -1
105
+ eagle_pixel_opt:
106
+ type: Eagle_Loss
107
+ loss_weight: 5.0e-05
108
+ reduction: mean
109
+ space: pixel
110
+ patch_size: 3
111
+ cutoff: 0.5
112
+ l1_pixel_opt:
113
+ type: L1Loss
114
+ loss_weight: 5.0
115
+ reduction: mean
116
+ space: pixel
117
+ fft_frequency_opt:
118
+ type: FFTFrequencyLoss
119
+ loss_weight: 1.0
120
+ reduction: mean
121
+ space: pixel
122
+ norm: ortho
123
+ use_log_amplitude: false
124
+ alpha: 0.0
125
+ normalize_weight: true
126
+ eps: 1e-8
127
+ val:
128
+ val_freq: 5000
129
+ save_img: true
130
+ metrics:
131
+ l1_latent:
132
+ type: L1Loss
133
+ space: latent
134
+ l2_latent:
135
+ type: MSELoss
136
+ space: latent
137
+ pixel_psnr_pt:
138
+ type: calculate_psnr_pt
139
+ space: pixel
140
+ crop_border: 2
141
+ test_y_channel: false
142
+ logger:
143
+ print_freq: 100
144
+ save_checkpoint_freq: 5000
145
+ use_tb_logger: true
146
+ wandb:
147
+ project: Swin2SR-Latent-SR
148
+ entity: kazanplova-it-more
149
+ resume_id: null
150
+ max_val_images: 10
151
+ dist_params:
152
+ backend: nccl
153
+ port: 29500
154
+ dist: true
155
+ load_networks_only: false
156
+ exp_name: 25,yaml
157
+ name: 25_yaml
28_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModel
2
+ scale: 4
3
+ num_gpu: auto
4
+ manual_seed: 0
5
+ find_unused_parameters: false
6
+ vae_sources:
7
+ flux_vae:
8
+ hf_repo: wolfgangblack/flux_vae
9
+ vae_kind: kl
10
+ datasets:
11
+ train:
12
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
13
+ type: LatentCacheDataset
14
+ high_res: 512
15
+ low_res: 128
16
+ cache_dirs:
17
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
18
+ vae_names:
19
+ - flux_vae
20
+ phase: train
21
+ filename_tmpl: '{}'
22
+ io_backend:
23
+ type: disk
24
+ scale: 4
25
+ mean: null
26
+ std: null
27
+ num_worker_per_gpu: 4
28
+ batch_size_per_gpu: 8
29
+ pin_memory: true
30
+ persistent_workers: true
31
+ val:
32
+ name: sdxk_120_1024x1024
33
+ type: LatentCacheDataset
34
+ high_res: 1024
35
+ low_res: 256
36
+ cache_dirs:
37
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
38
+ vae_names:
39
+ - flux_vae
40
+ phase: val
41
+ io_backend:
42
+ type: disk
43
+ scale: 4
44
+ mean: null
45
+ std: null
46
+ batch_size_per_gpu: 16
47
+ num_worker_per_gpu: 4
48
+ pin_memory: true
49
+ network_g:
50
+ type: Swin2SR
51
+ upscale: 4
52
+ in_chans: 16
53
+ img_size: 16
54
+ window_size: 8
55
+ img_range: 1.0
56
+ depths:
57
+ - 6
58
+ - 6
59
+ - 6
60
+ - 6
61
+ - 6
62
+ - 6
63
+ embed_dim: 180
64
+ num_heads:
65
+ - 6
66
+ - 6
67
+ - 6
68
+ - 6
69
+ - 6
70
+ - 6
71
+ mlp_ratio: 2
72
+ upsampler: pixelshuffle
73
+ resi_connection: 1conv
74
+ path:
75
+ pretrain_network_g: ./pretrained_weights/21_10_2025/swin2sr-x4_flux_vae_im128-512_0.1fft+1l1_b512x4_2025_10_20/models/net_g_latest.pth
76
+ strict_load_g: true
77
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/28_10_2025
78
+ compile:
79
+ enabled: false
80
+ mode: max-autotune
81
+ dynamic: true
82
+ fullgraph: false
83
+ backend: null
84
+ train:
85
+ ema_decay: 0.999
86
+ optim_g:
87
+ type: Adam
88
+ lr: 0.0002
89
+ weight_decay: 0
90
+ betas:
91
+ - 0.9
92
+ - 0.99
93
+ grad_clip:
94
+ generator:
95
+ type: norm
96
+ max_norm: 1.0
97
+ norm_type: 2.0
98
+ scheduler:
99
+ type: MultiStepLR
100
+ milestones:
101
+ - 75000
102
+ - 90000
103
+ - 110000
104
+ gamma: 0.5
105
+ total_steps: 125000
106
+ warmup_iter: -1
107
+ l1_pixel_opt:
108
+ type: L1Loss
109
+ loss_weight: 1.0
110
+ reduction: mean
111
+ space: pixel
112
+ val:
113
+ val_freq: 5000
114
+ save_img: true
115
+ metrics:
116
+ l1_latent:
117
+ type: L1Loss
118
+ space: latent
119
+ l2_latent:
120
+ type: MSELoss
121
+ space: latent
122
+ pixel_psnr_pt:
123
+ type: calculate_psnr_pt
124
+ space: pixel
125
+ crop_border: 2
126
+ test_y_channel: false
127
+ logger:
128
+ print_freq: 100
129
+ save_checkpoint_freq: 5000
130
+ use_tb_logger: true
131
+ wandb:
132
+ project: Swin2SR-Latent-SR
133
+ entity: kazanplova-it-more
134
+ resume_id: null
135
+ max_val_images: 10
136
+ dist_params:
137
+ backend: nccl
138
+ port: 29500
139
+ dist: true
140
+ load_networks_only: false
141
+ exp_name: '27'
142
+ name: '27'
29_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModel
2
+ scale: 4
3
+ num_gpu: auto
4
+ manual_seed: 0
5
+ find_unused_parameters: false
6
+ vae_sources:
7
+ flux_vae:
8
+ hf_repo: wolfgangblack/flux_vae
9
+ vae_kind: kl
10
+ datasets:
11
+ train:
12
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
13
+ type: LatentCacheDataset
14
+ high_res: 512
15
+ low_res: 128
16
+ cache_dirs:
17
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
18
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
19
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
21
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
22
+ vae_names:
23
+ - flux_vae
24
+ phase: train
25
+ filename_tmpl: '{}'
26
+ io_backend:
27
+ type: disk
28
+ scale: 4
29
+ mean: null
30
+ std: null
31
+ num_worker_per_gpu: 32
32
+ batch_size_per_gpu: 128
33
+ pin_memory: true
34
+ persistent_workers: true
35
+ val:
36
+ name: sdxk_120_1024x1024
37
+ type: LatentCacheDataset
38
+ high_res: 1024
39
+ low_res: 256
40
+ cache_dirs:
41
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
42
+ vae_names:
43
+ - flux_vae
44
+ phase: val
45
+ io_backend:
46
+ type: disk
47
+ scale: 4
48
+ mean: null
49
+ std: null
50
+ batch_size_per_gpu: 16
51
+ num_worker_per_gpu: 4
52
+ pin_memory: true
53
+ network_g:
54
+ type: Swin2SR
55
+ upscale: 4
56
+ in_chans: 16
57
+ img_size: 16
58
+ window_size: 16
59
+ img_range: 1.0
60
+ depths:
61
+ - 6
62
+ - 6
63
+ - 6
64
+ - 6
65
+ - 6
66
+ - 6
67
+ embed_dim: 360
68
+ num_heads:
69
+ - 12
70
+ - 12
71
+ - 12
72
+ - 12
73
+ - 12
74
+ - 12
75
+ mlp_ratio: 2
76
+ upsampler: pixelshuffle
77
+ resi_connection: 1conv
78
+ compile:
79
+ enabled: false
80
+ mode: max-autotune
81
+ dynamic: true
82
+ fullgraph: false
83
+ backend: null
84
+ train:
85
+ ema_decay: 0.999
86
+ optim_g:
87
+ type: Adam
88
+ lr: 0.0002
89
+ weight_decay: 0
90
+ betas:
91
+ - 0.9
92
+ - 0.99
93
+ scheduler:
94
+ type: MultiStepLR
95
+ milestones:
96
+ - 62500
97
+ - 93750
98
+ - 112500
99
+ gamma: 0.5
100
+ total_steps: 125000
101
+ warmup_iter: -1
102
+ l1_latent_opt:
103
+ type: L1Loss
104
+ loss_weight: 1.0
105
+ reduction: mean
106
+ space: latent
107
+ fft_latent_opt:
108
+ type: FFTFrequencyLoss
109
+ loss_weight: 0.05
110
+ reduction: mean
111
+ space: latent
112
+ norm: ortho
113
+ use_log_amplitude: false
114
+ alpha: 0.0
115
+ normalize_weight: true
116
+ grad_clip:
117
+ generator:
118
+ type: norm
119
+ max_norm: 1.0
120
+ norm_type: 2.0
121
+ val:
122
+ val_freq: 5000
123
+ save_img: true
124
+ metrics:
125
+ l1_latent:
126
+ type: L1Loss
127
+ space: latent
128
+ l2_latent:
129
+ type: MSELoss
130
+ space: latent
131
+ pixel_psnr_pt:
132
+ type: calculate_psnr_pt
133
+ space: pixel
134
+ crop_border: 2
135
+ test_y_channel: false
136
+ logger:
137
+ print_freq: 100
138
+ save_checkpoint_freq: 5000
139
+ use_tb_logger: true
140
+ wandb:
141
+ project: Swin2SR-Latent-SR
142
+ entity: kazanplova-it-more
143
+ resume_id: null
144
+ max_val_images: 10
145
+ dist_params:
146
+ backend: nccl
147
+ port: 29500
148
+ dist: true
149
+ load_networks_only: false
150
+ exp_name: '28'
151
+ name: '28'
152
+ path:
153
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/29_10_2025
30_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,222 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModelMultiHead
2
+ primary_head: x4
3
+ scale: 4
4
+ num_gpu: auto
5
+ manual_seed: 0
6
+ find_unused_parameters: false
7
+ vae_sources:
8
+ flux_vae:
9
+ hf_repo: wolfgangblack/flux_vae
10
+ vae_kind: kl
11
+ datasets:
12
+ train:
13
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
14
+ type: MultiScaleLatentCacheDataset
15
+ scales:
16
+ - 128
17
+ - 256
18
+ - 512
19
+ cache_dirs:
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
21
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
22
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
23
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
25
+ vae_names:
26
+ - flux_vae
27
+ phase: train
28
+ filename_tmpl: '{}'
29
+ io_backend:
30
+ type: disk
31
+ scale: 4
32
+ mean: null
33
+ std: null
34
+ num_worker_per_gpu: 32
35
+ batch_size_per_gpu: 256
36
+ pin_memory: true
37
+ persistent_workers: true
38
+ val:
39
+ name: sdxk_120_1024x1024
40
+ type: MultiScaleLatentCacheDataset
41
+ scales:
42
+ - 256
43
+ - 512
44
+ - 1024
45
+ cache_dirs:
46
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
47
+ vae_names:
48
+ - flux_vae
49
+ phase: val
50
+ io_backend:
51
+ type: disk
52
+ scale: 4
53
+ mean: null
54
+ std: null
55
+ batch_size_per_gpu: 16
56
+ num_worker_per_gpu: 4
57
+ pin_memory: true
58
+ network_g:
59
+ type: SwinIRMultiHead
60
+ in_chans: 16
61
+ img_size: 16
62
+ window_size: 16
63
+ img_range: 1.0
64
+ depths:
65
+ - 6
66
+ - 6
67
+ - 6
68
+ - 6
69
+ - 6
70
+ - 6
71
+ embed_dim: 360
72
+ num_heads:
73
+ - 12
74
+ - 12
75
+ - 12
76
+ - 12
77
+ - 12
78
+ - 12
79
+ mlp_ratio: 2
80
+ resi_connection: 1conv
81
+ primary_head: x4
82
+ head_num_feat: 256
83
+ heads:
84
+ - name: x2
85
+ scale: 2
86
+ out_chans: 16
87
+ - name: x4
88
+ scale: 4
89
+ out_chans: 16
90
+ primary: true
91
+ compile:
92
+ enabled: false
93
+ mode: max-autotune
94
+ dynamic: true
95
+ fullgraph: false
96
+ backend: null
97
+ train:
98
+ ema_decay: 0.999
99
+ optim_g:
100
+ type: Adam
101
+ lr: 0.00015
102
+ weight_decay: 0
103
+ betas:
104
+ - 0.9
105
+ - 0.995
106
+ grad_clip:
107
+ enabled: true
108
+ generator:
109
+ type: norm
110
+ max_norm: 0.4
111
+ norm_type: 2.0
112
+ scheduler:
113
+ type: MultiStepLR
114
+ milestones:
115
+ - 75000
116
+ - 90000
117
+ - 110000
118
+ gamma: 0.5
119
+ total_steps: 125000
120
+ warmup_iter: -1
121
+ l1_latent_x2_opt:
122
+ type: L1Loss
123
+ loss_weight: 0.5
124
+ reduction: mean
125
+ space: latent
126
+ target: x2
127
+ l1_latent_x4_opt:
128
+ type: L1Loss
129
+ loss_weight: 0.5
130
+ reduction: mean
131
+ space: latent
132
+ target: x4
133
+ adversarial:
134
+ latent_x2:
135
+ space: latent
136
+ target: x2
137
+ network:
138
+ type: UNetDiscriminatorSN
139
+ num_in_ch: 16
140
+ num_feat: 64
141
+ skip_connection: true
142
+ loss:
143
+ type: GANLoss
144
+ gan_type: hinge
145
+ loss_weight: 0.01
146
+ optim:
147
+ type: Adam
148
+ lr: 0.0003
149
+ weight_decay: 0
150
+ betas:
151
+ - 0.9
152
+ - 0.99
153
+ latent_x4:
154
+ space: latent
155
+ target: x4
156
+ network:
157
+ type: UNetDiscriminatorSN
158
+ num_in_ch: 16
159
+ num_feat: 64
160
+ skip_connection: true
161
+ loss:
162
+ type: GANLoss
163
+ gan_type: hinge
164
+ loss_weight: 0.01
165
+ optim:
166
+ type: Adam
167
+ lr: 0.0003
168
+ weight_decay: 0
169
+ betas:
170
+ - 0.9
171
+ - 0.99
172
+ net_d_iters: 1
173
+ net_d_init_iters: 0
174
+ val:
175
+ val_freq: 5000
176
+ save_img: true
177
+ head_evals:
178
+ x2:
179
+ save_img: true
180
+ label: val_x2
181
+ metrics:
182
+ l1_latent:
183
+ type: L1Loss
184
+ space: latent
185
+ pixel_psnr_pt:
186
+ type: calculate_psnr_pt
187
+ space: pixel
188
+ crop_border: 2
189
+ test_y_channel: false
190
+ x4:
191
+ save_img: true
192
+ label: val_x4
193
+ metrics:
194
+ l1_latent:
195
+ type: L1Loss
196
+ space: latent
197
+ l2_latent:
198
+ type: MSELoss
199
+ space: latent
200
+ pixel_psnr_pt:
201
+ type: calculate_psnr_pt
202
+ space: pixel
203
+ crop_border: 2
204
+ test_y_channel: false
205
+ logger:
206
+ print_freq: 100
207
+ save_checkpoint_freq: 5000
208
+ use_tb_logger: true
209
+ wandb:
210
+ project: Swin2SR-Latent-SR
211
+ entity: kazanplova-it-more
212
+ resume_id: null
213
+ max_val_images: 10
214
+ dist_params:
215
+ backend: nccl
216
+ port: 29500
217
+ dist: true
218
+ load_networks_only: false
219
+ exp_name: '28'
220
+ name: '28'
221
+ path:
222
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/30_10_2025
31_10_2025/basicsr_options.yaml ADDED
@@ -0,0 +1,224 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_type: SwinIRLatentModelMultiHead
2
+ primary_head: x4
3
+ scale: 4
4
+ num_gpu: auto
5
+ manual_seed: 0
6
+ find_unused_parameters: false
7
+ vae_sources:
8
+ flux_vae:
9
+ hf_repo: wolfgangblack/flux_vae
10
+ vae_kind: kl
11
+ datasets:
12
+ train:
13
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
14
+ type: MultiScaleLatentCacheDataset
15
+ scales:
16
+ - 128
17
+ - 256
18
+ - 512
19
+ cache_dirs:
20
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
21
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
22
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
23
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
24
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
25
+ vae_names:
26
+ - flux_vae
27
+ phase: train
28
+ filename_tmpl: '{}'
29
+ io_backend:
30
+ type: disk
31
+ scale: 4
32
+ mean: null
33
+ std: null
34
+ num_worker_per_gpu: 3
35
+ batch_size_per_gpu: 8
36
+ pin_memory: true
37
+ persistent_workers: true
38
+ val:
39
+ name: sdxk_120_1024x1024
40
+ type: MultiScaleLatentCacheDataset
41
+ scales:
42
+ - 256
43
+ - 512
44
+ - 1024
45
+ cache_dirs:
46
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
47
+ vae_names:
48
+ - flux_vae
49
+ phase: val
50
+ io_backend:
51
+ type: disk
52
+ scale: 4
53
+ mean: null
54
+ std: null
55
+ batch_size_per_gpu: 16
56
+ num_worker_per_gpu: 4
57
+ pin_memory: true
58
+ network_g:
59
+ type: SwinIRMultiHead
60
+ in_chans: 16
61
+ img_size: 16
62
+ window_size: 16
63
+ img_range: 1.0
64
+ depths:
65
+ - 6
66
+ - 6
67
+ - 6
68
+ - 6
69
+ - 6
70
+ - 6
71
+ embed_dim: 360
72
+ num_heads:
73
+ - 12
74
+ - 12
75
+ - 12
76
+ - 12
77
+ - 12
78
+ - 12
79
+ mlp_ratio: 2
80
+ resi_connection: 1conv
81
+ primary_head: x4
82
+ head_num_feat: 256
83
+ heads:
84
+ - name: x2
85
+ scale: 2
86
+ out_chans: 16
87
+ - name: x4
88
+ scale: 4
89
+ out_chans: 16
90
+ primary: true
91
+ path:
92
+ pretrain_network_g: runs/31_10_2025/28/models/net_g_12500.pth
93
+ strict_load_g: true
94
+ pretrain_network_d_latent_x2: runs/31_10_2025/28/models/net_d_12500.pth
95
+ pretrain_network_d_latent_x4: runs/31_10_2025/28/models/net_d_latent_x4_12500.pth
96
+ strict_load_d: true
97
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/31_10_2025
98
+ compile:
99
+ enabled: false
100
+ mode: max-autotune
101
+ dynamic: true
102
+ fullgraph: false
103
+ backend: null
104
+ train:
105
+ ema_decay: 0.999
106
+ optim_g:
107
+ type: Adam
108
+ lr: 0.0002
109
+ weight_decay: 0
110
+ betas:
111
+ - 0.9
112
+ - 0.995
113
+ grad_clip:
114
+ enabled: true
115
+ generator:
116
+ type: norm
117
+ max_norm: 0.4
118
+ norm_type: 2.0
119
+ scheduler:
120
+ type: MultiStepLR
121
+ milestones:
122
+ - 62500
123
+ - 93750
124
+ - 112500
125
+ gamma: 0.5
126
+ total_steps: 125000
127
+ warmup_iter: -1
128
+ eagle_pixel_x2_opt:
129
+ type: Eagle_Loss
130
+ loss_weight: 5.0e-05
131
+ reduction: mean
132
+ space: pixel
133
+ target: x2
134
+ patch_size: 3
135
+ cutoff: 0.5
136
+ l1_pixel_x2_opt:
137
+ type: L1Loss
138
+ loss_weight: 1.0
139
+ reduction: mean
140
+ space: pixel
141
+ target: x2
142
+ fft_pixel_x2_opt:
143
+ type: FFTFrequencyLoss
144
+ loss_weight: 0.1
145
+ reduction: mean
146
+ space: pixel
147
+ target: x2
148
+ norm: ortho
149
+ use_log_amplitude: false
150
+ alpha: 0.0
151
+ normalize_weight: true
152
+ eps: 1e-8
153
+ eagle_pixel_x4_opt:
154
+ type: Eagle_Loss
155
+ loss_weight: 5.0e-05
156
+ reduction: mean
157
+ space: pixel
158
+ target: x4
159
+ patch_size: 3
160
+ cutoff: 0.5
161
+ l1_pixel_x4_opt:
162
+ type: L1Loss
163
+ loss_weight: 1.0
164
+ reduction: mean
165
+ space: pixel
166
+ target: x4
167
+ fft_pixel_x4_opt:
168
+ type: FFTFrequencyLoss
169
+ loss_weight: 0.1
170
+ reduction: mean
171
+ space: pixel
172
+ target: x4
173
+ norm: ortho
174
+ use_log_amplitude: false
175
+ alpha: 0.0
176
+ normalize_weight: true
177
+ eps: 1e-8
178
+ val:
179
+ val_freq: 5000
180
+ save_img: true
181
+ head_evals:
182
+ x2:
183
+ save_img: true
184
+ label: val_x2
185
+ metrics:
186
+ l1_latent:
187
+ type: L1Loss
188
+ space: latent
189
+ pixel_psnr_pt:
190
+ type: calculate_psnr_pt
191
+ space: pixel
192
+ crop_border: 2
193
+ test_y_channel: false
194
+ x4:
195
+ save_img: true
196
+ label: val_x4
197
+ metrics:
198
+ l1_latent:
199
+ type: L1Loss
200
+ space: latent
201
+ l2_latent:
202
+ type: MSELoss
203
+ space: latent
204
+ pixel_psnr_pt:
205
+ type: calculate_psnr_pt
206
+ space: pixel
207
+ crop_border: 2
208
+ test_y_channel: false
209
+ logger:
210
+ print_freq: 100
211
+ save_checkpoint_freq: 2500
212
+ use_tb_logger: true
213
+ wandb:
214
+ project: Swin2SR-Latent-SR
215
+ entity: kazanplova-it-more
216
+ resume_id: null
217
+ max_val_images: 10
218
+ dist_params:
219
+ backend: nccl
220
+ port: 29500
221
+ dist: true
222
+ load_networks_only: false
223
+ exp_name: '29'
224
+ name: '29'