vaskers5 commited on
Commit
975c4f8
·
verified ·
1 Parent(s): 66f5312

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. 04_11_2025/38/basicsr_options.yaml +238 -0
  2. 04_11_2025/38/train_38_20251104_140039.log +577 -0
  3. 04_11_2025/38_archived_20251104_065727/basicsr_options.yaml +238 -0
  4. 04_11_2025/38_archived_20251104_065727/train_38_20251104_065138.log +598 -0
  5. 04_11_2025/38_archived_20251104_140039/basicsr_options.yaml +238 -0
  6. 04_11_2025/38_archived_20251104_140039/train_38_20251104_065727.log +0 -0
  7. 04_11_2025/38_continue/basicsr_options.yaml +245 -0
  8. 04_11_2025/38_continue/train_38_continue_20251104_164819.log +615 -0
  9. 04_11_2025/38_continue_archived_20251104_150011/basicsr_options.yaml +239 -0
  10. 04_11_2025/38_continue_archived_20251104_150011/train_38_continue_20251104_140856.log +621 -0
  11. 04_11_2025/38_continue_archived_20251104_152426/basicsr_options.yaml +239 -0
  12. 04_11_2025/38_continue_archived_20251104_152426/train_38_continue_20251104_150011.log +600 -0
  13. 04_11_2025/38_continue_archived_20251104_152934/basicsr_options.yaml +242 -0
  14. 04_11_2025/38_continue_archived_20251104_152934/train_38_continue_20251104_152426.log +603 -0
  15. 04_11_2025/38_continue_archived_20251104_153443/basicsr_options.yaml +242 -0
  16. 04_11_2025/38_continue_archived_20251104_153443/train_38_continue_20251104_152935.log +604 -0
  17. 04_11_2025/38_continue_archived_20251104_153917/basicsr_options.yaml +242 -0
  18. 04_11_2025/38_continue_archived_20251104_153917/train_38_continue_20251104_153443.log +604 -0
  19. 04_11_2025/38_continue_archived_20251104_155714/basicsr_options.yaml +242 -0
  20. 04_11_2025/38_continue_archived_20251104_155714/train_38_continue_20251104_153917.log +606 -0
  21. 04_11_2025/38_continue_archived_20251104_160331/basicsr_options.yaml +245 -0
  22. 04_11_2025/38_continue_archived_20251104_160331/train_38_continue_20251104_155714.log +609 -0
  23. 04_11_2025/38_continue_archived_20251104_161131/basicsr_options.yaml +245 -0
  24. 04_11_2025/38_continue_archived_20251104_161131/train_38_continue_20251104_160331.log +609 -0
  25. 04_11_2025/38_continue_archived_20251104_162054/basicsr_options.yaml +245 -0
  26. 04_11_2025/38_continue_archived_20251104_162054/train_38_continue_20251104_161131.log +609 -0
  27. 04_11_2025/38_continue_archived_20251104_164245/basicsr_options.yaml +245 -0
  28. 04_11_2025/38_continue_archived_20251104_164245/train_38_continue_20251104_162054.log +618 -0
  29. 04_11_2025/38_continue_archived_20251104_164819/basicsr_options.yaml +245 -0
  30. 04_11_2025/38_continue_archived_20251104_164819/train_38_continue_20251104_164245.log +611 -0
  31. 04_11_2025/39/basicsr_options.yaml +260 -0
  32. 04_11_2025/39/train_39_20251104_213142.log +0 -0
  33. 04_11_2025/39_archived_20251104_171025/basicsr_options.yaml +260 -0
  34. 04_11_2025/39_archived_20251104_171025/train_39_20251104_170438.log +633 -0
  35. 04_11_2025/39_archived_20251104_171250/basicsr_options.yaml +260 -0
  36. 04_11_2025/39_archived_20251104_171250/train_39_20251104_171025.log +631 -0
  37. 04_11_2025/39_archived_20251104_171656/basicsr_options.yaml +260 -0
  38. 04_11_2025/39_archived_20251104_171656/train_39_20251104_171250.log +631 -0
  39. 04_11_2025/39_archived_20251104_172026/basicsr_options.yaml +260 -0
  40. 04_11_2025/39_archived_20251104_172026/train_39_20251104_171656.log +630 -0
  41. 04_11_2025/39_archived_20251104_172358/basicsr_options.yaml +260 -0
  42. 04_11_2025/39_archived_20251104_172358/train_39_20251104_172026.log +630 -0
  43. 04_11_2025/39_archived_20251104_174404/basicsr_options.yaml +260 -0
  44. 04_11_2025/39_archived_20251104_174404/train_39_20251104_172358.log +645 -0
  45. 04_11_2025/39_archived_20251104_212958/basicsr_options.yaml +260 -0
  46. 04_11_2025/39_archived_20251104_212958/train_39_20251104_174404.log +690 -0
  47. 04_11_2025/39_archived_20251104_213142/basicsr_options.yaml +260 -0
  48. 04_11_2025/39_archived_20251104_213142/train_39_20251104_212958.log +601 -0
  49. 05_11_2025/40/basicsr_options.yaml +243 -0
  50. 05_11_2025/40/train_40_20251105_165150.log +0 -0
04_11_2025/38/basicsr_options.yaml ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 14:00:39 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: 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
+ path:
96
+ pretrain_network_g: ./runs/02_11_2025/34/models/net_g_20000.pth
97
+ strict_load_g: true
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_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.99
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
+ eagle_pixel_x2_opt:
137
+ type: Eagle_Loss
138
+ loss_weight: 5.0e-05
139
+ reduction: mean
140
+ space: pixel
141
+ patch_size: 3
142
+ cutoff: 0.5
143
+ target: x2
144
+ l1_pixel_x2_opt:
145
+ type: L1Loss
146
+ loss_weight: 10.0
147
+ reduction: mean
148
+ space: pixel
149
+ target: x2
150
+ fft_frequency_x2_opt:
151
+ type: FFTFrequencyLoss
152
+ loss_weight: 1.0
153
+ reduction: mean
154
+ space: pixel
155
+ target: x2
156
+ norm: ortho
157
+ use_log_amplitude: false
158
+ alpha: 0.0
159
+ normalize_weight: true
160
+ eps: 1e-8
161
+ eagle_pixel_x4_opt:
162
+ type: Eagle_Loss
163
+ loss_weight: 5.0e-05
164
+ reduction: mean
165
+ space: pixel
166
+ patch_size: 3
167
+ cutoff: 0.5
168
+ target: x4
169
+ l1_pixel_x4_opt:
170
+ type: L1Loss
171
+ loss_weight: 10.0
172
+ reduction: mean
173
+ space: pixel
174
+ target: x4
175
+ fft_frequency_x4_opt:
176
+ type: FFTFrequencyLoss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: pixel
180
+ target: x4
181
+ norm: ortho
182
+ use_log_amplitude: false
183
+ alpha: 0.0
184
+ normalize_weight: true
185
+ eps: 1e-8
186
+ val:
187
+ val_freq: 5000
188
+ save_img: true
189
+ head_evals:
190
+ x2:
191
+ save_img: true
192
+ label: val_x2
193
+ val_sizes:
194
+ lq: 512
195
+ gt: 1024
196
+ metrics:
197
+ l1_latent:
198
+ type: L1Loss
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
+ x4:
206
+ save_img: true
207
+ label: val_x4
208
+ val_sizes:
209
+ lq: 256
210
+ gt: 1024
211
+ metrics:
212
+ l1_latent:
213
+ type: L1Loss
214
+ space: latent
215
+ l2_latent:
216
+ type: MSELoss
217
+ space: latent
218
+ pixel_psnr_pt:
219
+ type: calculate_psnr_pt
220
+ space: pixel
221
+ crop_border: 2
222
+ test_y_channel: false
223
+ logger:
224
+ print_freq: 100
225
+ save_checkpoint_freq: 5000
226
+ use_tb_logger: true
227
+ wandb:
228
+ project: Swin2SR-Latent-SR
229
+ entity: kazanplova-it-more
230
+ resume_id: null
231
+ max_val_images: 10
232
+ dist_params:
233
+ backend: nccl
234
+ port: 29500
235
+ dist: true
236
+ load_networks_only: false
237
+ exp_name: '38'
238
+ name: '38'
04_11_2025/38/train_38_20251104_140039.log ADDED
@@ -0,0 +1,577 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 14:00:39,859 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-04 14:00:39,859 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
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: 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
+ path:[
84
+ pretrain_network_g: ./runs/02_11_2025/34/models/net_g_20000.pth
85
+ strict_load_g: True
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/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.99]
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
+ eagle_pixel_x2_opt:[
133
+ type: Eagle_Loss
134
+ loss_weight: 5e-05
135
+ reduction: mean
136
+ space: pixel
137
+ patch_size: 3
138
+ cutoff: 0.5
139
+ target: x2
140
+ ]
141
+ l1_pixel_x2_opt:[
142
+ type: L1Loss
143
+ loss_weight: 10.0
144
+ reduction: mean
145
+ space: pixel
146
+ target: x2
147
+ ]
148
+ fft_frequency_x2_opt:[
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 1.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: False
156
+ alpha: 0.0
157
+ normalize_weight: True
158
+ eps: 1e-8
159
+ ]
160
+ eagle_pixel_x4_opt:[
161
+ type: Eagle_Loss
162
+ loss_weight: 5e-05
163
+ reduction: mean
164
+ space: pixel
165
+ patch_size: 3
166
+ cutoff: 0.5
167
+ target: x4
168
+ ]
169
+ l1_pixel_x4_opt:[
170
+ type: L1Loss
171
+ loss_weight: 10.0
172
+ reduction: mean
173
+ space: pixel
174
+ target: x4
175
+ ]
176
+ fft_frequency_x4_opt:[
177
+ type: FFTFrequencyLoss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ norm: ortho
183
+ use_log_amplitude: False
184
+ alpha: 0.0
185
+ normalize_weight: True
186
+ eps: 1e-8
187
+ ]
188
+ ]
189
+ val:[
190
+ val_freq: 5000
191
+ save_img: True
192
+ head_evals:[
193
+ x2:[
194
+ save_img: True
195
+ label: val_x2
196
+ val_sizes:[
197
+ lq: 512
198
+ gt: 1024
199
+ ]
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
+ val_sizes:[
217
+ lq: 256
218
+ gt: 1024
219
+ ]
220
+ metrics:[
221
+ l1_latent:[
222
+ type: L1Loss
223
+ space: latent
224
+ ]
225
+ l2_latent:[
226
+ type: MSELoss
227
+ space: latent
228
+ ]
229
+ pixel_psnr_pt:[
230
+ type: calculate_psnr_pt
231
+ space: pixel
232
+ crop_border: 2
233
+ test_y_channel: False
234
+ ]
235
+ ]
236
+ ]
237
+ ]
238
+ ]
239
+ logger:[
240
+ print_freq: 100
241
+ save_checkpoint_freq: 5000
242
+ use_tb_logger: True
243
+ wandb:[
244
+ project: Swin2SR-Latent-SR
245
+ entity: kazanplova-it-more
246
+ resume_id: None
247
+ max_val_images: 10
248
+ ]
249
+ ]
250
+ dist_params:[
251
+ backend: nccl
252
+ port: 29500
253
+ dist: True
254
+ ]
255
+ load_networks_only: False
256
+ exp_name: 38
257
+ name: 38
258
+ dist: True
259
+ rank: 0
260
+ world_size: 6
261
+ auto_resume: False
262
+ is_train: True
263
+ root_path: /data/kazanplova/latent_vae_upscale_train
264
+
265
+ 2025-11-04 14:00:41,572 INFO: Use wandb logger with id=yupmcnie; project=Swin2SR-Latent-SR.
266
+ 2025-11-04 14:00:55,139 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
267
+ 2025-11-04 14:00:55,140 INFO: Training statistics:
268
+ Number of train images: 4858507
269
+ Dataset enlarge ratio: 1
270
+ Batch size per gpu: 8
271
+ World size (gpu number): 6
272
+ Steps per epoch: 101219
273
+ Configured training steps: 125000
274
+ Approximate epochs to cover: 2.
275
+ 2025-11-04 14:00:55,144 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
276
+ 2025-11-04 14:00:55,144 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
277
+ 2025-11-04 14:00:55,146 INFO: Enabled find_unused_parameters=True for multi-head training overrides.
278
+ 2025-11-04 14:00:55,621 INFO: Network [SwinIRMultiHead] is created.
279
+ 2025-11-04 14:01:00,856 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
280
+ 2025-11-04 14:01:00,857 INFO: SwinIRMultiHead(
281
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
282
+ (patch_embed): PatchEmbed(
283
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ )
285
+ (patch_unembed): PatchUnEmbed()
286
+ (pos_drop): Dropout(p=0.0, inplace=False)
287
+ (layers): ModuleList(
288
+ (0): RSTB(
289
+ (residual_group): BasicLayer(
290
+ dim=360, input_resolution=(32, 32), depth=6
291
+ (blocks): ModuleList(
292
+ (0): SwinTransformerBlock(
293
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
294
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
295
+ (attn): WindowAttention(
296
+ dim=360, window_size=(16, 16), num_heads=12
297
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
298
+ (attn_drop): Dropout(p=0.0, inplace=False)
299
+ (proj): Linear(in_features=360, out_features=360, bias=True)
300
+ (proj_drop): Dropout(p=0.0, inplace=False)
301
+ (softmax): Softmax(dim=-1)
302
+ )
303
+ (drop_path): Identity()
304
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
305
+ (mlp): Mlp(
306
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
307
+ (act): GELU(approximate='none')
308
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
309
+ (drop): Dropout(p=0.0, inplace=False)
310
+ )
311
+ )
312
+ (1): SwinTransformerBlock(
313
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
314
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
315
+ (attn): WindowAttention(
316
+ dim=360, window_size=(16, 16), num_heads=12
317
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
318
+ (attn_drop): Dropout(p=0.0, inplace=False)
319
+ (proj): Linear(in_features=360, out_features=360, bias=True)
320
+ (proj_drop): Dropout(p=0.0, inplace=False)
321
+ (softmax): Softmax(dim=-1)
322
+ )
323
+ (drop_path): DropPath()
324
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
325
+ (mlp): Mlp(
326
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
327
+ (act): GELU(approximate='none')
328
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
329
+ (drop): Dropout(p=0.0, inplace=False)
330
+ )
331
+ )
332
+ (2): SwinTransformerBlock(
333
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
334
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
335
+ (attn): WindowAttention(
336
+ dim=360, window_size=(16, 16), num_heads=12
337
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
338
+ (attn_drop): Dropout(p=0.0, inplace=False)
339
+ (proj): Linear(in_features=360, out_features=360, bias=True)
340
+ (proj_drop): Dropout(p=0.0, inplace=False)
341
+ (softmax): Softmax(dim=-1)
342
+ )
343
+ (drop_path): DropPath()
344
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
345
+ (mlp): Mlp(
346
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
347
+ (act): GELU(approximate='none')
348
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
349
+ (drop): Dropout(p=0.0, inplace=False)
350
+ )
351
+ )
352
+ (3): SwinTransformerBlock(
353
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
354
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
355
+ (attn): WindowAttention(
356
+ dim=360, window_size=(16, 16), num_heads=12
357
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
358
+ (attn_drop): Dropout(p=0.0, inplace=False)
359
+ (proj): Linear(in_features=360, out_features=360, bias=True)
360
+ (proj_drop): Dropout(p=0.0, inplace=False)
361
+ (softmax): Softmax(dim=-1)
362
+ )
363
+ (drop_path): DropPath()
364
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
365
+ (mlp): Mlp(
366
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
367
+ (act): GELU(approximate='none')
368
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
369
+ (drop): Dropout(p=0.0, inplace=False)
370
+ )
371
+ )
372
+ (4): SwinTransformerBlock(
373
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
374
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
375
+ (attn): WindowAttention(
376
+ dim=360, window_size=(16, 16), num_heads=12
377
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
378
+ (attn_drop): Dropout(p=0.0, inplace=False)
379
+ (proj): Linear(in_features=360, out_features=360, bias=True)
380
+ (proj_drop): Dropout(p=0.0, inplace=False)
381
+ (softmax): Softmax(dim=-1)
382
+ )
383
+ (drop_path): DropPath()
384
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
385
+ (mlp): Mlp(
386
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
387
+ (act): GELU(approximate='none')
388
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
389
+ (drop): Dropout(p=0.0, inplace=False)
390
+ )
391
+ )
392
+ (5): SwinTransformerBlock(
393
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
394
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
395
+ (attn): WindowAttention(
396
+ dim=360, window_size=(16, 16), num_heads=12
397
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
398
+ (attn_drop): Dropout(p=0.0, inplace=False)
399
+ (proj): Linear(in_features=360, out_features=360, bias=True)
400
+ (proj_drop): Dropout(p=0.0, inplace=False)
401
+ (softmax): Softmax(dim=-1)
402
+ )
403
+ (drop_path): DropPath()
404
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
405
+ (mlp): Mlp(
406
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
407
+ (act): GELU(approximate='none')
408
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
409
+ (drop): Dropout(p=0.0, inplace=False)
410
+ )
411
+ )
412
+ )
413
+ )
414
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
415
+ (patch_embed): PatchEmbed()
416
+ (patch_unembed): PatchUnEmbed()
417
+ )
418
+ (1-5): 5 x RSTB(
419
+ (residual_group): BasicLayer(
420
+ dim=360, input_resolution=(32, 32), depth=6
421
+ (blocks): ModuleList(
422
+ (0): SwinTransformerBlock(
423
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
424
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
425
+ (attn): WindowAttention(
426
+ dim=360, window_size=(16, 16), num_heads=12
427
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
428
+ (attn_drop): Dropout(p=0.0, inplace=False)
429
+ (proj): Linear(in_features=360, out_features=360, bias=True)
430
+ (proj_drop): Dropout(p=0.0, inplace=False)
431
+ (softmax): Softmax(dim=-1)
432
+ )
433
+ (drop_path): DropPath()
434
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
435
+ (mlp): Mlp(
436
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
437
+ (act): GELU(approximate='none')
438
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
439
+ (drop): Dropout(p=0.0, inplace=False)
440
+ )
441
+ )
442
+ (1): SwinTransformerBlock(
443
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
444
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
445
+ (attn): WindowAttention(
446
+ dim=360, window_size=(16, 16), num_heads=12
447
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
448
+ (attn_drop): Dropout(p=0.0, inplace=False)
449
+ (proj): Linear(in_features=360, out_features=360, bias=True)
450
+ (proj_drop): Dropout(p=0.0, inplace=False)
451
+ (softmax): Softmax(dim=-1)
452
+ )
453
+ (drop_path): DropPath()
454
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
455
+ (mlp): Mlp(
456
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
457
+ (act): GELU(approximate='none')
458
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
459
+ (drop): Dropout(p=0.0, inplace=False)
460
+ )
461
+ )
462
+ (2): SwinTransformerBlock(
463
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
464
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
465
+ (attn): WindowAttention(
466
+ dim=360, window_size=(16, 16), num_heads=12
467
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
468
+ (attn_drop): Dropout(p=0.0, inplace=False)
469
+ (proj): Linear(in_features=360, out_features=360, bias=True)
470
+ (proj_drop): Dropout(p=0.0, inplace=False)
471
+ (softmax): Softmax(dim=-1)
472
+ )
473
+ (drop_path): DropPath()
474
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
475
+ (mlp): Mlp(
476
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
477
+ (act): GELU(approximate='none')
478
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
479
+ (drop): Dropout(p=0.0, inplace=False)
480
+ )
481
+ )
482
+ (3): SwinTransformerBlock(
483
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
484
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
485
+ (attn): WindowAttention(
486
+ dim=360, window_size=(16, 16), num_heads=12
487
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
488
+ (attn_drop): Dropout(p=0.0, inplace=False)
489
+ (proj): Linear(in_features=360, out_features=360, bias=True)
490
+ (proj_drop): Dropout(p=0.0, inplace=False)
491
+ (softmax): Softmax(dim=-1)
492
+ )
493
+ (drop_path): DropPath()
494
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
495
+ (mlp): Mlp(
496
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
497
+ (act): GELU(approximate='none')
498
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
499
+ (drop): Dropout(p=0.0, inplace=False)
500
+ )
501
+ )
502
+ (4): SwinTransformerBlock(
503
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
504
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
505
+ (attn): WindowAttention(
506
+ dim=360, window_size=(16, 16), num_heads=12
507
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
508
+ (attn_drop): Dropout(p=0.0, inplace=False)
509
+ (proj): Linear(in_features=360, out_features=360, bias=True)
510
+ (proj_drop): Dropout(p=0.0, inplace=False)
511
+ (softmax): Softmax(dim=-1)
512
+ )
513
+ (drop_path): DropPath()
514
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
515
+ (mlp): Mlp(
516
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
517
+ (act): GELU(approximate='none')
518
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
519
+ (drop): Dropout(p=0.0, inplace=False)
520
+ )
521
+ )
522
+ (5): SwinTransformerBlock(
523
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
524
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
525
+ (attn): WindowAttention(
526
+ dim=360, window_size=(16, 16), num_heads=12
527
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
528
+ (attn_drop): Dropout(p=0.0, inplace=False)
529
+ (proj): Linear(in_features=360, out_features=360, bias=True)
530
+ (proj_drop): Dropout(p=0.0, inplace=False)
531
+ (softmax): Softmax(dim=-1)
532
+ )
533
+ (drop_path): DropPath()
534
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
535
+ (mlp): Mlp(
536
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
537
+ (act): GELU(approximate='none')
538
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
539
+ (drop): Dropout(p=0.0, inplace=False)
540
+ )
541
+ )
542
+ )
543
+ )
544
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (patch_embed): PatchEmbed()
546
+ (patch_unembed): PatchUnEmbed()
547
+ )
548
+ )
549
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
550
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (heads): ModuleDict(
552
+ (x2): _SwinIRPixelShuffleHead(
553
+ (conv_before): Sequential(
554
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
555
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
556
+ )
557
+ (upsample): Upsample(
558
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (1): PixelShuffle(upscale_factor=2)
560
+ )
561
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
562
+ )
563
+ (x4): _SwinIRPixelShuffleHead(
564
+ (conv_before): Sequential(
565
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
566
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
567
+ )
568
+ (upsample): Upsample(
569
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ (1): PixelShuffle(upscale_factor=2)
571
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
572
+ (3): PixelShuffle(upscale_factor=2)
573
+ )
574
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ )
576
+ )
577
+ )
04_11_2025/38_archived_20251104_065727/basicsr_options.yaml ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 06:51:38 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: 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
+ path:
96
+ pretrain_network_g: ./runs/02_11_2025/34/models/net_g_20000.pth
97
+ strict_load_g: true
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_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.99
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
+ eagle_pixel_x2_opt:
137
+ type: Eagle_Loss
138
+ loss_weight: 5.0e-05
139
+ reduction: mean
140
+ space: pixel
141
+ patch_size: 3
142
+ cutoff: 0.5
143
+ target: x2
144
+ l1_pixel_x2_opt:
145
+ type: L1Loss
146
+ loss_weight: 10.0
147
+ reduction: mean
148
+ space: pixel
149
+ target: x2
150
+ fft_frequency_x2_opt:
151
+ type: FFTFrequencyLoss
152
+ loss_weight: 1.0
153
+ reduction: mean
154
+ space: pixel
155
+ target: x2
156
+ norm: ortho
157
+ use_log_amplitude: false
158
+ alpha: 0.0
159
+ normalize_weight: true
160
+ eps: 1e-8
161
+ eagle_pixel_x4_opt:
162
+ type: Eagle_Loss
163
+ loss_weight: 5.0e-05
164
+ reduction: mean
165
+ space: pixel
166
+ patch_size: 3
167
+ cutoff: 0.5
168
+ target: x4
169
+ l1_pixel_x4_opt:
170
+ type: L1Loss
171
+ loss_weight: 10.0
172
+ reduction: mean
173
+ space: pixel
174
+ target: x4
175
+ fft_frequency_x4_opt:
176
+ type: FFTFrequencyLoss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: pixel
180
+ target: x4
181
+ norm: ortho
182
+ use_log_amplitude: false
183
+ alpha: 0.0
184
+ normalize_weight: true
185
+ eps: 1e-8
186
+ val:
187
+ val_freq: 5000
188
+ save_img: true
189
+ head_evals:
190
+ x2:
191
+ save_img: true
192
+ label: val_x2
193
+ val_sizes:
194
+ lq: 512
195
+ gt: 1024
196
+ metrics:
197
+ l1_latent:
198
+ type: L1Loss
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
+ x4:
206
+ save_img: true
207
+ label: val_x4
208
+ val_sizes:
209
+ lq: 256
210
+ gt: 1024
211
+ metrics:
212
+ l1_latent:
213
+ type: L1Loss
214
+ space: latent
215
+ l2_latent:
216
+ type: MSELoss
217
+ space: latent
218
+ pixel_psnr_pt:
219
+ type: calculate_psnr_pt
220
+ space: pixel
221
+ crop_border: 2
222
+ test_y_channel: false
223
+ logger:
224
+ print_freq: 100
225
+ save_checkpoint_freq: 5000
226
+ use_tb_logger: true
227
+ wandb:
228
+ project: Swin2SR-Latent-SR
229
+ entity: kazanplova-it-more
230
+ resume_id: null
231
+ max_val_images: 10
232
+ dist_params:
233
+ backend: nccl
234
+ port: 29500
235
+ dist: true
236
+ load_networks_only: false
237
+ exp_name: '38'
238
+ name: '38'
04_11_2025/38_archived_20251104_065727/train_38_20251104_065138.log ADDED
@@ -0,0 +1,598 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 06:51:38,640 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-04 06:51:38,640 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
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: 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
+ path:[
84
+ pretrain_network_g: ./runs/02_11_2025/34/models/net_g_20000.pth
85
+ strict_load_g: True
86
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38
87
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/models
88
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/training_states
89
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38
90
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38/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.99]
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
+ eagle_pixel_x2_opt:[
133
+ type: Eagle_Loss
134
+ loss_weight: 5e-05
135
+ reduction: mean
136
+ space: pixel
137
+ patch_size: 3
138
+ cutoff: 0.5
139
+ target: x2
140
+ ]
141
+ l1_pixel_x2_opt:[
142
+ type: L1Loss
143
+ loss_weight: 10.0
144
+ reduction: mean
145
+ space: pixel
146
+ target: x2
147
+ ]
148
+ fft_frequency_x2_opt:[
149
+ type: FFTFrequencyLoss
150
+ loss_weight: 1.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ norm: ortho
155
+ use_log_amplitude: False
156
+ alpha: 0.0
157
+ normalize_weight: True
158
+ eps: 1e-8
159
+ ]
160
+ eagle_pixel_x4_opt:[
161
+ type: Eagle_Loss
162
+ loss_weight: 5e-05
163
+ reduction: mean
164
+ space: pixel
165
+ patch_size: 3
166
+ cutoff: 0.5
167
+ target: x4
168
+ ]
169
+ l1_pixel_x4_opt:[
170
+ type: L1Loss
171
+ loss_weight: 10.0
172
+ reduction: mean
173
+ space: pixel
174
+ target: x4
175
+ ]
176
+ fft_frequency_x4_opt:[
177
+ type: FFTFrequencyLoss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ norm: ortho
183
+ use_log_amplitude: False
184
+ alpha: 0.0
185
+ normalize_weight: True
186
+ eps: 1e-8
187
+ ]
188
+ ]
189
+ val:[
190
+ val_freq: 5000
191
+ save_img: True
192
+ head_evals:[
193
+ x2:[
194
+ save_img: True
195
+ label: val_x2
196
+ val_sizes:[
197
+ lq: 512
198
+ gt: 1024
199
+ ]
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
+ val_sizes:[
217
+ lq: 256
218
+ gt: 1024
219
+ ]
220
+ metrics:[
221
+ l1_latent:[
222
+ type: L1Loss
223
+ space: latent
224
+ ]
225
+ l2_latent:[
226
+ type: MSELoss
227
+ space: latent
228
+ ]
229
+ pixel_psnr_pt:[
230
+ type: calculate_psnr_pt
231
+ space: pixel
232
+ crop_border: 2
233
+ test_y_channel: False
234
+ ]
235
+ ]
236
+ ]
237
+ ]
238
+ ]
239
+ logger:[
240
+ print_freq: 100
241
+ save_checkpoint_freq: 5000
242
+ use_tb_logger: True
243
+ wandb:[
244
+ project: Swin2SR-Latent-SR
245
+ entity: kazanplova-it-more
246
+ resume_id: None
247
+ max_val_images: 10
248
+ ]
249
+ ]
250
+ dist_params:[
251
+ backend: nccl
252
+ port: 29500
253
+ dist: True
254
+ ]
255
+ load_networks_only: False
256
+ exp_name: 38
257
+ name: 38
258
+ dist: True
259
+ rank: 0
260
+ world_size: 6
261
+ auto_resume: False
262
+ is_train: True
263
+ root_path: /data/kazanplova/latent_vae_upscale_train
264
+
265
+ 2025-11-04 06:51:40,278 INFO: Use wandb logger with id=ji9u56mi; project=Swin2SR-Latent-SR.
266
+ 2025-11-04 06:51:54,954 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
267
+ 2025-11-04 06:51:54,955 INFO: Training statistics:
268
+ Number of train images: 4858507
269
+ Dataset enlarge ratio: 1
270
+ Batch size per gpu: 8
271
+ World size (gpu number): 6
272
+ Steps per epoch: 101219
273
+ Configured training steps: 125000
274
+ Approximate epochs to cover: 2.
275
+ 2025-11-04 06:51:54,959 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
276
+ 2025-11-04 06:51:54,959 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
277
+ 2025-11-04 06:51:54,960 INFO: Enabled find_unused_parameters=True for multi-head training overrides.
278
+ 2025-11-04 06:51:55,415 INFO: Network [SwinIRMultiHead] is created.
279
+ 2025-11-04 06:51:57,438 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
280
+ 2025-11-04 06:51:57,439 INFO: SwinIRMultiHead(
281
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
282
+ (patch_embed): PatchEmbed(
283
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
284
+ )
285
+ (patch_unembed): PatchUnEmbed()
286
+ (pos_drop): Dropout(p=0.0, inplace=False)
287
+ (layers): ModuleList(
288
+ (0): RSTB(
289
+ (residual_group): BasicLayer(
290
+ dim=360, input_resolution=(32, 32), depth=6
291
+ (blocks): ModuleList(
292
+ (0): SwinTransformerBlock(
293
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
294
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
295
+ (attn): WindowAttention(
296
+ dim=360, window_size=(16, 16), num_heads=12
297
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
298
+ (attn_drop): Dropout(p=0.0, inplace=False)
299
+ (proj): Linear(in_features=360, out_features=360, bias=True)
300
+ (proj_drop): Dropout(p=0.0, inplace=False)
301
+ (softmax): Softmax(dim=-1)
302
+ )
303
+ (drop_path): Identity()
304
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
305
+ (mlp): Mlp(
306
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
307
+ (act): GELU(approximate='none')
308
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
309
+ (drop): Dropout(p=0.0, inplace=False)
310
+ )
311
+ )
312
+ (1): SwinTransformerBlock(
313
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
314
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
315
+ (attn): WindowAttention(
316
+ dim=360, window_size=(16, 16), num_heads=12
317
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
318
+ (attn_drop): Dropout(p=0.0, inplace=False)
319
+ (proj): Linear(in_features=360, out_features=360, bias=True)
320
+ (proj_drop): Dropout(p=0.0, inplace=False)
321
+ (softmax): Softmax(dim=-1)
322
+ )
323
+ (drop_path): DropPath()
324
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
325
+ (mlp): Mlp(
326
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
327
+ (act): GELU(approximate='none')
328
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
329
+ (drop): Dropout(p=0.0, inplace=False)
330
+ )
331
+ )
332
+ (2): SwinTransformerBlock(
333
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
334
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
335
+ (attn): WindowAttention(
336
+ dim=360, window_size=(16, 16), num_heads=12
337
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
338
+ (attn_drop): Dropout(p=0.0, inplace=False)
339
+ (proj): Linear(in_features=360, out_features=360, bias=True)
340
+ (proj_drop): Dropout(p=0.0, inplace=False)
341
+ (softmax): Softmax(dim=-1)
342
+ )
343
+ (drop_path): DropPath()
344
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
345
+ (mlp): Mlp(
346
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
347
+ (act): GELU(approximate='none')
348
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
349
+ (drop): Dropout(p=0.0, inplace=False)
350
+ )
351
+ )
352
+ (3): SwinTransformerBlock(
353
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
354
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
355
+ (attn): WindowAttention(
356
+ dim=360, window_size=(16, 16), num_heads=12
357
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
358
+ (attn_drop): Dropout(p=0.0, inplace=False)
359
+ (proj): Linear(in_features=360, out_features=360, bias=True)
360
+ (proj_drop): Dropout(p=0.0, inplace=False)
361
+ (softmax): Softmax(dim=-1)
362
+ )
363
+ (drop_path): DropPath()
364
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
365
+ (mlp): Mlp(
366
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
367
+ (act): GELU(approximate='none')
368
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
369
+ (drop): Dropout(p=0.0, inplace=False)
370
+ )
371
+ )
372
+ (4): SwinTransformerBlock(
373
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
374
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
375
+ (attn): WindowAttention(
376
+ dim=360, window_size=(16, 16), num_heads=12
377
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
378
+ (attn_drop): Dropout(p=0.0, inplace=False)
379
+ (proj): Linear(in_features=360, out_features=360, bias=True)
380
+ (proj_drop): Dropout(p=0.0, inplace=False)
381
+ (softmax): Softmax(dim=-1)
382
+ )
383
+ (drop_path): DropPath()
384
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
385
+ (mlp): Mlp(
386
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
387
+ (act): GELU(approximate='none')
388
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
389
+ (drop): Dropout(p=0.0, inplace=False)
390
+ )
391
+ )
392
+ (5): SwinTransformerBlock(
393
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
394
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
395
+ (attn): WindowAttention(
396
+ dim=360, window_size=(16, 16), num_heads=12
397
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
398
+ (attn_drop): Dropout(p=0.0, inplace=False)
399
+ (proj): Linear(in_features=360, out_features=360, bias=True)
400
+ (proj_drop): Dropout(p=0.0, inplace=False)
401
+ (softmax): Softmax(dim=-1)
402
+ )
403
+ (drop_path): DropPath()
404
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
405
+ (mlp): Mlp(
406
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
407
+ (act): GELU(approximate='none')
408
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
409
+ (drop): Dropout(p=0.0, inplace=False)
410
+ )
411
+ )
412
+ )
413
+ )
414
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
415
+ (patch_embed): PatchEmbed()
416
+ (patch_unembed): PatchUnEmbed()
417
+ )
418
+ (1-5): 5 x RSTB(
419
+ (residual_group): BasicLayer(
420
+ dim=360, input_resolution=(32, 32), depth=6
421
+ (blocks): ModuleList(
422
+ (0): SwinTransformerBlock(
423
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
424
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
425
+ (attn): WindowAttention(
426
+ dim=360, window_size=(16, 16), num_heads=12
427
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
428
+ (attn_drop): Dropout(p=0.0, inplace=False)
429
+ (proj): Linear(in_features=360, out_features=360, bias=True)
430
+ (proj_drop): Dropout(p=0.0, inplace=False)
431
+ (softmax): Softmax(dim=-1)
432
+ )
433
+ (drop_path): DropPath()
434
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
435
+ (mlp): Mlp(
436
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
437
+ (act): GELU(approximate='none')
438
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
439
+ (drop): Dropout(p=0.0, inplace=False)
440
+ )
441
+ )
442
+ (1): SwinTransformerBlock(
443
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
444
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
445
+ (attn): WindowAttention(
446
+ dim=360, window_size=(16, 16), num_heads=12
447
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
448
+ (attn_drop): Dropout(p=0.0, inplace=False)
449
+ (proj): Linear(in_features=360, out_features=360, bias=True)
450
+ (proj_drop): Dropout(p=0.0, inplace=False)
451
+ (softmax): Softmax(dim=-1)
452
+ )
453
+ (drop_path): DropPath()
454
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
455
+ (mlp): Mlp(
456
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
457
+ (act): GELU(approximate='none')
458
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
459
+ (drop): Dropout(p=0.0, inplace=False)
460
+ )
461
+ )
462
+ (2): SwinTransformerBlock(
463
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
464
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
465
+ (attn): WindowAttention(
466
+ dim=360, window_size=(16, 16), num_heads=12
467
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
468
+ (attn_drop): Dropout(p=0.0, inplace=False)
469
+ (proj): Linear(in_features=360, out_features=360, bias=True)
470
+ (proj_drop): Dropout(p=0.0, inplace=False)
471
+ (softmax): Softmax(dim=-1)
472
+ )
473
+ (drop_path): DropPath()
474
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
475
+ (mlp): Mlp(
476
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
477
+ (act): GELU(approximate='none')
478
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
479
+ (drop): Dropout(p=0.0, inplace=False)
480
+ )
481
+ )
482
+ (3): SwinTransformerBlock(
483
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
484
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
485
+ (attn): WindowAttention(
486
+ dim=360, window_size=(16, 16), num_heads=12
487
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
488
+ (attn_drop): Dropout(p=0.0, inplace=False)
489
+ (proj): Linear(in_features=360, out_features=360, bias=True)
490
+ (proj_drop): Dropout(p=0.0, inplace=False)
491
+ (softmax): Softmax(dim=-1)
492
+ )
493
+ (drop_path): DropPath()
494
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
495
+ (mlp): Mlp(
496
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
497
+ (act): GELU(approximate='none')
498
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
499
+ (drop): Dropout(p=0.0, inplace=False)
500
+ )
501
+ )
502
+ (4): SwinTransformerBlock(
503
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
504
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
505
+ (attn): WindowAttention(
506
+ dim=360, window_size=(16, 16), num_heads=12
507
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
508
+ (attn_drop): Dropout(p=0.0, inplace=False)
509
+ (proj): Linear(in_features=360, out_features=360, bias=True)
510
+ (proj_drop): Dropout(p=0.0, inplace=False)
511
+ (softmax): Softmax(dim=-1)
512
+ )
513
+ (drop_path): DropPath()
514
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
515
+ (mlp): Mlp(
516
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
517
+ (act): GELU(approximate='none')
518
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
519
+ (drop): Dropout(p=0.0, inplace=False)
520
+ )
521
+ )
522
+ (5): SwinTransformerBlock(
523
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
524
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
525
+ (attn): WindowAttention(
526
+ dim=360, window_size=(16, 16), num_heads=12
527
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
528
+ (attn_drop): Dropout(p=0.0, inplace=False)
529
+ (proj): Linear(in_features=360, out_features=360, bias=True)
530
+ (proj_drop): Dropout(p=0.0, inplace=False)
531
+ (softmax): Softmax(dim=-1)
532
+ )
533
+ (drop_path): DropPath()
534
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
535
+ (mlp): Mlp(
536
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
537
+ (act): GELU(approximate='none')
538
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
539
+ (drop): Dropout(p=0.0, inplace=False)
540
+ )
541
+ )
542
+ )
543
+ )
544
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
545
+ (patch_embed): PatchEmbed()
546
+ (patch_unembed): PatchUnEmbed()
547
+ )
548
+ )
549
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
550
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
551
+ (heads): ModuleDict(
552
+ (x2): _SwinIRPixelShuffleHead(
553
+ (conv_before): Sequential(
554
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
555
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
556
+ )
557
+ (upsample): Upsample(
558
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (1): PixelShuffle(upscale_factor=2)
560
+ )
561
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
562
+ )
563
+ (x4): _SwinIRPixelShuffleHead(
564
+ (conv_before): Sequential(
565
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
566
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
567
+ )
568
+ (upsample): Upsample(
569
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ (1): PixelShuffle(upscale_factor=2)
571
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
572
+ (3): PixelShuffle(upscale_factor=2)
573
+ )
574
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ )
576
+ )
577
+ )
578
+ 2025-11-04 06:51:57,604 INFO: Loading SwinIRMultiHead from ./runs/02_11_2025/34/models/net_g_20000.pth [key=params].
579
+ 2025-11-04 06:51:57,666 INFO: Use EMA with decay: 0.999
580
+ 2025-11-04 06:51:58,234 INFO: Network [SwinIRMultiHead] is created.
581
+ 2025-11-04 06:51:58,422 INFO: Loading: params_ema does not exist, use params.
582
+ 2025-11-04 06:51:58,423 INFO: Loading SwinIRMultiHead from ./runs/02_11_2025/34/models/net_g_20000.pth [key=params].
583
+ 2025-11-04 06:51:58,471 INFO: Loss [Eagle_Loss] is created.
584
+ 2025-11-04 06:51:58,472 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=5e-05).
585
+ 2025-11-04 06:51:58,472 INFO: Loss [L1Loss] is created.
586
+ 2025-11-04 06:51:58,473 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
587
+ 2025-11-04 06:51:58,473 INFO: Loss [FFTFrequencyLoss] is created.
588
+ 2025-11-04 06:51:58,473 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
589
+ 2025-11-04 06:51:58,473 INFO: Loss [Eagle_Loss] is created.
590
+ 2025-11-04 06:51:58,474 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
591
+ 2025-11-04 06:51:58,474 INFO: Loss [L1Loss] is created.
592
+ 2025-11-04 06:51:58,474 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
593
+ 2025-11-04 06:51:58,474 INFO: Loss [FFTFrequencyLoss] is created.
594
+ 2025-11-04 06:51:58,475 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
595
+ 2025-11-04 06:51:58,476 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
596
+ 2025-11-04 06:51:58,476 INFO: Model [SwinIRLatentModelMultiHead] is created.
597
+ 2025-11-04 06:53:09,920 INFO: Start training from epoch: 0, step: 0
598
+ 2025-11-04 06:53:12,036 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_archived_20251104_140039/basicsr_options.yaml ADDED
@@ -0,0 +1,238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 06:57:27 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: 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
+ path:
96
+ pretrain_network_g: ./runs/02_11_2025/34/models/net_g_20000.pth
97
+ strict_load_g: true
98
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_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.99
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
+ eagle_pixel_x2_opt:
137
+ type: Eagle_Loss
138
+ loss_weight: 5.0e-05
139
+ reduction: mean
140
+ space: pixel
141
+ patch_size: 3
142
+ cutoff: 0.5
143
+ target: x2
144
+ l1_pixel_x2_opt:
145
+ type: L1Loss
146
+ loss_weight: 10.0
147
+ reduction: mean
148
+ space: pixel
149
+ target: x2
150
+ fft_frequency_x2_opt:
151
+ type: FFTFrequencyLoss
152
+ loss_weight: 1.0
153
+ reduction: mean
154
+ space: pixel
155
+ target: x2
156
+ norm: ortho
157
+ use_log_amplitude: false
158
+ alpha: 0.0
159
+ normalize_weight: true
160
+ eps: 1e-8
161
+ eagle_pixel_x4_opt:
162
+ type: Eagle_Loss
163
+ loss_weight: 5.0e-05
164
+ reduction: mean
165
+ space: pixel
166
+ patch_size: 3
167
+ cutoff: 0.5
168
+ target: x4
169
+ l1_pixel_x4_opt:
170
+ type: L1Loss
171
+ loss_weight: 10.0
172
+ reduction: mean
173
+ space: pixel
174
+ target: x4
175
+ fft_frequency_x4_opt:
176
+ type: FFTFrequencyLoss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: pixel
180
+ target: x4
181
+ norm: ortho
182
+ use_log_amplitude: false
183
+ alpha: 0.0
184
+ normalize_weight: true
185
+ eps: 1e-8
186
+ val:
187
+ val_freq: 5000
188
+ save_img: true
189
+ head_evals:
190
+ x2:
191
+ save_img: true
192
+ label: val_x2
193
+ val_sizes:
194
+ lq: 512
195
+ gt: 1024
196
+ metrics:
197
+ l1_latent:
198
+ type: L1Loss
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
+ x4:
206
+ save_img: true
207
+ label: val_x4
208
+ val_sizes:
209
+ lq: 256
210
+ gt: 1024
211
+ metrics:
212
+ l1_latent:
213
+ type: L1Loss
214
+ space: latent
215
+ l2_latent:
216
+ type: MSELoss
217
+ space: latent
218
+ pixel_psnr_pt:
219
+ type: calculate_psnr_pt
220
+ space: pixel
221
+ crop_border: 2
222
+ test_y_channel: false
223
+ logger:
224
+ print_freq: 100
225
+ save_checkpoint_freq: 5000
226
+ use_tb_logger: true
227
+ wandb:
228
+ project: Swin2SR-Latent-SR
229
+ entity: kazanplova-it-more
230
+ resume_id: null
231
+ max_val_images: 10
232
+ dist_params:
233
+ backend: nccl
234
+ port: 29500
235
+ dist: true
236
+ load_networks_only: false
237
+ exp_name: '38'
238
+ name: '38'
04_11_2025/38_archived_20251104_140039/train_38_20251104_065727.log ADDED
The diff for this file is too large to render. See raw diff
 
04_11_2025/38_continue/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 16:48:19 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: true
108
+ mode: auto
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: inductor
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 100
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue/train_38_continue_20251104_164819.log ADDED
@@ -0,0 +1,615 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 16:48:19,402 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-04 16:48:19,402 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: True
102
+ mode: auto
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: inductor
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 100
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 16:48:21,128 INFO: Use wandb logger with id=owuvmq6d; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 16:48:33,914 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 16:48:33,915 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 16:48:33,918 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 16:48:33,918 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 16:48:33,920 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 16:48:34,388 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 16:48:36,476 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 16:48:36,477 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 16:48:36,606 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 16:48:36,657 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
588
+ 2025-11-04 16:48:36,659 INFO: Use EMA with decay: 0.999
589
+ 2025-11-04 16:48:37,079 INFO: Network [SwinIRMultiHead] is created.
590
+ 2025-11-04 16:48:37,243 INFO: Loading: params_ema does not exist, use params.
591
+ 2025-11-04 16:48:37,244 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
592
+ 2025-11-04 16:48:37,295 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
593
+ 2025-11-04 16:48:37,297 INFO: Loss [Eagle_Loss] is created.
594
+ 2025-11-04 16:48:37,298 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
595
+ 2025-11-04 16:48:37,298 INFO: Loss [L1Loss] is created.
596
+ 2025-11-04 16:48:37,299 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
597
+ 2025-11-04 16:48:37,300 INFO: Loss [FFTFrequencyLoss] is created.
598
+ 2025-11-04 16:48:37,301 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
599
+ 2025-11-04 16:48:37,303 INFO: Loss [Eagle_Loss] is created.
600
+ 2025-11-04 16:48:37,304 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
601
+ 2025-11-04 16:48:37,305 INFO: Loss [L1Loss] is created.
602
+ 2025-11-04 16:48:37,306 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
603
+ 2025-11-04 16:48:37,307 INFO: Loss [FFTFrequencyLoss] is created.
604
+ 2025-11-04 16:48:37,307 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
605
+ 2025-11-04 16:48:37,310 INFO: Precision configuration — train: bf16, eval: fp32
606
+ 2025-11-04 16:48:37,310 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
607
+ 2025-11-04 16:48:37,310 INFO: Model [SwinIRLatentModelMultiHead] is created.
608
+ 2025-11-04 16:49:52,970 INFO: Use cuda prefetch dataloader
609
+ 2025-11-04 16:49:52,972 INFO: Start training from epoch: 0, step: 0
610
+ 2025-11-04 16:49:54,587 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
611
+ 2025-11-04 16:51:53,555 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 12:17:04, time (data): 1.206 (0.012)] eagle_pixel_x2_opt: 4.0349e+00 l1_pixel_x2_opt: 3.5620e-02 fft_frequency_x2_opt: 3.2362e-02 eagle_pixel_x4_opt: 6.1451e+00 l1_pixel_x4_opt: 5.1324e-02 fft_frequency_x4_opt: 4.3936e-02
612
+ 2025-11-04 16:54:22,576 INFO: Validation val_x2
613
+ # l1_latent: 1.4049 Best: 1.4049 @ 100 iter
614
+ # pixel_psnr_pt: 32.3299 Best: 32.3299 @ 100 iter
615
+
04_11_2025/38_continue_archived_20251104_150011/basicsr_options.yaml ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 14:08:56 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: 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
+ path:
96
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
97
+ strict_load_g: true
98
+ resume_state: null
99
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
100
+ compile:
101
+ enabled: false
102
+ mode: max-autotune
103
+ dynamic: true
104
+ fullgraph: false
105
+ backend: null
106
+ train:
107
+ ema_decay: 0.999
108
+ head_inputs:
109
+ x2:
110
+ lq: 256
111
+ gt: 512
112
+ x4:
113
+ lq: 128
114
+ gt: 512
115
+ optim_g:
116
+ type: Adam
117
+ lr: 0.00025
118
+ weight_decay: 0
119
+ betas:
120
+ - 0.9
121
+ - 0.99
122
+ grad_clip:
123
+ enabled: true
124
+ generator:
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ scheduler:
129
+ type: MultiStepLR
130
+ milestones:
131
+ - 62500
132
+ - 93750
133
+ - 112500
134
+ gamma: 0.5
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ l1_pixel_x2_opt:
146
+ type: L1Loss
147
+ loss_weight: 10.0
148
+ reduction: mean
149
+ space: pixel
150
+ target: x2
151
+ fft_frequency_x2_opt:
152
+ type: FFTFrequencyLoss
153
+ loss_weight: 1.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ norm: ortho
158
+ use_log_amplitude: false
159
+ alpha: 0.0
160
+ normalize_weight: true
161
+ eps: 1e-8
162
+ eagle_pixel_x4_opt:
163
+ type: Eagle_Loss
164
+ loss_weight: 5.0e-05
165
+ reduction: mean
166
+ space: pixel
167
+ patch_size: 3
168
+ cutoff: 0.5
169
+ target: x4
170
+ l1_pixel_x4_opt:
171
+ type: L1Loss
172
+ loss_weight: 10.0
173
+ reduction: mean
174
+ space: pixel
175
+ target: x4
176
+ fft_frequency_x4_opt:
177
+ type: FFTFrequencyLoss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ norm: ortho
183
+ use_log_amplitude: false
184
+ alpha: 0.0
185
+ normalize_weight: true
186
+ eps: 1e-8
187
+ val:
188
+ val_freq: 5000
189
+ save_img: true
190
+ head_evals:
191
+ x2:
192
+ save_img: true
193
+ label: val_x2
194
+ val_sizes:
195
+ lq: 512
196
+ gt: 1024
197
+ metrics:
198
+ l1_latent:
199
+ type: L1Loss
200
+ space: latent
201
+ pixel_psnr_pt:
202
+ type: calculate_psnr_pt
203
+ space: pixel
204
+ crop_border: 2
205
+ test_y_channel: false
206
+ x4:
207
+ save_img: true
208
+ label: val_x4
209
+ val_sizes:
210
+ lq: 256
211
+ gt: 1024
212
+ metrics:
213
+ l1_latent:
214
+ type: L1Loss
215
+ space: latent
216
+ l2_latent:
217
+ type: MSELoss
218
+ space: latent
219
+ pixel_psnr_pt:
220
+ type: calculate_psnr_pt
221
+ space: pixel
222
+ crop_border: 2
223
+ test_y_channel: false
224
+ logger:
225
+ print_freq: 100
226
+ save_checkpoint_freq: 5000
227
+ use_tb_logger: true
228
+ wandb:
229
+ project: Swin2SR-Latent-SR
230
+ entity: kazanplova-it-more
231
+ resume_id: null
232
+ max_val_images: 10
233
+ dist_params:
234
+ backend: nccl
235
+ port: 29500
236
+ dist: true
237
+ load_networks_only: false
238
+ exp_name: 38_continue
239
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_150011/train_38_continue_20251104_140856.log ADDED
@@ -0,0 +1,621 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 14:08:56,280 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-04 14:08:56,280 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
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: 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
+ path:[
84
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
85
+ strict_load_g: True
86
+ resume_state: None
87
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
88
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
89
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
90
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
91
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
92
+ ]
93
+ compile:[
94
+ enabled: False
95
+ mode: max-autotune
96
+ dynamic: True
97
+ fullgraph: False
98
+ backend: None
99
+ ]
100
+ train:[
101
+ ema_decay: 0.999
102
+ head_inputs:[
103
+ x2:[
104
+ lq: 256
105
+ gt: 512
106
+ ]
107
+ x4:[
108
+ lq: 128
109
+ gt: 512
110
+ ]
111
+ ]
112
+ optim_g:[
113
+ type: Adam
114
+ lr: 0.00025
115
+ weight_decay: 0
116
+ betas: [0.9, 0.99]
117
+ ]
118
+ grad_clip:[
119
+ enabled: True
120
+ generator:[
121
+ type: norm
122
+ max_norm: 0.4
123
+ norm_type: 2.0
124
+ ]
125
+ ]
126
+ scheduler:[
127
+ type: MultiStepLR
128
+ milestones: [62500, 93750, 112500]
129
+ gamma: 0.5
130
+ ]
131
+ total_steps: 125000
132
+ warmup_iter: -1
133
+ eagle_pixel_x2_opt:[
134
+ type: Eagle_Loss
135
+ loss_weight: 2.5e-05
136
+ reduction: mean
137
+ space: pixel
138
+ patch_size: 3
139
+ cutoff: 0.5
140
+ target: x2
141
+ ]
142
+ l1_pixel_x2_opt:[
143
+ type: L1Loss
144
+ loss_weight: 10.0
145
+ reduction: mean
146
+ space: pixel
147
+ target: x2
148
+ ]
149
+ fft_frequency_x2_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 1.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ eagle_pixel_x4_opt:[
162
+ type: Eagle_Loss
163
+ loss_weight: 5e-05
164
+ reduction: mean
165
+ space: pixel
166
+ patch_size: 3
167
+ cutoff: 0.5
168
+ target: x4
169
+ ]
170
+ l1_pixel_x4_opt:[
171
+ type: L1Loss
172
+ loss_weight: 10.0
173
+ reduction: mean
174
+ space: pixel
175
+ target: x4
176
+ ]
177
+ fft_frequency_x4_opt:[
178
+ type: FFTFrequencyLoss
179
+ loss_weight: 1.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ norm: ortho
184
+ use_log_amplitude: False
185
+ alpha: 0.0
186
+ normalize_weight: True
187
+ eps: 1e-8
188
+ ]
189
+ ]
190
+ val:[
191
+ val_freq: 5000
192
+ save_img: True
193
+ head_evals:[
194
+ x2:[
195
+ save_img: True
196
+ label: val_x2
197
+ val_sizes:[
198
+ lq: 512
199
+ gt: 1024
200
+ ]
201
+ metrics:[
202
+ l1_latent:[
203
+ type: L1Loss
204
+ space: latent
205
+ ]
206
+ pixel_psnr_pt:[
207
+ type: calculate_psnr_pt
208
+ space: pixel
209
+ crop_border: 2
210
+ test_y_channel: False
211
+ ]
212
+ ]
213
+ ]
214
+ x4:[
215
+ save_img: True
216
+ label: val_x4
217
+ val_sizes:[
218
+ lq: 256
219
+ gt: 1024
220
+ ]
221
+ metrics:[
222
+ l1_latent:[
223
+ type: L1Loss
224
+ space: latent
225
+ ]
226
+ l2_latent:[
227
+ type: MSELoss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ ]
239
+ ]
240
+ logger:[
241
+ print_freq: 100
242
+ save_checkpoint_freq: 5000
243
+ use_tb_logger: True
244
+ wandb:[
245
+ project: Swin2SR-Latent-SR
246
+ entity: kazanplova-it-more
247
+ resume_id: None
248
+ max_val_images: 10
249
+ ]
250
+ ]
251
+ dist_params:[
252
+ backend: nccl
253
+ port: 29500
254
+ dist: True
255
+ ]
256
+ load_networks_only: False
257
+ exp_name: 38_continue
258
+ name: 38_continue
259
+ dist: True
260
+ rank: 0
261
+ world_size: 6
262
+ auto_resume: False
263
+ is_train: True
264
+ root_path: /data/kazanplova/latent_vae_upscale_train
265
+
266
+ 2025-11-04 14:08:57,925 INFO: Use wandb logger with id=1wgd5xhu; project=Swin2SR-Latent-SR.
267
+ 2025-11-04 14:09:12,328 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
268
+ 2025-11-04 14:09:12,329 INFO: Training statistics:
269
+ Number of train images: 4858507
270
+ Dataset enlarge ratio: 1
271
+ Batch size per gpu: 8
272
+ World size (gpu number): 6
273
+ Steps per epoch: 101219
274
+ Configured training steps: 125000
275
+ Approximate epochs to cover: 2.
276
+ 2025-11-04 14:09:12,333 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
277
+ 2025-11-04 14:09:12,333 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
278
+ 2025-11-04 14:09:12,335 INFO: Enabled find_unused_parameters=True for multi-head training overrides.
279
+ 2025-11-04 14:09:12,837 INFO: Network [SwinIRMultiHead] is created.
280
+ 2025-11-04 14:09:15,401 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
281
+ 2025-11-04 14:09:15,402 INFO: SwinIRMultiHead(
282
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
283
+ (patch_embed): PatchEmbed(
284
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
285
+ )
286
+ (patch_unembed): PatchUnEmbed()
287
+ (pos_drop): Dropout(p=0.0, inplace=False)
288
+ (layers): ModuleList(
289
+ (0): RSTB(
290
+ (residual_group): BasicLayer(
291
+ dim=360, input_resolution=(32, 32), depth=6
292
+ (blocks): ModuleList(
293
+ (0): SwinTransformerBlock(
294
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
295
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=360, window_size=(16, 16), num_heads=12
298
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=360, out_features=360, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): Identity()
305
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (1): SwinTransformerBlock(
314
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
315
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=360, window_size=(16, 16), num_heads=12
318
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=360, out_features=360, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (2): SwinTransformerBlock(
334
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
335
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=360, window_size=(16, 16), num_heads=12
338
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=360, out_features=360, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (3): SwinTransformerBlock(
354
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
355
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=360, window_size=(16, 16), num_heads=12
358
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=360, out_features=360, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (4): SwinTransformerBlock(
374
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
375
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=360, window_size=(16, 16), num_heads=12
378
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=360, out_features=360, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ (5): SwinTransformerBlock(
394
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
395
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
396
+ (attn): WindowAttention(
397
+ dim=360, window_size=(16, 16), num_heads=12
398
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
399
+ (attn_drop): Dropout(p=0.0, inplace=False)
400
+ (proj): Linear(in_features=360, out_features=360, bias=True)
401
+ (proj_drop): Dropout(p=0.0, inplace=False)
402
+ (softmax): Softmax(dim=-1)
403
+ )
404
+ (drop_path): DropPath()
405
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
406
+ (mlp): Mlp(
407
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
408
+ (act): GELU(approximate='none')
409
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
410
+ (drop): Dropout(p=0.0, inplace=False)
411
+ )
412
+ )
413
+ )
414
+ )
415
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
416
+ (patch_embed): PatchEmbed()
417
+ (patch_unembed): PatchUnEmbed()
418
+ )
419
+ (1-5): 5 x RSTB(
420
+ (residual_group): BasicLayer(
421
+ dim=360, input_resolution=(32, 32), depth=6
422
+ (blocks): ModuleList(
423
+ (0): SwinTransformerBlock(
424
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
425
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=360, window_size=(16, 16), num_heads=12
428
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=360, out_features=360, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (1): SwinTransformerBlock(
444
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
445
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=360, window_size=(16, 16), num_heads=12
448
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=360, out_features=360, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (2): SwinTransformerBlock(
464
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
465
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=360, window_size=(16, 16), num_heads=12
468
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=360, out_features=360, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (3): SwinTransformerBlock(
484
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
485
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=360, window_size=(16, 16), num_heads=12
488
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=360, out_features=360, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (4): SwinTransformerBlock(
504
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
505
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=360, window_size=(16, 16), num_heads=12
508
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=360, out_features=360, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ (5): SwinTransformerBlock(
524
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
525
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
526
+ (attn): WindowAttention(
527
+ dim=360, window_size=(16, 16), num_heads=12
528
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
529
+ (attn_drop): Dropout(p=0.0, inplace=False)
530
+ (proj): Linear(in_features=360, out_features=360, bias=True)
531
+ (proj_drop): Dropout(p=0.0, inplace=False)
532
+ (softmax): Softmax(dim=-1)
533
+ )
534
+ (drop_path): DropPath()
535
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
536
+ (mlp): Mlp(
537
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
538
+ (act): GELU(approximate='none')
539
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
540
+ (drop): Dropout(p=0.0, inplace=False)
541
+ )
542
+ )
543
+ )
544
+ )
545
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
546
+ (patch_embed): PatchEmbed()
547
+ (patch_unembed): PatchUnEmbed()
548
+ )
549
+ )
550
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
551
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
552
+ (heads): ModuleDict(
553
+ (x2): _SwinIRPixelShuffleHead(
554
+ (conv_before): Sequential(
555
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
557
+ )
558
+ (upsample): Upsample(
559
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): PixelShuffle(upscale_factor=2)
561
+ )
562
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ )
564
+ (x4): _SwinIRPixelShuffleHead(
565
+ (conv_before): Sequential(
566
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
568
+ )
569
+ (upsample): Upsample(
570
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): PixelShuffle(upscale_factor=2)
572
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
573
+ (3): PixelShuffle(upscale_factor=2)
574
+ )
575
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
576
+ )
577
+ )
578
+ )
579
+ 2025-11-04 14:09:16,316 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
580
+ 2025-11-04 14:09:16,370 INFO: Use EMA with decay: 0.999
581
+ 2025-11-04 14:09:16,820 INFO: Network [SwinIRMultiHead] is created.
582
+ 2025-11-04 14:09:17,005 INFO: Loading: params_ema does not exist, use params.
583
+ 2025-11-04 14:09:17,006 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 14:09:17,059 INFO: Loss [Eagle_Loss] is created.
585
+ 2025-11-04 14:09:17,060 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
586
+ 2025-11-04 14:09:17,061 INFO: Loss [L1Loss] is created.
587
+ 2025-11-04 14:09:17,062 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
588
+ 2025-11-04 14:09:17,062 INFO: Loss [FFTFrequencyLoss] is created.
589
+ 2025-11-04 14:09:17,063 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
590
+ 2025-11-04 14:09:17,064 INFO: Loss [Eagle_Loss] is created.
591
+ 2025-11-04 14:09:17,065 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
592
+ 2025-11-04 14:09:17,066 INFO: Loss [L1Loss] is created.
593
+ 2025-11-04 14:09:17,067 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
594
+ 2025-11-04 14:09:17,068 INFO: Loss [FFTFrequencyLoss] is created.
595
+ 2025-11-04 14:09:17,069 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
596
+ 2025-11-04 14:09:17,071 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
597
+ 2025-11-04 14:09:17,072 INFO: Model [SwinIRLatentModelMultiHead] is created.
598
+ 2025-11-04 14:10:50,927 INFO: Start training from epoch: 0, step: 0
599
+ 2025-11-04 14:10:52,970 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
600
+ 2025-11-04 14:13:04,206 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 16:52:32, time (data): 1.333 (0.014)] eagle_pixel_x2_opt: 4.0478e+00 l1_pixel_x2_opt: 3.5212e-02 fft_frequency_x2_opt: 3.2364e-02 eagle_pixel_x4_opt: 6.1842e+00 l1_pixel_x4_opt: 5.1870e-02 fft_frequency_x4_opt: 4.4050e-02
601
+ 2025-11-04 14:15:02,551 INFO: [38_co..][epoch: 0, step: 200, lr:(2.500e-04,)] [eta: 1 day, 16:56:02, time (data): 1.258 (0.007)] eagle_pixel_x2_opt: 4.6370e+00 l1_pixel_x2_opt: 3.7053e-02 fft_frequency_x2_opt: 3.3912e-02 eagle_pixel_x4_opt: 7.4606e+00 l1_pixel_x4_opt: 5.7464e-02 fft_frequency_x4_opt: 4.8318e-02
602
+ 2025-11-04 14:17:01,089 INFO: [38_co..][epoch: 0, step: 300, lr:(2.500e-04,)] [eta: 1 day, 16:57:13, time (data): 1.185 (0.000)] eagle_pixel_x2_opt: 4.4128e+00 l1_pixel_x2_opt: 3.5012e-02 fft_frequency_x2_opt: 3.2407e-02 eagle_pixel_x4_opt: 6.8814e+00 l1_pixel_x4_opt: 5.5703e-02 fft_frequency_x4_opt: 4.5544e-02
603
+ 2025-11-04 14:19:00,053 INFO: [38_co..][epoch: 0, step: 400, lr:(2.500e-04,)] [eta: 1 day, 16:59:03, time (data): 1.188 (0.000)] eagle_pixel_x2_opt: 4.7516e+00 l1_pixel_x2_opt: 3.6611e-02 fft_frequency_x2_opt: 3.4111e-02 eagle_pixel_x4_opt: 7.0534e+00 l1_pixel_x4_opt: 5.5126e-02 fft_frequency_x4_opt: 4.6474e-02
604
+ 2025-11-04 14:20:59,104 INFO: [38_co..][epoch: 0, step: 500, lr:(2.500e-04,)] [eta: 1 day, 16:59:43, time (data): 1.191 (0.000)] eagle_pixel_x2_opt: 4.3646e+00 l1_pixel_x2_opt: 3.3084e-02 fft_frequency_x2_opt: 3.0503e-02 eagle_pixel_x4_opt: 6.5304e+00 l1_pixel_x4_opt: 5.0555e-02 fft_frequency_x4_opt: 4.2839e-02
605
+ 2025-11-04 14:22:57,787 INFO: [38_co..][epoch: 0, step: 600, lr:(2.500e-04,)] [eta: 1 day, 16:58:13, time (data): 1.189 (0.000)] eagle_pixel_x2_opt: 4.4383e+00 l1_pixel_x2_opt: 3.3806e-02 fft_frequency_x2_opt: 3.1516e-02 eagle_pixel_x4_opt: 6.5080e+00 l1_pixel_x4_opt: 5.2778e-02 fft_frequency_x4_opt: 4.3677e-02
606
+ 2025-11-04 14:24:56,514 INFO: [38_co..][epoch: 0, step: 700, lr:(2.500e-04,)] [eta: 1 day, 16:56:43, time (data): 1.187 (0.000)] eagle_pixel_x2_opt: 4.0987e+00 l1_pixel_x2_opt: 3.5029e-02 fft_frequency_x2_opt: 3.1578e-02 eagle_pixel_x4_opt: 6.2405e+00 l1_pixel_x4_opt: 5.2738e-02 fft_frequency_x4_opt: 4.3796e-02
607
+ 2025-11-04 14:26:54,625 INFO: [38_co..][epoch: 0, step: 800, lr:(2.500e-04,)] [eta: 1 day, 16:53:31, time (data): 1.184 (0.000)] eagle_pixel_x2_opt: 4.4201e+00 l1_pixel_x2_opt: 3.7193e-02 fft_frequency_x2_opt: 3.4797e-02 eagle_pixel_x4_opt: 6.7722e+00 l1_pixel_x4_opt: 5.5728e-02 fft_frequency_x4_opt: 4.7275e-02
608
+ 2025-11-04 14:28:52,317 INFO: [38_co..][epoch: 0, step: 900, lr:(2.500e-04,)] [eta: 1 day, 16:49:37, time (data): 1.177 (0.000)] eagle_pixel_x2_opt: 4.2041e+00 l1_pixel_x2_opt: 3.5301e-02 fft_frequency_x2_opt: 3.2906e-02 eagle_pixel_x4_opt: 6.3120e+00 l1_pixel_x4_opt: 5.5019e-02 fft_frequency_x4_opt: 4.5312e-02
609
+ 2025-11-04 14:30:49,817 INFO: [38_co..][epoch: 0, step: 1,000, lr:(2.500e-04,)] [eta: 1 day, 16:45:43, time (data): 1.176 (0.000)] eagle_pixel_x2_opt: 3.4468e+00 l1_pixel_x2_opt: 2.9318e-02 fft_frequency_x2_opt: 2.7578e-02 eagle_pixel_x4_opt: 5.1700e+00 l1_pixel_x4_opt: 4.7038e-02 fft_frequency_x4_opt: 3.7929e-02
610
+ 2025-11-04 14:32:47,723 INFO: [38_co..][epoch: 0, step: 1,100, lr:(2.500e-04,)] [eta: 1 day, 16:42:55, time (data): 1.179 (0.000)] eagle_pixel_x2_opt: 3.2528e+00 l1_pixel_x2_opt: 2.9392e-02 fft_frequency_x2_opt: 2.6386e-02 eagle_pixel_x4_opt: 4.8193e+00 l1_pixel_x4_opt: 4.5272e-02 fft_frequency_x4_opt: 3.6452e-02
611
+ 2025-11-04 14:34:46,044 INFO: [38_co..][epoch: 0, step: 1,200, lr:(2.500e-04,)] [eta: 1 day, 16:40:59, time (data): 1.181 (0.000)] eagle_pixel_x2_opt: 3.6126e+00 l1_pixel_x2_opt: 3.3141e-02 fft_frequency_x2_opt: 2.8999e-02 eagle_pixel_x4_opt: 5.5263e+00 l1_pixel_x4_opt: 5.0832e-02 fft_frequency_x4_opt: 4.0940e-02
612
+ 2025-11-04 14:36:43,841 INFO: [38_co..][epoch: 0, step: 1,300, lr:(2.500e-04,)] [eta: 1 day, 16:38:12, time (data): 1.178 (0.000)] eagle_pixel_x2_opt: 4.1173e+00 l1_pixel_x2_opt: 3.1617e-02 fft_frequency_x2_opt: 2.8865e-02 eagle_pixel_x4_opt: 6.5544e+00 l1_pixel_x4_opt: 5.0085e-02 fft_frequency_x4_opt: 4.0899e-02
613
+ 2025-11-04 14:38:41,427 INFO: [38_co..][epoch: 0, step: 1,400, lr:(2.500e-04,)] [eta: 1 day, 16:35:14, time (data): 1.177 (0.000)] eagle_pixel_x2_opt: 3.9227e+00 l1_pixel_x2_opt: 3.4529e-02 fft_frequency_x2_opt: 3.1000e-02 eagle_pixel_x4_opt: 6.0294e+00 l1_pixel_x4_opt: 5.3412e-02 fft_frequency_x4_opt: 4.3645e-02
614
+ 2025-11-04 14:40:40,035 INFO: [38_co..][epoch: 0, step: 1,500, lr:(2.500e-04,)] [eta: 1 day, 16:33:48, time (data): 1.187 (0.000)] eagle_pixel_x2_opt: 4.4719e+00 l1_pixel_x2_opt: 3.7513e-02 fft_frequency_x2_opt: 3.4572e-02 eagle_pixel_x4_opt: 6.9855e+00 l1_pixel_x4_opt: 5.7395e-02 fft_frequency_x4_opt: 4.7756e-02
615
+ 2025-11-04 14:42:38,395 INFO: [38_co..][epoch: 0, step: 1,600, lr:(2.500e-04,)] [eta: 1 day, 16:31:59, time (data): 1.185 (0.000)] eagle_pixel_x2_opt: 3.8830e+00 l1_pixel_x2_opt: 3.2413e-02 fft_frequency_x2_opt: 2.9470e-02 eagle_pixel_x4_opt: 5.6264e+00 l1_pixel_x4_opt: 5.0683e-02 fft_frequency_x4_opt: 4.0469e-02
616
+ 2025-11-04 14:44:36,497 INFO: [38_co..][epoch: 0, step: 1,700, lr:(2.500e-04,)] [eta: 1 day, 16:29:50, time (data): 1.181 (0.000)] eagle_pixel_x2_opt: 4.5973e+00 l1_pixel_x2_opt: 3.6244e-02 fft_frequency_x2_opt: 3.2904e-02 eagle_pixel_x4_opt: 7.1571e+00 l1_pixel_x4_opt: 5.4271e-02 fft_frequency_x4_opt: 4.5142e-02
617
+ 2025-11-04 14:46:34,393 INFO: [38_co..][epoch: 0, step: 1,800, lr:(2.500e-04,)] [eta: 1 day, 16:27:28, time (data): 1.180 (0.000)] eagle_pixel_x2_opt: 3.7386e+00 l1_pixel_x2_opt: 3.0823e-02 fft_frequency_x2_opt: 2.7784e-02 eagle_pixel_x4_opt: 5.8103e+00 l1_pixel_x4_opt: 4.8842e-02 fft_frequency_x4_opt: 3.9464e-02
618
+ 2025-11-04 14:48:32,143 INFO: [38_co..][epoch: 0, step: 1,900, lr:(2.500e-04,)] [eta: 1 day, 16:24:59, time (data): 1.178 (0.000)] eagle_pixel_x2_opt: 3.5256e+00 l1_pixel_x2_opt: 3.0935e-02 fft_frequency_x2_opt: 2.6623e-02 eagle_pixel_x4_opt: 5.4437e+00 l1_pixel_x4_opt: 4.7190e-02 fft_frequency_x4_opt: 3.7659e-02
619
+ 2025-11-04 14:50:29,860 INFO: [38_co..][epoch: 0, step: 2,000, lr:(2.500e-04,)] [eta: 1 day, 16:22:32, time (data): 1.177 (0.000)] eagle_pixel_x2_opt: 4.7641e+00 l1_pixel_x2_opt: 3.4657e-02 fft_frequency_x2_opt: 3.2652e-02 eagle_pixel_x4_opt: 7.6179e+00 l1_pixel_x4_opt: 5.4961e-02 fft_frequency_x4_opt: 4.7113e-02
620
+ 2025-11-04 14:52:28,560 INFO: [38_co..][epoch: 0, step: 2,100, lr:(2.500e-04,)] [eta: 1 day, 16:21:04, time (data): 1.188 (0.000)] eagle_pixel_x2_opt: 3.7760e+00 l1_pixel_x2_opt: 2.8969e-02 fft_frequency_x2_opt: 2.8778e-02 eagle_pixel_x4_opt: 6.1315e+00 l1_pixel_x4_opt: 4.2914e-02 fft_frequency_x4_opt: 3.9965e-02
621
+ 2025-11-04 14:54:28,277 INFO: [38_co..][epoch: 0, step: 2,200, lr:(2.500e-04,)] [eta: 1 day, 16:20:31, time (data): 1.193 (0.000)] eagle_pixel_x2_opt: 4.9532e+00 l1_pixel_x2_opt: 3.8613e-02 fft_frequency_x2_opt: 3.8673e-02 eagle_pixel_x4_opt: 7.2591e+00 l1_pixel_x4_opt: 5.6348e-02 fft_frequency_x4_opt: 5.1948e-02
04_11_2025/38_continue_archived_20251104_152426/basicsr_options.yaml ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:00:11 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: 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
+ path:
96
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
97
+ strict_load_g: true
98
+ resume_state: null
99
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
100
+ compile:
101
+ enabled: false
102
+ mode: max-autotune
103
+ dynamic: true
104
+ fullgraph: false
105
+ backend: null
106
+ train:
107
+ ema_decay: 0.999
108
+ head_inputs:
109
+ x2:
110
+ lq: 256
111
+ gt: 512
112
+ x4:
113
+ lq: 128
114
+ gt: 512
115
+ optim_g:
116
+ type: Adam
117
+ lr: 0.00025
118
+ weight_decay: 0
119
+ betas:
120
+ - 0.9
121
+ - 0.99
122
+ grad_clip:
123
+ enabled: true
124
+ generator:
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ scheduler:
129
+ type: MultiStepLR
130
+ milestones:
131
+ - 62500
132
+ - 93750
133
+ - 112500
134
+ gamma: 0.5
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ l1_pixel_x2_opt:
146
+ type: L1Loss
147
+ loss_weight: 10.0
148
+ reduction: mean
149
+ space: pixel
150
+ target: x2
151
+ fft_frequency_x2_opt:
152
+ type: FFTFrequencyLoss
153
+ loss_weight: 1.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ norm: ortho
158
+ use_log_amplitude: false
159
+ alpha: 0.0
160
+ normalize_weight: true
161
+ eps: 1e-8
162
+ eagle_pixel_x4_opt:
163
+ type: Eagle_Loss
164
+ loss_weight: 5.0e-05
165
+ reduction: mean
166
+ space: pixel
167
+ patch_size: 3
168
+ cutoff: 0.5
169
+ target: x4
170
+ l1_pixel_x4_opt:
171
+ type: L1Loss
172
+ loss_weight: 10.0
173
+ reduction: mean
174
+ space: pixel
175
+ target: x4
176
+ fft_frequency_x4_opt:
177
+ type: FFTFrequencyLoss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ norm: ortho
183
+ use_log_amplitude: false
184
+ alpha: 0.0
185
+ normalize_weight: true
186
+ eps: 1e-8
187
+ val:
188
+ val_freq: 5000
189
+ save_img: true
190
+ head_evals:
191
+ x2:
192
+ save_img: true
193
+ label: val_x2
194
+ val_sizes:
195
+ lq: 512
196
+ gt: 1024
197
+ metrics:
198
+ l1_latent:
199
+ type: L1Loss
200
+ space: latent
201
+ pixel_psnr_pt:
202
+ type: calculate_psnr_pt
203
+ space: pixel
204
+ crop_border: 2
205
+ test_y_channel: false
206
+ x4:
207
+ save_img: true
208
+ label: val_x4
209
+ val_sizes:
210
+ lq: 256
211
+ gt: 1024
212
+ metrics:
213
+ l1_latent:
214
+ type: L1Loss
215
+ space: latent
216
+ l2_latent:
217
+ type: MSELoss
218
+ space: latent
219
+ pixel_psnr_pt:
220
+ type: calculate_psnr_pt
221
+ space: pixel
222
+ crop_border: 2
223
+ test_y_channel: false
224
+ logger:
225
+ print_freq: 100
226
+ save_checkpoint_freq: 5000
227
+ use_tb_logger: true
228
+ wandb:
229
+ project: Swin2SR-Latent-SR
230
+ entity: kazanplova-it-more
231
+ resume_id: null
232
+ max_val_images: 10
233
+ dist_params:
234
+ backend: nccl
235
+ port: 29500
236
+ dist: true
237
+ load_networks_only: false
238
+ exp_name: 38_continue
239
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_152426/train_38_continue_20251104_150011.log ADDED
@@ -0,0 +1,600 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:00:11,246 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-04 15:00:11,247 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
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: 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
+ path:[
84
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
85
+ strict_load_g: True
86
+ resume_state: None
87
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
88
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
89
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
90
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
91
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
92
+ ]
93
+ compile:[
94
+ enabled: False
95
+ mode: max-autotune
96
+ dynamic: True
97
+ fullgraph: False
98
+ backend: None
99
+ ]
100
+ train:[
101
+ ema_decay: 0.999
102
+ head_inputs:[
103
+ x2:[
104
+ lq: 256
105
+ gt: 512
106
+ ]
107
+ x4:[
108
+ lq: 128
109
+ gt: 512
110
+ ]
111
+ ]
112
+ optim_g:[
113
+ type: Adam
114
+ lr: 0.00025
115
+ weight_decay: 0
116
+ betas: [0.9, 0.99]
117
+ ]
118
+ grad_clip:[
119
+ enabled: True
120
+ generator:[
121
+ type: norm
122
+ max_norm: 0.4
123
+ norm_type: 2.0
124
+ ]
125
+ ]
126
+ scheduler:[
127
+ type: MultiStepLR
128
+ milestones: [62500, 93750, 112500]
129
+ gamma: 0.5
130
+ ]
131
+ total_steps: 125000
132
+ warmup_iter: -1
133
+ eagle_pixel_x2_opt:[
134
+ type: Eagle_Loss
135
+ loss_weight: 2.5e-05
136
+ reduction: mean
137
+ space: pixel
138
+ patch_size: 3
139
+ cutoff: 0.5
140
+ target: x2
141
+ ]
142
+ l1_pixel_x2_opt:[
143
+ type: L1Loss
144
+ loss_weight: 10.0
145
+ reduction: mean
146
+ space: pixel
147
+ target: x2
148
+ ]
149
+ fft_frequency_x2_opt:[
150
+ type: FFTFrequencyLoss
151
+ loss_weight: 1.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ norm: ortho
156
+ use_log_amplitude: False
157
+ alpha: 0.0
158
+ normalize_weight: True
159
+ eps: 1e-8
160
+ ]
161
+ eagle_pixel_x4_opt:[
162
+ type: Eagle_Loss
163
+ loss_weight: 5e-05
164
+ reduction: mean
165
+ space: pixel
166
+ patch_size: 3
167
+ cutoff: 0.5
168
+ target: x4
169
+ ]
170
+ l1_pixel_x4_opt:[
171
+ type: L1Loss
172
+ loss_weight: 10.0
173
+ reduction: mean
174
+ space: pixel
175
+ target: x4
176
+ ]
177
+ fft_frequency_x4_opt:[
178
+ type: FFTFrequencyLoss
179
+ loss_weight: 1.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ norm: ortho
184
+ use_log_amplitude: False
185
+ alpha: 0.0
186
+ normalize_weight: True
187
+ eps: 1e-8
188
+ ]
189
+ ]
190
+ val:[
191
+ val_freq: 5000
192
+ save_img: True
193
+ head_evals:[
194
+ x2:[
195
+ save_img: True
196
+ label: val_x2
197
+ val_sizes:[
198
+ lq: 512
199
+ gt: 1024
200
+ ]
201
+ metrics:[
202
+ l1_latent:[
203
+ type: L1Loss
204
+ space: latent
205
+ ]
206
+ pixel_psnr_pt:[
207
+ type: calculate_psnr_pt
208
+ space: pixel
209
+ crop_border: 2
210
+ test_y_channel: False
211
+ ]
212
+ ]
213
+ ]
214
+ x4:[
215
+ save_img: True
216
+ label: val_x4
217
+ val_sizes:[
218
+ lq: 256
219
+ gt: 1024
220
+ ]
221
+ metrics:[
222
+ l1_latent:[
223
+ type: L1Loss
224
+ space: latent
225
+ ]
226
+ l2_latent:[
227
+ type: MSELoss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ ]
239
+ ]
240
+ logger:[
241
+ print_freq: 100
242
+ save_checkpoint_freq: 5000
243
+ use_tb_logger: True
244
+ wandb:[
245
+ project: Swin2SR-Latent-SR
246
+ entity: kazanplova-it-more
247
+ resume_id: None
248
+ max_val_images: 10
249
+ ]
250
+ ]
251
+ dist_params:[
252
+ backend: nccl
253
+ port: 29500
254
+ dist: True
255
+ ]
256
+ load_networks_only: False
257
+ exp_name: 38_continue
258
+ name: 38_continue
259
+ dist: True
260
+ rank: 0
261
+ world_size: 6
262
+ auto_resume: False
263
+ is_train: True
264
+ root_path: /data/kazanplova/latent_vae_upscale_train
265
+
266
+ 2025-11-04 15:00:13,050 INFO: Use wandb logger with id=08ecm9q0; project=Swin2SR-Latent-SR.
267
+ 2025-11-04 15:00:27,238 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
268
+ 2025-11-04 15:00:27,240 INFO: Training statistics:
269
+ Number of train images: 4858507
270
+ Dataset enlarge ratio: 1
271
+ Batch size per gpu: 8
272
+ World size (gpu number): 6
273
+ Steps per epoch: 101219
274
+ Configured training steps: 125000
275
+ Approximate epochs to cover: 2.
276
+ 2025-11-04 15:00:27,243 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
277
+ 2025-11-04 15:00:27,243 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
278
+ 2025-11-04 15:00:27,244 INFO: Enabled find_unused_parameters=True for multi-head training overrides.
279
+ 2025-11-04 15:00:27,722 INFO: Network [SwinIRMultiHead] is created.
280
+ 2025-11-04 15:00:29,704 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
281
+ 2025-11-04 15:00:29,705 INFO: SwinIRMultiHead(
282
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
283
+ (patch_embed): PatchEmbed(
284
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
285
+ )
286
+ (patch_unembed): PatchUnEmbed()
287
+ (pos_drop): Dropout(p=0.0, inplace=False)
288
+ (layers): ModuleList(
289
+ (0): RSTB(
290
+ (residual_group): BasicLayer(
291
+ dim=360, input_resolution=(32, 32), depth=6
292
+ (blocks): ModuleList(
293
+ (0): SwinTransformerBlock(
294
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
295
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
296
+ (attn): WindowAttention(
297
+ dim=360, window_size=(16, 16), num_heads=12
298
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
299
+ (attn_drop): Dropout(p=0.0, inplace=False)
300
+ (proj): Linear(in_features=360, out_features=360, bias=True)
301
+ (proj_drop): Dropout(p=0.0, inplace=False)
302
+ (softmax): Softmax(dim=-1)
303
+ )
304
+ (drop_path): Identity()
305
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
306
+ (mlp): Mlp(
307
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
308
+ (act): GELU(approximate='none')
309
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
310
+ (drop): Dropout(p=0.0, inplace=False)
311
+ )
312
+ )
313
+ (1): SwinTransformerBlock(
314
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
315
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
316
+ (attn): WindowAttention(
317
+ dim=360, window_size=(16, 16), num_heads=12
318
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
319
+ (attn_drop): Dropout(p=0.0, inplace=False)
320
+ (proj): Linear(in_features=360, out_features=360, bias=True)
321
+ (proj_drop): Dropout(p=0.0, inplace=False)
322
+ (softmax): Softmax(dim=-1)
323
+ )
324
+ (drop_path): DropPath()
325
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
326
+ (mlp): Mlp(
327
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
328
+ (act): GELU(approximate='none')
329
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
330
+ (drop): Dropout(p=0.0, inplace=False)
331
+ )
332
+ )
333
+ (2): SwinTransformerBlock(
334
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
335
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
336
+ (attn): WindowAttention(
337
+ dim=360, window_size=(16, 16), num_heads=12
338
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
339
+ (attn_drop): Dropout(p=0.0, inplace=False)
340
+ (proj): Linear(in_features=360, out_features=360, bias=True)
341
+ (proj_drop): Dropout(p=0.0, inplace=False)
342
+ (softmax): Softmax(dim=-1)
343
+ )
344
+ (drop_path): DropPath()
345
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
346
+ (mlp): Mlp(
347
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
348
+ (act): GELU(approximate='none')
349
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
350
+ (drop): Dropout(p=0.0, inplace=False)
351
+ )
352
+ )
353
+ (3): SwinTransformerBlock(
354
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
355
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
356
+ (attn): WindowAttention(
357
+ dim=360, window_size=(16, 16), num_heads=12
358
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
359
+ (attn_drop): Dropout(p=0.0, inplace=False)
360
+ (proj): Linear(in_features=360, out_features=360, bias=True)
361
+ (proj_drop): Dropout(p=0.0, inplace=False)
362
+ (softmax): Softmax(dim=-1)
363
+ )
364
+ (drop_path): DropPath()
365
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
366
+ (mlp): Mlp(
367
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
368
+ (act): GELU(approximate='none')
369
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
370
+ (drop): Dropout(p=0.0, inplace=False)
371
+ )
372
+ )
373
+ (4): SwinTransformerBlock(
374
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
375
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
376
+ (attn): WindowAttention(
377
+ dim=360, window_size=(16, 16), num_heads=12
378
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
379
+ (attn_drop): Dropout(p=0.0, inplace=False)
380
+ (proj): Linear(in_features=360, out_features=360, bias=True)
381
+ (proj_drop): Dropout(p=0.0, inplace=False)
382
+ (softmax): Softmax(dim=-1)
383
+ )
384
+ (drop_path): DropPath()
385
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
386
+ (mlp): Mlp(
387
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
388
+ (act): GELU(approximate='none')
389
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
390
+ (drop): Dropout(p=0.0, inplace=False)
391
+ )
392
+ )
393
+ (5): SwinTransformerBlock(
394
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
395
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
396
+ (attn): WindowAttention(
397
+ dim=360, window_size=(16, 16), num_heads=12
398
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
399
+ (attn_drop): Dropout(p=0.0, inplace=False)
400
+ (proj): Linear(in_features=360, out_features=360, bias=True)
401
+ (proj_drop): Dropout(p=0.0, inplace=False)
402
+ (softmax): Softmax(dim=-1)
403
+ )
404
+ (drop_path): DropPath()
405
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
406
+ (mlp): Mlp(
407
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
408
+ (act): GELU(approximate='none')
409
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
410
+ (drop): Dropout(p=0.0, inplace=False)
411
+ )
412
+ )
413
+ )
414
+ )
415
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
416
+ (patch_embed): PatchEmbed()
417
+ (patch_unembed): PatchUnEmbed()
418
+ )
419
+ (1-5): 5 x RSTB(
420
+ (residual_group): BasicLayer(
421
+ dim=360, input_resolution=(32, 32), depth=6
422
+ (blocks): ModuleList(
423
+ (0): SwinTransformerBlock(
424
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
425
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
426
+ (attn): WindowAttention(
427
+ dim=360, window_size=(16, 16), num_heads=12
428
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
429
+ (attn_drop): Dropout(p=0.0, inplace=False)
430
+ (proj): Linear(in_features=360, out_features=360, bias=True)
431
+ (proj_drop): Dropout(p=0.0, inplace=False)
432
+ (softmax): Softmax(dim=-1)
433
+ )
434
+ (drop_path): DropPath()
435
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
436
+ (mlp): Mlp(
437
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
438
+ (act): GELU(approximate='none')
439
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
440
+ (drop): Dropout(p=0.0, inplace=False)
441
+ )
442
+ )
443
+ (1): SwinTransformerBlock(
444
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
445
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
446
+ (attn): WindowAttention(
447
+ dim=360, window_size=(16, 16), num_heads=12
448
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
449
+ (attn_drop): Dropout(p=0.0, inplace=False)
450
+ (proj): Linear(in_features=360, out_features=360, bias=True)
451
+ (proj_drop): Dropout(p=0.0, inplace=False)
452
+ (softmax): Softmax(dim=-1)
453
+ )
454
+ (drop_path): DropPath()
455
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
456
+ (mlp): Mlp(
457
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
458
+ (act): GELU(approximate='none')
459
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
460
+ (drop): Dropout(p=0.0, inplace=False)
461
+ )
462
+ )
463
+ (2): SwinTransformerBlock(
464
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
465
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
466
+ (attn): WindowAttention(
467
+ dim=360, window_size=(16, 16), num_heads=12
468
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
469
+ (attn_drop): Dropout(p=0.0, inplace=False)
470
+ (proj): Linear(in_features=360, out_features=360, bias=True)
471
+ (proj_drop): Dropout(p=0.0, inplace=False)
472
+ (softmax): Softmax(dim=-1)
473
+ )
474
+ (drop_path): DropPath()
475
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
476
+ (mlp): Mlp(
477
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
478
+ (act): GELU(approximate='none')
479
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
480
+ (drop): Dropout(p=0.0, inplace=False)
481
+ )
482
+ )
483
+ (3): SwinTransformerBlock(
484
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
485
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
486
+ (attn): WindowAttention(
487
+ dim=360, window_size=(16, 16), num_heads=12
488
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
489
+ (attn_drop): Dropout(p=0.0, inplace=False)
490
+ (proj): Linear(in_features=360, out_features=360, bias=True)
491
+ (proj_drop): Dropout(p=0.0, inplace=False)
492
+ (softmax): Softmax(dim=-1)
493
+ )
494
+ (drop_path): DropPath()
495
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
496
+ (mlp): Mlp(
497
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
498
+ (act): GELU(approximate='none')
499
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
500
+ (drop): Dropout(p=0.0, inplace=False)
501
+ )
502
+ )
503
+ (4): SwinTransformerBlock(
504
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
505
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
506
+ (attn): WindowAttention(
507
+ dim=360, window_size=(16, 16), num_heads=12
508
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
509
+ (attn_drop): Dropout(p=0.0, inplace=False)
510
+ (proj): Linear(in_features=360, out_features=360, bias=True)
511
+ (proj_drop): Dropout(p=0.0, inplace=False)
512
+ (softmax): Softmax(dim=-1)
513
+ )
514
+ (drop_path): DropPath()
515
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
516
+ (mlp): Mlp(
517
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
518
+ (act): GELU(approximate='none')
519
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
520
+ (drop): Dropout(p=0.0, inplace=False)
521
+ )
522
+ )
523
+ (5): SwinTransformerBlock(
524
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
525
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
526
+ (attn): WindowAttention(
527
+ dim=360, window_size=(16, 16), num_heads=12
528
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
529
+ (attn_drop): Dropout(p=0.0, inplace=False)
530
+ (proj): Linear(in_features=360, out_features=360, bias=True)
531
+ (proj_drop): Dropout(p=0.0, inplace=False)
532
+ (softmax): Softmax(dim=-1)
533
+ )
534
+ (drop_path): DropPath()
535
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
536
+ (mlp): Mlp(
537
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
538
+ (act): GELU(approximate='none')
539
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
540
+ (drop): Dropout(p=0.0, inplace=False)
541
+ )
542
+ )
543
+ )
544
+ )
545
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
546
+ (patch_embed): PatchEmbed()
547
+ (patch_unembed): PatchUnEmbed()
548
+ )
549
+ )
550
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
551
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
552
+ (heads): ModuleDict(
553
+ (x2): _SwinIRPixelShuffleHead(
554
+ (conv_before): Sequential(
555
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
557
+ )
558
+ (upsample): Upsample(
559
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): PixelShuffle(upscale_factor=2)
561
+ )
562
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ )
564
+ (x4): _SwinIRPixelShuffleHead(
565
+ (conv_before): Sequential(
566
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
568
+ )
569
+ (upsample): Upsample(
570
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): PixelShuffle(upscale_factor=2)
572
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
573
+ (3): PixelShuffle(upscale_factor=2)
574
+ )
575
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
576
+ )
577
+ )
578
+ )
579
+ 2025-11-04 15:00:31,019 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
580
+ 2025-11-04 15:00:31,072 INFO: Use EMA with decay: 0.999
581
+ 2025-11-04 15:00:31,482 INFO: Network [SwinIRMultiHead] is created.
582
+ 2025-11-04 15:00:31,711 INFO: Loading: params_ema does not exist, use params.
583
+ 2025-11-04 15:00:31,712 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 15:00:31,772 INFO: Loss [Eagle_Loss] is created.
585
+ 2025-11-04 15:00:31,773 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
586
+ 2025-11-04 15:00:31,773 INFO: Loss [L1Loss] is created.
587
+ 2025-11-04 15:00:31,774 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
588
+ 2025-11-04 15:00:31,774 INFO: Loss [FFTFrequencyLoss] is created.
589
+ 2025-11-04 15:00:31,774 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
590
+ 2025-11-04 15:00:31,775 INFO: Loss [Eagle_Loss] is created.
591
+ 2025-11-04 15:00:31,775 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
592
+ 2025-11-04 15:00:31,775 INFO: Loss [L1Loss] is created.
593
+ 2025-11-04 15:00:31,775 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
594
+ 2025-11-04 15:00:31,776 INFO: Loss [FFTFrequencyLoss] is created.
595
+ 2025-11-04 15:00:31,776 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
596
+ 2025-11-04 15:00:31,778 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
597
+ 2025-11-04 15:00:31,778 INFO: Model [SwinIRLatentModelMultiHead] is created.
598
+ 2025-11-04 15:01:51,001 INFO: Start training from epoch: 0, step: 0
599
+ 2025-11-04 15:01:52,913 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
600
+ 2025-11-04 15:04:01,417 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 16:08:36, time (data): 1.304 (0.013)] eagle_pixel_x2_opt: 4.0388e+00 l1_pixel_x2_opt: 3.5721e-02 fft_frequency_x2_opt: 3.2387e-02 eagle_pixel_x4_opt: 6.2283e+00 l1_pixel_x4_opt: 5.1576e-02 fft_frequency_x4_opt: 4.4294e-02
04_11_2025/38_continue_archived_20251104_152934/basicsr_options.yaml ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:24:26 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ val:
46
+ name: sdxk_120_1024x1024
47
+ type: MultiScaleLatentCacheDataset
48
+ scales:
49
+ - 256
50
+ - 512
51
+ - 1024
52
+ cache_dirs:
53
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
54
+ vae_names:
55
+ - flux_vae
56
+ phase: val
57
+ io_backend:
58
+ type: disk
59
+ scale: 4
60
+ mean: null
61
+ std: null
62
+ batch_size_per_gpu: 16
63
+ num_worker_per_gpu: 4
64
+ pin_memory: true
65
+ network_g:
66
+ type: SwinIRMultiHead
67
+ in_chans: 16
68
+ img_size: 32
69
+ window_size: 16
70
+ img_range: 1.0
71
+ depths:
72
+ - 6
73
+ - 6
74
+ - 6
75
+ - 6
76
+ - 6
77
+ - 6
78
+ embed_dim: 360
79
+ num_heads:
80
+ - 12
81
+ - 12
82
+ - 12
83
+ - 12
84
+ - 12
85
+ - 12
86
+ mlp_ratio: 2
87
+ resi_connection: 1conv
88
+ primary_head: x4
89
+ head_num_feat: 256
90
+ heads:
91
+ - name: x2
92
+ scale: 2
93
+ out_chans: 16
94
+ - name: x4
95
+ scale: 4
96
+ out_chans: 16
97
+ primary: true
98
+ path:
99
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
100
+ strict_load_g: true
101
+ resume_state: null
102
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
103
+ compile:
104
+ enabled: false
105
+ mode: max-autotune
106
+ dynamic: true
107
+ fullgraph: false
108
+ backend: null
109
+ train:
110
+ ema_decay: 0.999
111
+ head_inputs:
112
+ x2:
113
+ lq: 256
114
+ gt: 512
115
+ x4:
116
+ lq: 128
117
+ gt: 512
118
+ optim_g:
119
+ type: Adam
120
+ lr: 0.00025
121
+ weight_decay: 0
122
+ betas:
123
+ - 0.9
124
+ - 0.99
125
+ grad_clip:
126
+ enabled: true
127
+ generator:
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ scheduler:
132
+ type: MultiStepLR
133
+ milestones:
134
+ - 62500
135
+ - 93750
136
+ - 112500
137
+ gamma: 0.5
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ l1_pixel_x2_opt:
149
+ type: L1Loss
150
+ loss_weight: 10.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ fft_frequency_x2_opt:
155
+ type: FFTFrequencyLoss
156
+ loss_weight: 1.0
157
+ reduction: mean
158
+ space: pixel
159
+ target: x2
160
+ norm: ortho
161
+ use_log_amplitude: false
162
+ alpha: 0.0
163
+ normalize_weight: true
164
+ eps: 1e-8
165
+ eagle_pixel_x4_opt:
166
+ type: Eagle_Loss
167
+ loss_weight: 5.0e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ l1_pixel_x4_opt:
174
+ type: L1Loss
175
+ loss_weight: 10.0
176
+ reduction: mean
177
+ space: pixel
178
+ target: x4
179
+ fft_frequency_x4_opt:
180
+ type: FFTFrequencyLoss
181
+ loss_weight: 1.0
182
+ reduction: mean
183
+ space: pixel
184
+ target: x4
185
+ norm: ortho
186
+ use_log_amplitude: false
187
+ alpha: 0.0
188
+ normalize_weight: true
189
+ eps: 1e-8
190
+ val:
191
+ val_freq: 5000
192
+ save_img: true
193
+ head_evals:
194
+ x2:
195
+ save_img: true
196
+ label: val_x2
197
+ val_sizes:
198
+ lq: 512
199
+ gt: 1024
200
+ metrics:
201
+ l1_latent:
202
+ type: L1Loss
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
+ x4:
210
+ save_img: true
211
+ label: val_x4
212
+ val_sizes:
213
+ lq: 256
214
+ gt: 1024
215
+ metrics:
216
+ l1_latent:
217
+ type: L1Loss
218
+ space: latent
219
+ l2_latent:
220
+ type: MSELoss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ logger:
228
+ print_freq: 100
229
+ save_checkpoint_freq: 5000
230
+ use_tb_logger: true
231
+ wandb:
232
+ project: Swin2SR-Latent-SR
233
+ entity: kazanplova-it-more
234
+ resume_id: null
235
+ max_val_images: 10
236
+ dist_params:
237
+ backend: nccl
238
+ port: 29500
239
+ dist: true
240
+ load_networks_only: false
241
+ exp_name: 38_continue
242
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_152934/train_38_continue_20251104_152426.log ADDED
@@ -0,0 +1,603 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:24:26,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-04 15:24:26,900 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ ]
54
+ val:[
55
+ name: sdxk_120_1024x1024
56
+ type: MultiScaleLatentCacheDataset
57
+ scales: [256, 512, 1024]
58
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
59
+ vae_names: ['flux_vae']
60
+ phase: val
61
+ io_backend:[
62
+ type: disk
63
+ ]
64
+ scale: 4
65
+ mean: None
66
+ std: None
67
+ batch_size_per_gpu: 16
68
+ num_worker_per_gpu: 4
69
+ pin_memory: True
70
+ ]
71
+ ]
72
+ network_g:[
73
+ type: SwinIRMultiHead
74
+ in_chans: 16
75
+ img_size: 32
76
+ window_size: 16
77
+ img_range: 1.0
78
+ depths: [6, 6, 6, 6, 6, 6]
79
+ embed_dim: 360
80
+ num_heads: [12, 12, 12, 12, 12, 12]
81
+ mlp_ratio: 2
82
+ resi_connection: 1conv
83
+ primary_head: x4
84
+ head_num_feat: 256
85
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
86
+ ]
87
+ path:[
88
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
89
+ strict_load_g: True
90
+ resume_state: None
91
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
92
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
93
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
94
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
96
+ ]
97
+ compile:[
98
+ enabled: False
99
+ mode: max-autotune
100
+ dynamic: True
101
+ fullgraph: False
102
+ backend: None
103
+ ]
104
+ train:[
105
+ ema_decay: 0.999
106
+ head_inputs:[
107
+ x2:[
108
+ lq: 256
109
+ gt: 512
110
+ ]
111
+ x4:[
112
+ lq: 128
113
+ gt: 512
114
+ ]
115
+ ]
116
+ optim_g:[
117
+ type: Adam
118
+ lr: 0.00025
119
+ weight_decay: 0
120
+ betas: [0.9, 0.99]
121
+ ]
122
+ grad_clip:[
123
+ enabled: True
124
+ generator:[
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ ]
129
+ ]
130
+ scheduler:[
131
+ type: MultiStepLR
132
+ milestones: [62500, 93750, 112500]
133
+ gamma: 0.5
134
+ ]
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:[
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ ]
146
+ l1_pixel_x2_opt:[
147
+ type: L1Loss
148
+ loss_weight: 10.0
149
+ reduction: mean
150
+ space: pixel
151
+ target: x2
152
+ ]
153
+ fft_frequency_x2_opt:[
154
+ type: FFTFrequencyLoss
155
+ loss_weight: 1.0
156
+ reduction: mean
157
+ space: pixel
158
+ target: x2
159
+ norm: ortho
160
+ use_log_amplitude: False
161
+ alpha: 0.0
162
+ normalize_weight: True
163
+ eps: 1e-8
164
+ ]
165
+ eagle_pixel_x4_opt:[
166
+ type: Eagle_Loss
167
+ loss_weight: 5e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ ]
174
+ l1_pixel_x4_opt:[
175
+ type: L1Loss
176
+ loss_weight: 10.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ ]
181
+ fft_frequency_x4_opt:[
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 1.0
184
+ reduction: mean
185
+ space: pixel
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: False
189
+ alpha: 0.0
190
+ normalize_weight: True
191
+ eps: 1e-8
192
+ ]
193
+ ]
194
+ val:[
195
+ val_freq: 5000
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
+ ]
205
+ metrics:[
206
+ l1_latent:[
207
+ type: L1Loss
208
+ space: latent
209
+ ]
210
+ pixel_psnr_pt:[
211
+ type: calculate_psnr_pt
212
+ space: pixel
213
+ crop_border: 2
214
+ test_y_channel: False
215
+ ]
216
+ ]
217
+ ]
218
+ x4:[
219
+ save_img: True
220
+ label: val_x4
221
+ val_sizes:[
222
+ lq: 256
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ l2_latent:[
231
+ type: MSELoss
232
+ space: latent
233
+ ]
234
+ pixel_psnr_pt:[
235
+ type: calculate_psnr_pt
236
+ space: pixel
237
+ crop_border: 2
238
+ test_y_channel: False
239
+ ]
240
+ ]
241
+ ]
242
+ ]
243
+ ]
244
+ logger:[
245
+ print_freq: 100
246
+ save_checkpoint_freq: 5000
247
+ use_tb_logger: True
248
+ wandb:[
249
+ project: Swin2SR-Latent-SR
250
+ entity: kazanplova-it-more
251
+ resume_id: None
252
+ max_val_images: 10
253
+ ]
254
+ ]
255
+ dist_params:[
256
+ backend: nccl
257
+ port: 29500
258
+ dist: True
259
+ ]
260
+ load_networks_only: False
261
+ exp_name: 38_continue
262
+ name: 38_continue
263
+ dist: True
264
+ rank: 0
265
+ world_size: 6
266
+ auto_resume: False
267
+ is_train: True
268
+ root_path: /data/kazanplova/latent_vae_upscale_train
269
+
270
+ 2025-11-04 15:24:28,543 INFO: Use wandb logger with id=bcpzdw2b; project=Swin2SR-Latent-SR.
271
+ 2025-11-04 15:24:42,032 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
272
+ 2025-11-04 15:24:42,033 INFO: Training statistics:
273
+ Number of train images: 4858507
274
+ Dataset enlarge ratio: 1
275
+ Batch size per gpu: 8
276
+ World size (gpu number): 6
277
+ Steps per epoch: 101219
278
+ Configured training steps: 125000
279
+ Approximate epochs to cover: 2.
280
+ 2025-11-04 15:24:42,037 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
281
+ 2025-11-04 15:24:42,037 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
282
+ 2025-11-04 15:24:42,039 INFO: Multi-head training overrides active with find_unused_parameters=False; skipping automatic enablement.
283
+ 2025-11-04 15:24:42,512 INFO: Network [SwinIRMultiHead] is created.
284
+ 2025-11-04 15:24:44,788 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
285
+ 2025-11-04 15:24:44,789 INFO: SwinIRMultiHead(
286
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
287
+ (patch_embed): PatchEmbed(
288
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
289
+ )
290
+ (patch_unembed): PatchUnEmbed()
291
+ (pos_drop): Dropout(p=0.0, inplace=False)
292
+ (layers): ModuleList(
293
+ (0): RSTB(
294
+ (residual_group): BasicLayer(
295
+ dim=360, input_resolution=(32, 32), depth=6
296
+ (blocks): ModuleList(
297
+ (0): SwinTransformerBlock(
298
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
299
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
300
+ (attn): WindowAttention(
301
+ dim=360, window_size=(16, 16), num_heads=12
302
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
303
+ (attn_drop): Dropout(p=0.0, inplace=False)
304
+ (proj): Linear(in_features=360, out_features=360, bias=True)
305
+ (proj_drop): Dropout(p=0.0, inplace=False)
306
+ (softmax): Softmax(dim=-1)
307
+ )
308
+ (drop_path): Identity()
309
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
310
+ (mlp): Mlp(
311
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
312
+ (act): GELU(approximate='none')
313
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
314
+ (drop): Dropout(p=0.0, inplace=False)
315
+ )
316
+ )
317
+ (1): SwinTransformerBlock(
318
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
319
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=360, window_size=(16, 16), num_heads=12
322
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=360, out_features=360, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): DropPath()
329
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (2): SwinTransformerBlock(
338
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
339
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=360, window_size=(16, 16), num_heads=12
342
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=360, out_features=360, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (3): SwinTransformerBlock(
358
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
359
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=360, window_size=(16, 16), num_heads=12
362
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=360, out_features=360, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (4): SwinTransformerBlock(
378
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
379
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=360, window_size=(16, 16), num_heads=12
382
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=360, out_features=360, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (5): SwinTransformerBlock(
398
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
399
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=360, window_size=(16, 16), num_heads=12
402
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=360, out_features=360, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ )
418
+ )
419
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
420
+ (patch_embed): PatchEmbed()
421
+ (patch_unembed): PatchUnEmbed()
422
+ )
423
+ (1-5): 5 x RSTB(
424
+ (residual_group): BasicLayer(
425
+ dim=360, input_resolution=(32, 32), depth=6
426
+ (blocks): ModuleList(
427
+ (0): SwinTransformerBlock(
428
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
429
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
430
+ (attn): WindowAttention(
431
+ dim=360, window_size=(16, 16), num_heads=12
432
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
433
+ (attn_drop): Dropout(p=0.0, inplace=False)
434
+ (proj): Linear(in_features=360, out_features=360, bias=True)
435
+ (proj_drop): Dropout(p=0.0, inplace=False)
436
+ (softmax): Softmax(dim=-1)
437
+ )
438
+ (drop_path): DropPath()
439
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
440
+ (mlp): Mlp(
441
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
442
+ (act): GELU(approximate='none')
443
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
444
+ (drop): Dropout(p=0.0, inplace=False)
445
+ )
446
+ )
447
+ (1): SwinTransformerBlock(
448
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
449
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=360, window_size=(16, 16), num_heads=12
452
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=360, out_features=360, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (2): SwinTransformerBlock(
468
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
469
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=360, window_size=(16, 16), num_heads=12
472
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=360, out_features=360, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (3): SwinTransformerBlock(
488
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
489
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=360, window_size=(16, 16), num_heads=12
492
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=360, out_features=360, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (4): SwinTransformerBlock(
508
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
509
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=360, window_size=(16, 16), num_heads=12
512
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=360, out_features=360, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (5): SwinTransformerBlock(
528
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
529
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=360, window_size=(16, 16), num_heads=12
532
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=360, out_features=360, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ )
548
+ )
549
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
550
+ (patch_embed): PatchEmbed()
551
+ (patch_unembed): PatchUnEmbed()
552
+ )
553
+ )
554
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
555
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (heads): ModuleDict(
557
+ (x2): _SwinIRPixelShuffleHead(
558
+ (conv_before): Sequential(
559
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
561
+ )
562
+ (upsample): Upsample(
563
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
564
+ (1): PixelShuffle(upscale_factor=2)
565
+ )
566
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ )
568
+ (x4): _SwinIRPixelShuffleHead(
569
+ (conv_before): Sequential(
570
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
572
+ )
573
+ (upsample): Upsample(
574
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (1): PixelShuffle(upscale_factor=2)
576
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
577
+ (3): PixelShuffle(upscale_factor=2)
578
+ )
579
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ )
581
+ )
582
+ )
583
+ 2025-11-04 15:24:44,917 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 15:24:44,968 INFO: Use EMA with decay: 0.999
585
+ 2025-11-04 15:24:45,373 INFO: Network [SwinIRMultiHead] is created.
586
+ 2025-11-04 15:24:45,544 INFO: Loading: params_ema does not exist, use params.
587
+ 2025-11-04 15:24:45,545 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
588
+ 2025-11-04 15:24:45,594 INFO: Loss [Eagle_Loss] is created.
589
+ 2025-11-04 15:24:45,595 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
590
+ 2025-11-04 15:24:45,596 INFO: Loss [L1Loss] is created.
591
+ 2025-11-04 15:24:45,596 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
592
+ 2025-11-04 15:24:45,597 INFO: Loss [FFTFrequencyLoss] is created.
593
+ 2025-11-04 15:24:45,598 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
594
+ 2025-11-04 15:24:45,599 INFO: Loss [Eagle_Loss] is created.
595
+ 2025-11-04 15:24:45,599 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
596
+ 2025-11-04 15:24:45,601 INFO: Loss [L1Loss] is created.
597
+ 2025-11-04 15:24:45,602 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
598
+ 2025-11-04 15:24:45,604 INFO: Loss [FFTFrequencyLoss] is created.
599
+ 2025-11-04 15:24:45,605 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
600
+ 2025-11-04 15:24:45,607 INFO: Precision configuration — train: bf16, eval: fp32
601
+ 2025-11-04 15:24:45,607 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
602
+ 2025-11-04 15:24:45,608 INFO: Model [SwinIRLatentModelMultiHead] is created.
603
+ 2025-11-04 15:26:03,370 INFO: Start training from epoch: 0, step: 0
04_11_2025/38_continue_archived_20251104_153443/basicsr_options.yaml ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:29:35 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ val:
46
+ name: sdxk_120_1024x1024
47
+ type: MultiScaleLatentCacheDataset
48
+ scales:
49
+ - 256
50
+ - 512
51
+ - 1024
52
+ cache_dirs:
53
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
54
+ vae_names:
55
+ - flux_vae
56
+ phase: val
57
+ io_backend:
58
+ type: disk
59
+ scale: 4
60
+ mean: null
61
+ std: null
62
+ batch_size_per_gpu: 16
63
+ num_worker_per_gpu: 4
64
+ pin_memory: true
65
+ network_g:
66
+ type: SwinIRMultiHead
67
+ in_chans: 16
68
+ img_size: 32
69
+ window_size: 16
70
+ img_range: 1.0
71
+ depths:
72
+ - 6
73
+ - 6
74
+ - 6
75
+ - 6
76
+ - 6
77
+ - 6
78
+ embed_dim: 360
79
+ num_heads:
80
+ - 12
81
+ - 12
82
+ - 12
83
+ - 12
84
+ - 12
85
+ - 12
86
+ mlp_ratio: 2
87
+ resi_connection: 1conv
88
+ primary_head: x4
89
+ head_num_feat: 256
90
+ heads:
91
+ - name: x2
92
+ scale: 2
93
+ out_chans: 16
94
+ - name: x4
95
+ scale: 4
96
+ out_chans: 16
97
+ primary: true
98
+ path:
99
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
100
+ strict_load_g: true
101
+ resume_state: null
102
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
103
+ compile:
104
+ enabled: false
105
+ mode: max-autotune
106
+ dynamic: true
107
+ fullgraph: false
108
+ backend: null
109
+ train:
110
+ ema_decay: 0.999
111
+ head_inputs:
112
+ x2:
113
+ lq: 256
114
+ gt: 512
115
+ x4:
116
+ lq: 128
117
+ gt: 512
118
+ optim_g:
119
+ type: Adam
120
+ lr: 0.00025
121
+ weight_decay: 0
122
+ betas:
123
+ - 0.9
124
+ - 0.99
125
+ grad_clip:
126
+ enabled: true
127
+ generator:
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ scheduler:
132
+ type: MultiStepLR
133
+ milestones:
134
+ - 62500
135
+ - 93750
136
+ - 112500
137
+ gamma: 0.5
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ l1_pixel_x2_opt:
149
+ type: L1Loss
150
+ loss_weight: 10.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ fft_frequency_x2_opt:
155
+ type: FFTFrequencyLoss
156
+ loss_weight: 1.0
157
+ reduction: mean
158
+ space: pixel
159
+ target: x2
160
+ norm: ortho
161
+ use_log_amplitude: false
162
+ alpha: 0.0
163
+ normalize_weight: true
164
+ eps: 1e-8
165
+ eagle_pixel_x4_opt:
166
+ type: Eagle_Loss
167
+ loss_weight: 5.0e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ l1_pixel_x4_opt:
174
+ type: L1Loss
175
+ loss_weight: 10.0
176
+ reduction: mean
177
+ space: pixel
178
+ target: x4
179
+ fft_frequency_x4_opt:
180
+ type: FFTFrequencyLoss
181
+ loss_weight: 1.0
182
+ reduction: mean
183
+ space: pixel
184
+ target: x4
185
+ norm: ortho
186
+ use_log_amplitude: false
187
+ alpha: 0.0
188
+ normalize_weight: true
189
+ eps: 1e-8
190
+ val:
191
+ val_freq: 5000
192
+ save_img: true
193
+ head_evals:
194
+ x2:
195
+ save_img: true
196
+ label: val_x2
197
+ val_sizes:
198
+ lq: 512
199
+ gt: 1024
200
+ metrics:
201
+ l1_latent:
202
+ type: L1Loss
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
+ x4:
210
+ save_img: true
211
+ label: val_x4
212
+ val_sizes:
213
+ lq: 256
214
+ gt: 1024
215
+ metrics:
216
+ l1_latent:
217
+ type: L1Loss
218
+ space: latent
219
+ l2_latent:
220
+ type: MSELoss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ logger:
228
+ print_freq: 100
229
+ save_checkpoint_freq: 5000
230
+ use_tb_logger: true
231
+ wandb:
232
+ project: Swin2SR-Latent-SR
233
+ entity: kazanplova-it-more
234
+ resume_id: null
235
+ max_val_images: 10
236
+ dist_params:
237
+ backend: nccl
238
+ port: 29500
239
+ dist: true
240
+ load_networks_only: false
241
+ exp_name: 38_continue
242
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_153443/train_38_continue_20251104_152935.log ADDED
@@ -0,0 +1,604 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:29:35,015 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-04 15:29:35,015 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ ]
54
+ val:[
55
+ name: sdxk_120_1024x1024
56
+ type: MultiScaleLatentCacheDataset
57
+ scales: [256, 512, 1024]
58
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
59
+ vae_names: ['flux_vae']
60
+ phase: val
61
+ io_backend:[
62
+ type: disk
63
+ ]
64
+ scale: 4
65
+ mean: None
66
+ std: None
67
+ batch_size_per_gpu: 16
68
+ num_worker_per_gpu: 4
69
+ pin_memory: True
70
+ ]
71
+ ]
72
+ network_g:[
73
+ type: SwinIRMultiHead
74
+ in_chans: 16
75
+ img_size: 32
76
+ window_size: 16
77
+ img_range: 1.0
78
+ depths: [6, 6, 6, 6, 6, 6]
79
+ embed_dim: 360
80
+ num_heads: [12, 12, 12, 12, 12, 12]
81
+ mlp_ratio: 2
82
+ resi_connection: 1conv
83
+ primary_head: x4
84
+ head_num_feat: 256
85
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
86
+ ]
87
+ path:[
88
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
89
+ strict_load_g: True
90
+ resume_state: None
91
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
92
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
93
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
94
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
96
+ ]
97
+ compile:[
98
+ enabled: False
99
+ mode: max-autotune
100
+ dynamic: True
101
+ fullgraph: False
102
+ backend: None
103
+ ]
104
+ train:[
105
+ ema_decay: 0.999
106
+ head_inputs:[
107
+ x2:[
108
+ lq: 256
109
+ gt: 512
110
+ ]
111
+ x4:[
112
+ lq: 128
113
+ gt: 512
114
+ ]
115
+ ]
116
+ optim_g:[
117
+ type: Adam
118
+ lr: 0.00025
119
+ weight_decay: 0
120
+ betas: [0.9, 0.99]
121
+ ]
122
+ grad_clip:[
123
+ enabled: True
124
+ generator:[
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ ]
129
+ ]
130
+ scheduler:[
131
+ type: MultiStepLR
132
+ milestones: [62500, 93750, 112500]
133
+ gamma: 0.5
134
+ ]
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:[
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ ]
146
+ l1_pixel_x2_opt:[
147
+ type: L1Loss
148
+ loss_weight: 10.0
149
+ reduction: mean
150
+ space: pixel
151
+ target: x2
152
+ ]
153
+ fft_frequency_x2_opt:[
154
+ type: FFTFrequencyLoss
155
+ loss_weight: 1.0
156
+ reduction: mean
157
+ space: pixel
158
+ target: x2
159
+ norm: ortho
160
+ use_log_amplitude: False
161
+ alpha: 0.0
162
+ normalize_weight: True
163
+ eps: 1e-8
164
+ ]
165
+ eagle_pixel_x4_opt:[
166
+ type: Eagle_Loss
167
+ loss_weight: 5e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ ]
174
+ l1_pixel_x4_opt:[
175
+ type: L1Loss
176
+ loss_weight: 10.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ ]
181
+ fft_frequency_x4_opt:[
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 1.0
184
+ reduction: mean
185
+ space: pixel
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: False
189
+ alpha: 0.0
190
+ normalize_weight: True
191
+ eps: 1e-8
192
+ ]
193
+ ]
194
+ val:[
195
+ val_freq: 5000
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
+ ]
205
+ metrics:[
206
+ l1_latent:[
207
+ type: L1Loss
208
+ space: latent
209
+ ]
210
+ pixel_psnr_pt:[
211
+ type: calculate_psnr_pt
212
+ space: pixel
213
+ crop_border: 2
214
+ test_y_channel: False
215
+ ]
216
+ ]
217
+ ]
218
+ x4:[
219
+ save_img: True
220
+ label: val_x4
221
+ val_sizes:[
222
+ lq: 256
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ l2_latent:[
231
+ type: MSELoss
232
+ space: latent
233
+ ]
234
+ pixel_psnr_pt:[
235
+ type: calculate_psnr_pt
236
+ space: pixel
237
+ crop_border: 2
238
+ test_y_channel: False
239
+ ]
240
+ ]
241
+ ]
242
+ ]
243
+ ]
244
+ logger:[
245
+ print_freq: 100
246
+ save_checkpoint_freq: 5000
247
+ use_tb_logger: True
248
+ wandb:[
249
+ project: Swin2SR-Latent-SR
250
+ entity: kazanplova-it-more
251
+ resume_id: None
252
+ max_val_images: 10
253
+ ]
254
+ ]
255
+ dist_params:[
256
+ backend: nccl
257
+ port: 29500
258
+ dist: True
259
+ ]
260
+ load_networks_only: False
261
+ exp_name: 38_continue
262
+ name: 38_continue
263
+ dist: True
264
+ rank: 0
265
+ world_size: 6
266
+ auto_resume: False
267
+ is_train: True
268
+ root_path: /data/kazanplova/latent_vae_upscale_train
269
+
270
+ 2025-11-04 15:29:36,858 INFO: Use wandb logger with id=1sjgogd9; project=Swin2SR-Latent-SR.
271
+ 2025-11-04 15:29:49,356 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
272
+ 2025-11-04 15:29:49,357 INFO: Training statistics:
273
+ Number of train images: 4858507
274
+ Dataset enlarge ratio: 1
275
+ Batch size per gpu: 8
276
+ World size (gpu number): 6
277
+ Steps per epoch: 101219
278
+ Configured training steps: 125000
279
+ Approximate epochs to cover: 2.
280
+ 2025-11-04 15:29:49,361 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
281
+ 2025-11-04 15:29:49,361 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
282
+ 2025-11-04 15:29:49,361 INFO: Multi-head training overrides active with find_unused_parameters=False; skipping automatic enablement.
283
+ 2025-11-04 15:29:49,799 INFO: Network [SwinIRMultiHead] is created.
284
+ 2025-11-04 15:29:51,965 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
285
+ 2025-11-04 15:29:51,966 INFO: SwinIRMultiHead(
286
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
287
+ (patch_embed): PatchEmbed(
288
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
289
+ )
290
+ (patch_unembed): PatchUnEmbed()
291
+ (pos_drop): Dropout(p=0.0, inplace=False)
292
+ (layers): ModuleList(
293
+ (0): RSTB(
294
+ (residual_group): BasicLayer(
295
+ dim=360, input_resolution=(32, 32), depth=6
296
+ (blocks): ModuleList(
297
+ (0): SwinTransformerBlock(
298
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
299
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
300
+ (attn): WindowAttention(
301
+ dim=360, window_size=(16, 16), num_heads=12
302
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
303
+ (attn_drop): Dropout(p=0.0, inplace=False)
304
+ (proj): Linear(in_features=360, out_features=360, bias=True)
305
+ (proj_drop): Dropout(p=0.0, inplace=False)
306
+ (softmax): Softmax(dim=-1)
307
+ )
308
+ (drop_path): Identity()
309
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
310
+ (mlp): Mlp(
311
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
312
+ (act): GELU(approximate='none')
313
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
314
+ (drop): Dropout(p=0.0, inplace=False)
315
+ )
316
+ )
317
+ (1): SwinTransformerBlock(
318
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
319
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=360, window_size=(16, 16), num_heads=12
322
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=360, out_features=360, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): DropPath()
329
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (2): SwinTransformerBlock(
338
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
339
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=360, window_size=(16, 16), num_heads=12
342
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=360, out_features=360, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (3): SwinTransformerBlock(
358
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
359
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=360, window_size=(16, 16), num_heads=12
362
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=360, out_features=360, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (4): SwinTransformerBlock(
378
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
379
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=360, window_size=(16, 16), num_heads=12
382
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=360, out_features=360, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (5): SwinTransformerBlock(
398
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
399
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=360, window_size=(16, 16), num_heads=12
402
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=360, out_features=360, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ )
418
+ )
419
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
420
+ (patch_embed): PatchEmbed()
421
+ (patch_unembed): PatchUnEmbed()
422
+ )
423
+ (1-5): 5 x RSTB(
424
+ (residual_group): BasicLayer(
425
+ dim=360, input_resolution=(32, 32), depth=6
426
+ (blocks): ModuleList(
427
+ (0): SwinTransformerBlock(
428
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
429
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
430
+ (attn): WindowAttention(
431
+ dim=360, window_size=(16, 16), num_heads=12
432
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
433
+ (attn_drop): Dropout(p=0.0, inplace=False)
434
+ (proj): Linear(in_features=360, out_features=360, bias=True)
435
+ (proj_drop): Dropout(p=0.0, inplace=False)
436
+ (softmax): Softmax(dim=-1)
437
+ )
438
+ (drop_path): DropPath()
439
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
440
+ (mlp): Mlp(
441
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
442
+ (act): GELU(approximate='none')
443
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
444
+ (drop): Dropout(p=0.0, inplace=False)
445
+ )
446
+ )
447
+ (1): SwinTransformerBlock(
448
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
449
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=360, window_size=(16, 16), num_heads=12
452
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=360, out_features=360, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (2): SwinTransformerBlock(
468
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
469
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=360, window_size=(16, 16), num_heads=12
472
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=360, out_features=360, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (3): SwinTransformerBlock(
488
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
489
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=360, window_size=(16, 16), num_heads=12
492
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=360, out_features=360, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (4): SwinTransformerBlock(
508
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
509
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=360, window_size=(16, 16), num_heads=12
512
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=360, out_features=360, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (5): SwinTransformerBlock(
528
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
529
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=360, window_size=(16, 16), num_heads=12
532
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=360, out_features=360, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ )
548
+ )
549
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
550
+ (patch_embed): PatchEmbed()
551
+ (patch_unembed): PatchUnEmbed()
552
+ )
553
+ )
554
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
555
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (heads): ModuleDict(
557
+ (x2): _SwinIRPixelShuffleHead(
558
+ (conv_before): Sequential(
559
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
561
+ )
562
+ (upsample): Upsample(
563
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
564
+ (1): PixelShuffle(upscale_factor=2)
565
+ )
566
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ )
568
+ (x4): _SwinIRPixelShuffleHead(
569
+ (conv_before): Sequential(
570
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
572
+ )
573
+ (upsample): Upsample(
574
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (1): PixelShuffle(upscale_factor=2)
576
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
577
+ (3): PixelShuffle(upscale_factor=2)
578
+ )
579
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ )
581
+ )
582
+ )
583
+ 2025-11-04 15:29:52,117 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 15:29:52,179 INFO: Use EMA with decay: 0.999
585
+ 2025-11-04 15:29:52,885 INFO: Network [SwinIRMultiHead] is created.
586
+ 2025-11-04 15:29:53,108 INFO: Loading: params_ema does not exist, use params.
587
+ 2025-11-04 15:29:53,109 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
588
+ 2025-11-04 15:29:53,169 INFO: Loss [Eagle_Loss] is created.
589
+ 2025-11-04 15:29:53,170 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
590
+ 2025-11-04 15:29:53,171 INFO: Loss [L1Loss] is created.
591
+ 2025-11-04 15:29:53,172 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
592
+ 2025-11-04 15:29:53,173 INFO: Loss [FFTFrequencyLoss] is created.
593
+ 2025-11-04 15:29:53,174 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
594
+ 2025-11-04 15:29:53,176 INFO: Loss [Eagle_Loss] is created.
595
+ 2025-11-04 15:29:53,177 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
596
+ 2025-11-04 15:29:53,178 INFO: Loss [L1Loss] is created.
597
+ 2025-11-04 15:29:53,179 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
598
+ 2025-11-04 15:29:53,180 INFO: Loss [FFTFrequencyLoss] is created.
599
+ 2025-11-04 15:29:53,181 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
600
+ 2025-11-04 15:29:53,182 INFO: Precision configuration — train: bf16, eval: fp32
601
+ 2025-11-04 15:29:53,183 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
602
+ 2025-11-04 15:29:53,184 INFO: Model [SwinIRLatentModelMultiHead] is created.
603
+ 2025-11-04 15:31:07,745 INFO: Start training from epoch: 0, step: 0
604
+ 2025-11-04 15:31:10,129 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_continue_archived_20251104_153917/basicsr_options.yaml ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:34:43 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ val:
46
+ name: sdxk_120_1024x1024
47
+ type: MultiScaleLatentCacheDataset
48
+ scales:
49
+ - 256
50
+ - 512
51
+ - 1024
52
+ cache_dirs:
53
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
54
+ vae_names:
55
+ - flux_vae
56
+ phase: val
57
+ io_backend:
58
+ type: disk
59
+ scale: 4
60
+ mean: null
61
+ std: null
62
+ batch_size_per_gpu: 16
63
+ num_worker_per_gpu: 4
64
+ pin_memory: true
65
+ network_g:
66
+ type: SwinIRMultiHead
67
+ in_chans: 16
68
+ img_size: 32
69
+ window_size: 16
70
+ img_range: 1.0
71
+ depths:
72
+ - 6
73
+ - 6
74
+ - 6
75
+ - 6
76
+ - 6
77
+ - 6
78
+ embed_dim: 360
79
+ num_heads:
80
+ - 12
81
+ - 12
82
+ - 12
83
+ - 12
84
+ - 12
85
+ - 12
86
+ mlp_ratio: 2
87
+ resi_connection: 1conv
88
+ primary_head: x4
89
+ head_num_feat: 256
90
+ heads:
91
+ - name: x2
92
+ scale: 2
93
+ out_chans: 16
94
+ - name: x4
95
+ scale: 4
96
+ out_chans: 16
97
+ primary: true
98
+ path:
99
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
100
+ strict_load_g: true
101
+ resume_state: null
102
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
103
+ compile:
104
+ enabled: false
105
+ mode: max-autotune
106
+ dynamic: true
107
+ fullgraph: false
108
+ backend: null
109
+ train:
110
+ ema_decay: 0.999
111
+ head_inputs:
112
+ x2:
113
+ lq: 256
114
+ gt: 512
115
+ x4:
116
+ lq: 128
117
+ gt: 512
118
+ optim_g:
119
+ type: Adam
120
+ lr: 0.00025
121
+ weight_decay: 0
122
+ betas:
123
+ - 0.9
124
+ - 0.99
125
+ grad_clip:
126
+ enabled: true
127
+ generator:
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ scheduler:
132
+ type: MultiStepLR
133
+ milestones:
134
+ - 62500
135
+ - 93750
136
+ - 112500
137
+ gamma: 0.5
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ l1_pixel_x2_opt:
149
+ type: L1Loss
150
+ loss_weight: 10.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ fft_frequency_x2_opt:
155
+ type: FFTFrequencyLoss
156
+ loss_weight: 1.0
157
+ reduction: mean
158
+ space: pixel
159
+ target: x2
160
+ norm: ortho
161
+ use_log_amplitude: false
162
+ alpha: 0.0
163
+ normalize_weight: true
164
+ eps: 1e-8
165
+ eagle_pixel_x4_opt:
166
+ type: Eagle_Loss
167
+ loss_weight: 5.0e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ l1_pixel_x4_opt:
174
+ type: L1Loss
175
+ loss_weight: 10.0
176
+ reduction: mean
177
+ space: pixel
178
+ target: x4
179
+ fft_frequency_x4_opt:
180
+ type: FFTFrequencyLoss
181
+ loss_weight: 1.0
182
+ reduction: mean
183
+ space: pixel
184
+ target: x4
185
+ norm: ortho
186
+ use_log_amplitude: false
187
+ alpha: 0.0
188
+ normalize_weight: true
189
+ eps: 1e-8
190
+ val:
191
+ val_freq: 5000
192
+ save_img: true
193
+ head_evals:
194
+ x2:
195
+ save_img: true
196
+ label: val_x2
197
+ val_sizes:
198
+ lq: 512
199
+ gt: 1024
200
+ metrics:
201
+ l1_latent:
202
+ type: L1Loss
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
+ x4:
210
+ save_img: true
211
+ label: val_x4
212
+ val_sizes:
213
+ lq: 256
214
+ gt: 1024
215
+ metrics:
216
+ l1_latent:
217
+ type: L1Loss
218
+ space: latent
219
+ l2_latent:
220
+ type: MSELoss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ logger:
228
+ print_freq: 100
229
+ save_checkpoint_freq: 5000
230
+ use_tb_logger: true
231
+ wandb:
232
+ project: Swin2SR-Latent-SR
233
+ entity: kazanplova-it-more
234
+ resume_id: null
235
+ max_val_images: 10
236
+ dist_params:
237
+ backend: nccl
238
+ port: 29500
239
+ dist: true
240
+ load_networks_only: false
241
+ exp_name: 38_continue
242
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_153917/train_38_continue_20251104_153443.log ADDED
@@ -0,0 +1,604 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:34:43,226 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-04 15:34:43,226 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ ]
54
+ val:[
55
+ name: sdxk_120_1024x1024
56
+ type: MultiScaleLatentCacheDataset
57
+ scales: [256, 512, 1024]
58
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
59
+ vae_names: ['flux_vae']
60
+ phase: val
61
+ io_backend:[
62
+ type: disk
63
+ ]
64
+ scale: 4
65
+ mean: None
66
+ std: None
67
+ batch_size_per_gpu: 16
68
+ num_worker_per_gpu: 4
69
+ pin_memory: True
70
+ ]
71
+ ]
72
+ network_g:[
73
+ type: SwinIRMultiHead
74
+ in_chans: 16
75
+ img_size: 32
76
+ window_size: 16
77
+ img_range: 1.0
78
+ depths: [6, 6, 6, 6, 6, 6]
79
+ embed_dim: 360
80
+ num_heads: [12, 12, 12, 12, 12, 12]
81
+ mlp_ratio: 2
82
+ resi_connection: 1conv
83
+ primary_head: x4
84
+ head_num_feat: 256
85
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
86
+ ]
87
+ path:[
88
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
89
+ strict_load_g: True
90
+ resume_state: None
91
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
92
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
93
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
94
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
96
+ ]
97
+ compile:[
98
+ enabled: False
99
+ mode: max-autotune
100
+ dynamic: True
101
+ fullgraph: False
102
+ backend: None
103
+ ]
104
+ train:[
105
+ ema_decay: 0.999
106
+ head_inputs:[
107
+ x2:[
108
+ lq: 256
109
+ gt: 512
110
+ ]
111
+ x4:[
112
+ lq: 128
113
+ gt: 512
114
+ ]
115
+ ]
116
+ optim_g:[
117
+ type: Adam
118
+ lr: 0.00025
119
+ weight_decay: 0
120
+ betas: [0.9, 0.99]
121
+ ]
122
+ grad_clip:[
123
+ enabled: True
124
+ generator:[
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ ]
129
+ ]
130
+ scheduler:[
131
+ type: MultiStepLR
132
+ milestones: [62500, 93750, 112500]
133
+ gamma: 0.5
134
+ ]
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:[
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ ]
146
+ l1_pixel_x2_opt:[
147
+ type: L1Loss
148
+ loss_weight: 10.0
149
+ reduction: mean
150
+ space: pixel
151
+ target: x2
152
+ ]
153
+ fft_frequency_x2_opt:[
154
+ type: FFTFrequencyLoss
155
+ loss_weight: 1.0
156
+ reduction: mean
157
+ space: pixel
158
+ target: x2
159
+ norm: ortho
160
+ use_log_amplitude: False
161
+ alpha: 0.0
162
+ normalize_weight: True
163
+ eps: 1e-8
164
+ ]
165
+ eagle_pixel_x4_opt:[
166
+ type: Eagle_Loss
167
+ loss_weight: 5e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ ]
174
+ l1_pixel_x4_opt:[
175
+ type: L1Loss
176
+ loss_weight: 10.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ ]
181
+ fft_frequency_x4_opt:[
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 1.0
184
+ reduction: mean
185
+ space: pixel
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: False
189
+ alpha: 0.0
190
+ normalize_weight: True
191
+ eps: 1e-8
192
+ ]
193
+ ]
194
+ val:[
195
+ val_freq: 5000
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
+ ]
205
+ metrics:[
206
+ l1_latent:[
207
+ type: L1Loss
208
+ space: latent
209
+ ]
210
+ pixel_psnr_pt:[
211
+ type: calculate_psnr_pt
212
+ space: pixel
213
+ crop_border: 2
214
+ test_y_channel: False
215
+ ]
216
+ ]
217
+ ]
218
+ x4:[
219
+ save_img: True
220
+ label: val_x4
221
+ val_sizes:[
222
+ lq: 256
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ l2_latent:[
231
+ type: MSELoss
232
+ space: latent
233
+ ]
234
+ pixel_psnr_pt:[
235
+ type: calculate_psnr_pt
236
+ space: pixel
237
+ crop_border: 2
238
+ test_y_channel: False
239
+ ]
240
+ ]
241
+ ]
242
+ ]
243
+ ]
244
+ logger:[
245
+ print_freq: 100
246
+ save_checkpoint_freq: 5000
247
+ use_tb_logger: True
248
+ wandb:[
249
+ project: Swin2SR-Latent-SR
250
+ entity: kazanplova-it-more
251
+ resume_id: None
252
+ max_val_images: 10
253
+ ]
254
+ ]
255
+ dist_params:[
256
+ backend: nccl
257
+ port: 29500
258
+ dist: True
259
+ ]
260
+ load_networks_only: False
261
+ exp_name: 38_continue
262
+ name: 38_continue
263
+ dist: True
264
+ rank: 0
265
+ world_size: 6
266
+ auto_resume: False
267
+ is_train: True
268
+ root_path: /data/kazanplova/latent_vae_upscale_train
269
+
270
+ 2025-11-04 15:34:45,074 INFO: Use wandb logger with id=rx9h74fm; project=Swin2SR-Latent-SR.
271
+ 2025-11-04 15:34:58,938 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
272
+ 2025-11-04 15:34:58,939 INFO: Training statistics:
273
+ Number of train images: 4858507
274
+ Dataset enlarge ratio: 1
275
+ Batch size per gpu: 8
276
+ World size (gpu number): 6
277
+ Steps per epoch: 101219
278
+ Configured training steps: 125000
279
+ Approximate epochs to cover: 2.
280
+ 2025-11-04 15:34:58,943 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
281
+ 2025-11-04 15:34:58,944 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
282
+ 2025-11-04 15:34:58,945 INFO: Multi-head training overrides active with find_unused_parameters=False; skipping automatic enablement.
283
+ 2025-11-04 15:34:59,419 INFO: Network [SwinIRMultiHead] is created.
284
+ 2025-11-04 15:35:01,537 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
285
+ 2025-11-04 15:35:01,538 INFO: SwinIRMultiHead(
286
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
287
+ (patch_embed): PatchEmbed(
288
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
289
+ )
290
+ (patch_unembed): PatchUnEmbed()
291
+ (pos_drop): Dropout(p=0.0, inplace=False)
292
+ (layers): ModuleList(
293
+ (0): RSTB(
294
+ (residual_group): BasicLayer(
295
+ dim=360, input_resolution=(32, 32), depth=6
296
+ (blocks): ModuleList(
297
+ (0): SwinTransformerBlock(
298
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
299
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
300
+ (attn): WindowAttention(
301
+ dim=360, window_size=(16, 16), num_heads=12
302
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
303
+ (attn_drop): Dropout(p=0.0, inplace=False)
304
+ (proj): Linear(in_features=360, out_features=360, bias=True)
305
+ (proj_drop): Dropout(p=0.0, inplace=False)
306
+ (softmax): Softmax(dim=-1)
307
+ )
308
+ (drop_path): Identity()
309
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
310
+ (mlp): Mlp(
311
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
312
+ (act): GELU(approximate='none')
313
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
314
+ (drop): Dropout(p=0.0, inplace=False)
315
+ )
316
+ )
317
+ (1): SwinTransformerBlock(
318
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
319
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=360, window_size=(16, 16), num_heads=12
322
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=360, out_features=360, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): DropPath()
329
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (2): SwinTransformerBlock(
338
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
339
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=360, window_size=(16, 16), num_heads=12
342
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=360, out_features=360, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (3): SwinTransformerBlock(
358
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
359
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=360, window_size=(16, 16), num_heads=12
362
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=360, out_features=360, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (4): SwinTransformerBlock(
378
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
379
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=360, window_size=(16, 16), num_heads=12
382
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=360, out_features=360, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (5): SwinTransformerBlock(
398
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
399
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=360, window_size=(16, 16), num_heads=12
402
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=360, out_features=360, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ )
418
+ )
419
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
420
+ (patch_embed): PatchEmbed()
421
+ (patch_unembed): PatchUnEmbed()
422
+ )
423
+ (1-5): 5 x RSTB(
424
+ (residual_group): BasicLayer(
425
+ dim=360, input_resolution=(32, 32), depth=6
426
+ (blocks): ModuleList(
427
+ (0): SwinTransformerBlock(
428
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
429
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
430
+ (attn): WindowAttention(
431
+ dim=360, window_size=(16, 16), num_heads=12
432
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
433
+ (attn_drop): Dropout(p=0.0, inplace=False)
434
+ (proj): Linear(in_features=360, out_features=360, bias=True)
435
+ (proj_drop): Dropout(p=0.0, inplace=False)
436
+ (softmax): Softmax(dim=-1)
437
+ )
438
+ (drop_path): DropPath()
439
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
440
+ (mlp): Mlp(
441
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
442
+ (act): GELU(approximate='none')
443
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
444
+ (drop): Dropout(p=0.0, inplace=False)
445
+ )
446
+ )
447
+ (1): SwinTransformerBlock(
448
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
449
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=360, window_size=(16, 16), num_heads=12
452
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=360, out_features=360, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (2): SwinTransformerBlock(
468
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
469
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=360, window_size=(16, 16), num_heads=12
472
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=360, out_features=360, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (3): SwinTransformerBlock(
488
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
489
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=360, window_size=(16, 16), num_heads=12
492
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=360, out_features=360, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (4): SwinTransformerBlock(
508
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
509
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=360, window_size=(16, 16), num_heads=12
512
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=360, out_features=360, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (5): SwinTransformerBlock(
528
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
529
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=360, window_size=(16, 16), num_heads=12
532
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=360, out_features=360, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ )
548
+ )
549
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
550
+ (patch_embed): PatchEmbed()
551
+ (patch_unembed): PatchUnEmbed()
552
+ )
553
+ )
554
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
555
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (heads): ModuleDict(
557
+ (x2): _SwinIRPixelShuffleHead(
558
+ (conv_before): Sequential(
559
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
561
+ )
562
+ (upsample): Upsample(
563
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
564
+ (1): PixelShuffle(upscale_factor=2)
565
+ )
566
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ )
568
+ (x4): _SwinIRPixelShuffleHead(
569
+ (conv_before): Sequential(
570
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
572
+ )
573
+ (upsample): Upsample(
574
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (1): PixelShuffle(upscale_factor=2)
576
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
577
+ (3): PixelShuffle(upscale_factor=2)
578
+ )
579
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ )
581
+ )
582
+ )
583
+ 2025-11-04 15:35:01,700 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 15:35:01,763 INFO: Use EMA with decay: 0.999
585
+ 2025-11-04 15:35:02,357 INFO: Network [SwinIRMultiHead] is created.
586
+ 2025-11-04 15:35:02,544 INFO: Loading: params_ema does not exist, use params.
587
+ 2025-11-04 15:35:02,545 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
588
+ 2025-11-04 15:35:02,595 INFO: Loss [Eagle_Loss] is created.
589
+ 2025-11-04 15:35:02,596 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
590
+ 2025-11-04 15:35:02,598 INFO: Loss [L1Loss] is created.
591
+ 2025-11-04 15:35:02,598 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
592
+ 2025-11-04 15:35:02,598 INFO: Loss [FFTFrequencyLoss] is created.
593
+ 2025-11-04 15:35:02,599 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
594
+ 2025-11-04 15:35:02,600 INFO: Loss [Eagle_Loss] is created.
595
+ 2025-11-04 15:35:02,601 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
596
+ 2025-11-04 15:35:02,602 INFO: Loss [L1Loss] is created.
597
+ 2025-11-04 15:35:02,603 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
598
+ 2025-11-04 15:35:02,604 INFO: Loss [FFTFrequencyLoss] is created.
599
+ 2025-11-04 15:35:02,605 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
600
+ 2025-11-04 15:35:02,607 INFO: Precision configuration — train: bf16, eval: fp32
601
+ 2025-11-04 15:35:02,607 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
602
+ 2025-11-04 15:35:02,608 INFO: Model [SwinIRLatentModelMultiHead] is created.
603
+ 2025-11-04 15:36:18,357 INFO: Start training from epoch: 0, step: 0
604
+ 2025-11-04 15:36:19,967 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_continue_archived_20251104_155714/basicsr_options.yaml ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:39:17 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ val:
46
+ name: sdxk_120_1024x1024
47
+ type: MultiScaleLatentCacheDataset
48
+ scales:
49
+ - 256
50
+ - 512
51
+ - 1024
52
+ cache_dirs:
53
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
54
+ vae_names:
55
+ - flux_vae
56
+ phase: val
57
+ io_backend:
58
+ type: disk
59
+ scale: 4
60
+ mean: null
61
+ std: null
62
+ batch_size_per_gpu: 16
63
+ num_worker_per_gpu: 4
64
+ pin_memory: true
65
+ network_g:
66
+ type: SwinIRMultiHead
67
+ in_chans: 16
68
+ img_size: 32
69
+ window_size: 16
70
+ img_range: 1.0
71
+ depths:
72
+ - 6
73
+ - 6
74
+ - 6
75
+ - 6
76
+ - 6
77
+ - 6
78
+ embed_dim: 360
79
+ num_heads:
80
+ - 12
81
+ - 12
82
+ - 12
83
+ - 12
84
+ - 12
85
+ - 12
86
+ mlp_ratio: 2
87
+ resi_connection: 1conv
88
+ primary_head: x4
89
+ head_num_feat: 256
90
+ heads:
91
+ - name: x2
92
+ scale: 2
93
+ out_chans: 16
94
+ - name: x4
95
+ scale: 4
96
+ out_chans: 16
97
+ primary: true
98
+ path:
99
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
100
+ strict_load_g: true
101
+ resume_state: null
102
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
103
+ compile:
104
+ enabled: false
105
+ mode: max-autotune
106
+ dynamic: true
107
+ fullgraph: false
108
+ backend: null
109
+ train:
110
+ ema_decay: 0.999
111
+ head_inputs:
112
+ x2:
113
+ lq: 256
114
+ gt: 512
115
+ x4:
116
+ lq: 128
117
+ gt: 512
118
+ optim_g:
119
+ type: Adam
120
+ lr: 0.00025
121
+ weight_decay: 0
122
+ betas:
123
+ - 0.9
124
+ - 0.99
125
+ grad_clip:
126
+ enabled: true
127
+ generator:
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ scheduler:
132
+ type: MultiStepLR
133
+ milestones:
134
+ - 62500
135
+ - 93750
136
+ - 112500
137
+ gamma: 0.5
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ l1_pixel_x2_opt:
149
+ type: L1Loss
150
+ loss_weight: 10.0
151
+ reduction: mean
152
+ space: pixel
153
+ target: x2
154
+ fft_frequency_x2_opt:
155
+ type: FFTFrequencyLoss
156
+ loss_weight: 1.0
157
+ reduction: mean
158
+ space: pixel
159
+ target: x2
160
+ norm: ortho
161
+ use_log_amplitude: false
162
+ alpha: 0.0
163
+ normalize_weight: true
164
+ eps: 1e-8
165
+ eagle_pixel_x4_opt:
166
+ type: Eagle_Loss
167
+ loss_weight: 5.0e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ l1_pixel_x4_opt:
174
+ type: L1Loss
175
+ loss_weight: 10.0
176
+ reduction: mean
177
+ space: pixel
178
+ target: x4
179
+ fft_frequency_x4_opt:
180
+ type: FFTFrequencyLoss
181
+ loss_weight: 1.0
182
+ reduction: mean
183
+ space: pixel
184
+ target: x4
185
+ norm: ortho
186
+ use_log_amplitude: false
187
+ alpha: 0.0
188
+ normalize_weight: true
189
+ eps: 1e-8
190
+ val:
191
+ val_freq: 5000
192
+ save_img: true
193
+ head_evals:
194
+ x2:
195
+ save_img: true
196
+ label: val_x2
197
+ val_sizes:
198
+ lq: 512
199
+ gt: 1024
200
+ metrics:
201
+ l1_latent:
202
+ type: L1Loss
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
+ x4:
210
+ save_img: true
211
+ label: val_x4
212
+ val_sizes:
213
+ lq: 256
214
+ gt: 1024
215
+ metrics:
216
+ l1_latent:
217
+ type: L1Loss
218
+ space: latent
219
+ l2_latent:
220
+ type: MSELoss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ logger:
228
+ print_freq: 100
229
+ save_checkpoint_freq: 5000
230
+ use_tb_logger: true
231
+ wandb:
232
+ project: Swin2SR-Latent-SR
233
+ entity: kazanplova-it-more
234
+ resume_id: null
235
+ max_val_images: 10
236
+ dist_params:
237
+ backend: nccl
238
+ port: 29500
239
+ dist: true
240
+ load_networks_only: false
241
+ exp_name: 38_continue
242
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_155714/train_38_continue_20251104_153917.log ADDED
@@ -0,0 +1,606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:39:17,694 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-04 15:39:17,695 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ ]
54
+ val:[
55
+ name: sdxk_120_1024x1024
56
+ type: MultiScaleLatentCacheDataset
57
+ scales: [256, 512, 1024]
58
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
59
+ vae_names: ['flux_vae']
60
+ phase: val
61
+ io_backend:[
62
+ type: disk
63
+ ]
64
+ scale: 4
65
+ mean: None
66
+ std: None
67
+ batch_size_per_gpu: 16
68
+ num_worker_per_gpu: 4
69
+ pin_memory: True
70
+ ]
71
+ ]
72
+ network_g:[
73
+ type: SwinIRMultiHead
74
+ in_chans: 16
75
+ img_size: 32
76
+ window_size: 16
77
+ img_range: 1.0
78
+ depths: [6, 6, 6, 6, 6, 6]
79
+ embed_dim: 360
80
+ num_heads: [12, 12, 12, 12, 12, 12]
81
+ mlp_ratio: 2
82
+ resi_connection: 1conv
83
+ primary_head: x4
84
+ head_num_feat: 256
85
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
86
+ ]
87
+ path:[
88
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
89
+ strict_load_g: True
90
+ resume_state: None
91
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
92
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
93
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
94
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
96
+ ]
97
+ compile:[
98
+ enabled: False
99
+ mode: max-autotune
100
+ dynamic: True
101
+ fullgraph: False
102
+ backend: None
103
+ ]
104
+ train:[
105
+ ema_decay: 0.999
106
+ head_inputs:[
107
+ x2:[
108
+ lq: 256
109
+ gt: 512
110
+ ]
111
+ x4:[
112
+ lq: 128
113
+ gt: 512
114
+ ]
115
+ ]
116
+ optim_g:[
117
+ type: Adam
118
+ lr: 0.00025
119
+ weight_decay: 0
120
+ betas: [0.9, 0.99]
121
+ ]
122
+ grad_clip:[
123
+ enabled: True
124
+ generator:[
125
+ type: norm
126
+ max_norm: 0.4
127
+ norm_type: 2.0
128
+ ]
129
+ ]
130
+ scheduler:[
131
+ type: MultiStepLR
132
+ milestones: [62500, 93750, 112500]
133
+ gamma: 0.5
134
+ ]
135
+ total_steps: 125000
136
+ warmup_iter: -1
137
+ eagle_pixel_x2_opt:[
138
+ type: Eagle_Loss
139
+ loss_weight: 2.5e-05
140
+ reduction: mean
141
+ space: pixel
142
+ patch_size: 3
143
+ cutoff: 0.5
144
+ target: x2
145
+ ]
146
+ l1_pixel_x2_opt:[
147
+ type: L1Loss
148
+ loss_weight: 10.0
149
+ reduction: mean
150
+ space: pixel
151
+ target: x2
152
+ ]
153
+ fft_frequency_x2_opt:[
154
+ type: FFTFrequencyLoss
155
+ loss_weight: 1.0
156
+ reduction: mean
157
+ space: pixel
158
+ target: x2
159
+ norm: ortho
160
+ use_log_amplitude: False
161
+ alpha: 0.0
162
+ normalize_weight: True
163
+ eps: 1e-8
164
+ ]
165
+ eagle_pixel_x4_opt:[
166
+ type: Eagle_Loss
167
+ loss_weight: 5e-05
168
+ reduction: mean
169
+ space: pixel
170
+ patch_size: 3
171
+ cutoff: 0.5
172
+ target: x4
173
+ ]
174
+ l1_pixel_x4_opt:[
175
+ type: L1Loss
176
+ loss_weight: 10.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ ]
181
+ fft_frequency_x4_opt:[
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 1.0
184
+ reduction: mean
185
+ space: pixel
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: False
189
+ alpha: 0.0
190
+ normalize_weight: True
191
+ eps: 1e-8
192
+ ]
193
+ ]
194
+ val:[
195
+ val_freq: 5000
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
+ ]
205
+ metrics:[
206
+ l1_latent:[
207
+ type: L1Loss
208
+ space: latent
209
+ ]
210
+ pixel_psnr_pt:[
211
+ type: calculate_psnr_pt
212
+ space: pixel
213
+ crop_border: 2
214
+ test_y_channel: False
215
+ ]
216
+ ]
217
+ ]
218
+ x4:[
219
+ save_img: True
220
+ label: val_x4
221
+ val_sizes:[
222
+ lq: 256
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ l2_latent:[
231
+ type: MSELoss
232
+ space: latent
233
+ ]
234
+ pixel_psnr_pt:[
235
+ type: calculate_psnr_pt
236
+ space: pixel
237
+ crop_border: 2
238
+ test_y_channel: False
239
+ ]
240
+ ]
241
+ ]
242
+ ]
243
+ ]
244
+ logger:[
245
+ print_freq: 100
246
+ save_checkpoint_freq: 5000
247
+ use_tb_logger: True
248
+ wandb:[
249
+ project: Swin2SR-Latent-SR
250
+ entity: kazanplova-it-more
251
+ resume_id: None
252
+ max_val_images: 10
253
+ ]
254
+ ]
255
+ dist_params:[
256
+ backend: nccl
257
+ port: 29500
258
+ dist: True
259
+ ]
260
+ load_networks_only: False
261
+ exp_name: 38_continue
262
+ name: 38_continue
263
+ dist: True
264
+ rank: 0
265
+ world_size: 6
266
+ auto_resume: False
267
+ is_train: True
268
+ root_path: /data/kazanplova/latent_vae_upscale_train
269
+
270
+ 2025-11-04 15:39:19,337 INFO: Use wandb logger with id=xpnahptq; project=Swin2SR-Latent-SR.
271
+ 2025-11-04 15:39:32,213 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
272
+ 2025-11-04 15:39:32,213 INFO: Training statistics:
273
+ Number of train images: 4858507
274
+ Dataset enlarge ratio: 1
275
+ Batch size per gpu: 8
276
+ World size (gpu number): 6
277
+ Steps per epoch: 101219
278
+ Configured training steps: 125000
279
+ Approximate epochs to cover: 2.
280
+ 2025-11-04 15:39:32,217 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
281
+ 2025-11-04 15:39:32,217 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
282
+ 2025-11-04 15:39:32,219 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
283
+ 2025-11-04 15:39:32,666 INFO: Network [SwinIRMultiHead] is created.
284
+ 2025-11-04 15:39:34,767 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
285
+ 2025-11-04 15:39:34,768 INFO: SwinIRMultiHead(
286
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
287
+ (patch_embed): PatchEmbed(
288
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
289
+ )
290
+ (patch_unembed): PatchUnEmbed()
291
+ (pos_drop): Dropout(p=0.0, inplace=False)
292
+ (layers): ModuleList(
293
+ (0): RSTB(
294
+ (residual_group): BasicLayer(
295
+ dim=360, input_resolution=(32, 32), depth=6
296
+ (blocks): ModuleList(
297
+ (0): SwinTransformerBlock(
298
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
299
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
300
+ (attn): WindowAttention(
301
+ dim=360, window_size=(16, 16), num_heads=12
302
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
303
+ (attn_drop): Dropout(p=0.0, inplace=False)
304
+ (proj): Linear(in_features=360, out_features=360, bias=True)
305
+ (proj_drop): Dropout(p=0.0, inplace=False)
306
+ (softmax): Softmax(dim=-1)
307
+ )
308
+ (drop_path): Identity()
309
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
310
+ (mlp): Mlp(
311
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
312
+ (act): GELU(approximate='none')
313
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
314
+ (drop): Dropout(p=0.0, inplace=False)
315
+ )
316
+ )
317
+ (1): SwinTransformerBlock(
318
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
319
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=360, window_size=(16, 16), num_heads=12
322
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=360, out_features=360, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): DropPath()
329
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (2): SwinTransformerBlock(
338
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
339
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=360, window_size=(16, 16), num_heads=12
342
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=360, out_features=360, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (3): SwinTransformerBlock(
358
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
359
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=360, window_size=(16, 16), num_heads=12
362
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=360, out_features=360, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (4): SwinTransformerBlock(
378
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
379
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=360, window_size=(16, 16), num_heads=12
382
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=360, out_features=360, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (5): SwinTransformerBlock(
398
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
399
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=360, window_size=(16, 16), num_heads=12
402
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=360, out_features=360, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ )
418
+ )
419
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
420
+ (patch_embed): PatchEmbed()
421
+ (patch_unembed): PatchUnEmbed()
422
+ )
423
+ (1-5): 5 x RSTB(
424
+ (residual_group): BasicLayer(
425
+ dim=360, input_resolution=(32, 32), depth=6
426
+ (blocks): ModuleList(
427
+ (0): SwinTransformerBlock(
428
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
429
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
430
+ (attn): WindowAttention(
431
+ dim=360, window_size=(16, 16), num_heads=12
432
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
433
+ (attn_drop): Dropout(p=0.0, inplace=False)
434
+ (proj): Linear(in_features=360, out_features=360, bias=True)
435
+ (proj_drop): Dropout(p=0.0, inplace=False)
436
+ (softmax): Softmax(dim=-1)
437
+ )
438
+ (drop_path): DropPath()
439
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
440
+ (mlp): Mlp(
441
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
442
+ (act): GELU(approximate='none')
443
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
444
+ (drop): Dropout(p=0.0, inplace=False)
445
+ )
446
+ )
447
+ (1): SwinTransformerBlock(
448
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
449
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=360, window_size=(16, 16), num_heads=12
452
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=360, out_features=360, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (2): SwinTransformerBlock(
468
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
469
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=360, window_size=(16, 16), num_heads=12
472
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=360, out_features=360, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (3): SwinTransformerBlock(
488
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
489
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=360, window_size=(16, 16), num_heads=12
492
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=360, out_features=360, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (4): SwinTransformerBlock(
508
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
509
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=360, window_size=(16, 16), num_heads=12
512
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=360, out_features=360, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (5): SwinTransformerBlock(
528
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
529
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=360, window_size=(16, 16), num_heads=12
532
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=360, out_features=360, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ )
548
+ )
549
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
550
+ (patch_embed): PatchEmbed()
551
+ (patch_unembed): PatchUnEmbed()
552
+ )
553
+ )
554
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
555
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
556
+ (heads): ModuleDict(
557
+ (x2): _SwinIRPixelShuffleHead(
558
+ (conv_before): Sequential(
559
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
560
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
561
+ )
562
+ (upsample): Upsample(
563
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
564
+ (1): PixelShuffle(upscale_factor=2)
565
+ )
566
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ )
568
+ (x4): _SwinIRPixelShuffleHead(
569
+ (conv_before): Sequential(
570
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
571
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
572
+ )
573
+ (upsample): Upsample(
574
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (1): PixelShuffle(upscale_factor=2)
576
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
577
+ (3): PixelShuffle(upscale_factor=2)
578
+ )
579
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ )
581
+ )
582
+ )
583
+ 2025-11-04 15:39:34,894 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
584
+ 2025-11-04 15:39:34,948 INFO: Use EMA with decay: 0.999
585
+ 2025-11-04 15:39:35,354 INFO: Network [SwinIRMultiHead] is created.
586
+ 2025-11-04 15:39:35,534 INFO: Loading: params_ema does not exist, use params.
587
+ 2025-11-04 15:39:35,535 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
588
+ 2025-11-04 15:39:35,586 INFO: Loss [Eagle_Loss] is created.
589
+ 2025-11-04 15:39:35,587 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
590
+ 2025-11-04 15:39:35,588 INFO: Loss [L1Loss] is created.
591
+ 2025-11-04 15:39:35,588 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
592
+ 2025-11-04 15:39:35,589 INFO: Loss [FFTFrequencyLoss] is created.
593
+ 2025-11-04 15:39:35,589 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
594
+ 2025-11-04 15:39:35,590 INFO: Loss [Eagle_Loss] is created.
595
+ 2025-11-04 15:39:35,591 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
596
+ 2025-11-04 15:39:35,592 INFO: Loss [L1Loss] is created.
597
+ 2025-11-04 15:39:35,593 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
598
+ 2025-11-04 15:39:35,594 INFO: Loss [FFTFrequencyLoss] is created.
599
+ 2025-11-04 15:39:35,595 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
600
+ 2025-11-04 15:39:35,597 INFO: Precision configuration — train: bf16, eval: fp32
601
+ 2025-11-04 15:39:35,598 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
602
+ 2025-11-04 15:39:35,598 INFO: Model [SwinIRLatentModelMultiHead] is created.
603
+ 2025-11-04 15:40:53,193 INFO: Start training from epoch: 0, step: 0
604
+ 2025-11-04 15:40:55,784 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
605
+ 2025-11-04 15:42:57,789 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 12:26:11, time (data): 1.246 (0.021)] eagle_pixel_x2_opt: 3.9566e+00 l1_pixel_x2_opt: 3.5668e-02 fft_frequency_x2_opt: 3.1990e-02 eagle_pixel_x4_opt: 6.1017e+00 l1_pixel_x4_opt: 5.1498e-02 fft_frequency_x4_opt: 4.3687e-02
606
+ 2025-11-04 15:44:43,505 INFO: [38_co..][epoch: 0, step: 200, lr:(2.500e-04,)] [eta: 1 day, 12:31:37, time (data): 1.152 (0.011)] eagle_pixel_x2_opt: 4.8343e+00 l1_pixel_x2_opt: 3.7020e-02 fft_frequency_x2_opt: 3.4819e-02 eagle_pixel_x4_opt: 7.5603e+00 l1_pixel_x4_opt: 5.7494e-02 fft_frequency_x4_opt: 4.8756e-02
04_11_2025/38_continue_archived_20251104_160331/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 15:57:14 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: true
108
+ mode: max-autotune
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: null
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 5000
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_160331/train_38_continue_20251104_155714.log ADDED
@@ -0,0 +1,609 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 15:57:14,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-04 15:57:14,197 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: True
102
+ mode: max-autotune
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: None
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 5000
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 15:57:16,097 INFO: Use wandb logger with id=eqilou43; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 15:57:28,833 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 15:57:28,834 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 15:57:28,837 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 15:57:28,838 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 15:57:28,839 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 15:57:29,288 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 15:57:31,229 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 15:57:31,230 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 15:57:31,378 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 15:57:31,584 INFO: Use EMA with decay: 0.999
588
+ 2025-11-04 15:57:31,981 INFO: Network [SwinIRMultiHead] is created.
589
+ 2025-11-04 15:57:32,163 INFO: Loading: params_ema does not exist, use params.
590
+ 2025-11-04 15:57:32,164 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
591
+ 2025-11-04 15:57:32,212 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
592
+ 2025-11-04 15:57:32,214 INFO: Loss [Eagle_Loss] is created.
593
+ 2025-11-04 15:57:32,215 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
594
+ 2025-11-04 15:57:32,216 INFO: Loss [L1Loss] is created.
595
+ 2025-11-04 15:57:32,217 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
596
+ 2025-11-04 15:57:32,218 INFO: Loss [FFTFrequencyLoss] is created.
597
+ 2025-11-04 15:57:32,219 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
598
+ 2025-11-04 15:57:32,219 INFO: Loss [Eagle_Loss] is created.
599
+ 2025-11-04 15:57:32,220 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
600
+ 2025-11-04 15:57:32,221 INFO: Loss [L1Loss] is created.
601
+ 2025-11-04 15:57:32,222 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
602
+ 2025-11-04 15:57:32,223 INFO: Loss [FFTFrequencyLoss] is created.
603
+ 2025-11-04 15:57:32,224 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
604
+ 2025-11-04 15:57:32,226 INFO: Precision configuration — train: bf16, eval: fp32
605
+ 2025-11-04 15:57:32,226 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
606
+ 2025-11-04 15:57:32,227 INFO: Model [SwinIRLatentModelMultiHead] is created.
607
+ 2025-11-04 15:58:51,609 INFO: Use cuda prefetch dataloader
608
+ 2025-11-04 15:58:51,611 INFO: Start training from epoch: 0, step: 0
609
+ 2025-11-04 15:59:18,974 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_continue_archived_20251104_161131/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 16:03:31 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: true
108
+ mode: max-autotune
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: inductor
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 5000
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_161131/train_38_continue_20251104_160331.log ADDED
@@ -0,0 +1,609 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 16:03:31,157 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-04 16:03:31,157 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: True
102
+ mode: max-autotune
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: inductor
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 5000
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 16:03:32,941 INFO: Use wandb logger with id=49ewh2jg; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 16:03:45,608 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 16:03:45,609 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 16:03:45,613 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 16:03:45,613 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 16:03:45,614 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 16:03:46,082 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 16:03:48,154 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 16:03:48,155 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 16:03:48,311 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 16:03:48,415 INFO: Use EMA with decay: 0.999
588
+ 2025-11-04 16:03:49,131 INFO: Network [SwinIRMultiHead] is created.
589
+ 2025-11-04 16:03:49,354 INFO: Loading: params_ema does not exist, use params.
590
+ 2025-11-04 16:03:49,355 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
591
+ 2025-11-04 16:03:49,414 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
592
+ 2025-11-04 16:03:49,417 INFO: Loss [Eagle_Loss] is created.
593
+ 2025-11-04 16:03:49,418 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
594
+ 2025-11-04 16:03:49,418 INFO: Loss [L1Loss] is created.
595
+ 2025-11-04 16:03:49,419 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
596
+ 2025-11-04 16:03:49,420 INFO: Loss [FFTFrequencyLoss] is created.
597
+ 2025-11-04 16:03:49,421 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
598
+ 2025-11-04 16:03:49,422 INFO: Loss [Eagle_Loss] is created.
599
+ 2025-11-04 16:03:49,423 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
600
+ 2025-11-04 16:03:49,424 INFO: Loss [L1Loss] is created.
601
+ 2025-11-04 16:03:49,425 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
602
+ 2025-11-04 16:03:49,427 INFO: Loss [FFTFrequencyLoss] is created.
603
+ 2025-11-04 16:03:49,427 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
604
+ 2025-11-04 16:03:49,428 INFO: Precision configuration — train: bf16, eval: fp32
605
+ 2025-11-04 16:03:49,428 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
606
+ 2025-11-04 16:03:49,429 INFO: Model [SwinIRLatentModelMultiHead] is created.
607
+ 2025-11-04 16:05:09,824 INFO: Use cuda prefetch dataloader
608
+ 2025-11-04 16:05:09,826 INFO: Start training from epoch: 0, step: 0
609
+ 2025-11-04 16:07:48,145 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_continue_archived_20251104_162054/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 16:11:31 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: true
108
+ mode: max-autotune
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: inductor
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 5000
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_162054/train_38_continue_20251104_161131.log ADDED
@@ -0,0 +1,609 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 16:11:31,980 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-04 16:11:31,981 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: True
102
+ mode: max-autotune
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: inductor
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 5000
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 16:11:33,704 INFO: Use wandb logger with id=uqf4znim; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 16:11:46,029 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 16:11:46,030 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 16:11:46,033 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 16:11:46,034 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 16:11:46,035 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 16:11:46,484 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 16:11:48,541 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 16:11:48,542 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 16:11:48,754 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 16:11:48,862 INFO: Use EMA with decay: 0.999
588
+ 2025-11-04 16:11:49,388 INFO: Network [SwinIRMultiHead] is created.
589
+ 2025-11-04 16:11:49,576 INFO: Loading: params_ema does not exist, use params.
590
+ 2025-11-04 16:11:49,577 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
591
+ 2025-11-04 16:11:49,626 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
592
+ 2025-11-04 16:11:49,628 INFO: Loss [Eagle_Loss] is created.
593
+ 2025-11-04 16:11:49,629 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
594
+ 2025-11-04 16:11:49,630 INFO: Loss [L1Loss] is created.
595
+ 2025-11-04 16:11:49,631 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
596
+ 2025-11-04 16:11:49,632 INFO: Loss [FFTFrequencyLoss] is created.
597
+ 2025-11-04 16:11:49,633 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
598
+ 2025-11-04 16:11:49,634 INFO: Loss [Eagle_Loss] is created.
599
+ 2025-11-04 16:11:49,635 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
600
+ 2025-11-04 16:11:49,636 INFO: Loss [L1Loss] is created.
601
+ 2025-11-04 16:11:49,637 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
602
+ 2025-11-04 16:11:49,637 INFO: Loss [FFTFrequencyLoss] is created.
603
+ 2025-11-04 16:11:49,638 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
604
+ 2025-11-04 16:11:49,640 INFO: Precision configuration — train: bf16, eval: fp32
605
+ 2025-11-04 16:11:49,640 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
606
+ 2025-11-04 16:11:49,641 INFO: Model [SwinIRLatentModelMultiHead] is created.
607
+ 2025-11-04 16:13:09,221 INFO: Use cuda prefetch dataloader
608
+ 2025-11-04 16:13:09,222 INFO: Start training from epoch: 0, step: 0
609
+ 2025-11-04 16:14:02,100 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/38_continue_archived_20251104_164245/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 16:20:54 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: false
108
+ mode: auto
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: inductor
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 1000
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_164245/train_38_continue_20251104_162054.log ADDED
@@ -0,0 +1,618 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 16:20:54,476 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-04 16:20:54,477 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: False
102
+ mode: auto
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: inductor
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 1000
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 16:20:56,095 INFO: Use wandb logger with id=3k8afxcw; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 16:21:10,703 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 16:21:10,704 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 16:21:10,708 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 16:21:10,708 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 16:21:10,709 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 16:21:11,178 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 16:21:13,052 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 16:21:13,053 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 16:21:13,182 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 16:21:13,234 INFO: Use EMA with decay: 0.999
588
+ 2025-11-04 16:21:21,047 INFO: Network [SwinIRMultiHead] is created.
589
+ 2025-11-04 16:21:21,231 INFO: Loading: params_ema does not exist, use params.
590
+ 2025-11-04 16:21:21,232 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
591
+ 2025-11-04 16:21:21,281 INFO: Loss [Eagle_Loss] is created.
592
+ 2025-11-04 16:21:21,282 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
593
+ 2025-11-04 16:21:21,282 INFO: Loss [L1Loss] is created.
594
+ 2025-11-04 16:21:21,283 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
595
+ 2025-11-04 16:21:21,283 INFO: Loss [FFTFrequencyLoss] is created.
596
+ 2025-11-04 16:21:21,284 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
597
+ 2025-11-04 16:21:21,285 INFO: Loss [Eagle_Loss] is created.
598
+ 2025-11-04 16:21:21,285 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
599
+ 2025-11-04 16:21:21,287 INFO: Loss [L1Loss] is created.
600
+ 2025-11-04 16:21:21,288 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
601
+ 2025-11-04 16:21:21,289 INFO: Loss [FFTFrequencyLoss] is created.
602
+ 2025-11-04 16:21:21,290 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
603
+ 2025-11-04 16:21:21,292 INFO: Precision configuration — train: bf16, eval: fp32
604
+ 2025-11-04 16:21:21,293 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
605
+ 2025-11-04 16:21:21,295 INFO: Model [SwinIRLatentModelMultiHead] is created.
606
+ 2025-11-04 16:22:39,592 INFO: Use cuda prefetch dataloader
607
+ 2025-11-04 16:22:39,593 INFO: Start training from epoch: 0, step: 0
608
+ 2025-11-04 16:22:41,135 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
609
+ 2025-11-04 16:24:35,305 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 11:35:39, time (data): 1.157 (0.011)] eagle_pixel_x2_opt: 3.9866e+00 l1_pixel_x2_opt: 3.5468e-02 fft_frequency_x2_opt: 3.1928e-02 eagle_pixel_x4_opt: 6.1575e+00 l1_pixel_x4_opt: 5.1574e-02 fft_frequency_x4_opt: 4.3926e-02
610
+ 2025-11-04 16:26:19,446 INFO: [38_co..][epoch: 0, step: 200, lr:(2.500e-04,)] [eta: 1 day, 11:49:57, time (data): 1.099 (0.006)] eagle_pixel_x2_opt: 4.7869e+00 l1_pixel_x2_opt: 3.6885e-02 fft_frequency_x2_opt: 3.4497e-02 eagle_pixel_x4_opt: 7.4621e+00 l1_pixel_x4_opt: 5.7528e-02 fft_frequency_x4_opt: 4.8347e-02
611
+ 2025-11-04 16:28:04,736 INFO: [38_co..][epoch: 0, step: 300, lr:(2.500e-04,)] [eta: 1 day, 12:01:31, time (data): 1.053 (0.000)] eagle_pixel_x2_opt: 4.3357e+00 l1_pixel_x2_opt: 3.5033e-02 fft_frequency_x2_opt: 3.1801e-02 eagle_pixel_x4_opt: 7.0501e+00 l1_pixel_x4_opt: 5.5709e-02 fft_frequency_x4_opt: 4.5875e-02
612
+ 2025-11-04 16:29:50,163 INFO: [38_co..][epoch: 0, step: 400, lr:(2.500e-04,)] [eta: 1 day, 12:07:10, time (data): 1.054 (0.000)] eagle_pixel_x2_opt: 4.7769e+00 l1_pixel_x2_opt: 3.6266e-02 fft_frequency_x2_opt: 3.4324e-02 eagle_pixel_x4_opt: 7.3675e+00 l1_pixel_x4_opt: 5.5401e-02 fft_frequency_x4_opt: 4.7421e-02
613
+ 2025-11-04 16:31:33,816 INFO: [38_co..][epoch: 0, step: 500, lr:(2.500e-04,)] [eta: 1 day, 12:02:30, time (data): 1.036 (0.000)] eagle_pixel_x2_opt: 4.2649e+00 l1_pixel_x2_opt: 3.3435e-02 fft_frequency_x2_opt: 3.0485e-02 eagle_pixel_x4_opt: 6.4789e+00 l1_pixel_x4_opt: 5.1200e-02 fft_frequency_x4_opt: 4.2710e-02
614
+ 2025-11-04 16:33:16,785 INFO: [38_co..][epoch: 0, step: 600, lr:(2.500e-04,)] [eta: 1 day, 11:56:27, time (data): 1.033 (0.000)] eagle_pixel_x2_opt: 4.5858e+00 l1_pixel_x2_opt: 3.3850e-02 fft_frequency_x2_opt: 3.2226e-02 eagle_pixel_x4_opt: 6.8922e+00 l1_pixel_x4_opt: 5.2851e-02 fft_frequency_x4_opt: 4.4684e-02
615
+ 2025-11-04 16:35:00,279 INFO: [38_co..][epoch: 0, step: 700, lr:(2.500e-04,)] [eta: 1 day, 11:53:12, time (data): 1.035 (0.000)] eagle_pixel_x2_opt: 7.2760e+00 l1_pixel_x2_opt: 6.4827e-02 fft_frequency_x2_opt: 4.9087e-02 eagle_pixel_x4_opt: 8.4385e+00 l1_pixel_x4_opt: 1.0337e-01 fft_frequency_x4_opt: 6.1042e-02
616
+ 2025-11-04 16:36:42,821 INFO: [38_co..][epoch: 0, step: 800, lr:(2.500e-04,)] [eta: 1 day, 11:47:51, time (data): 1.030 (0.000)] eagle_pixel_x2_opt: 4.5191e+00 l1_pixel_x2_opt: 3.7611e-02 fft_frequency_x2_opt: 3.5145e-02 eagle_pixel_x4_opt: 7.1436e+00 l1_pixel_x4_opt: 5.6583e-02 fft_frequency_x4_opt: 4.8310e-02
617
+ 2025-11-04 16:38:25,933 INFO: [38_co..][epoch: 0, step: 900, lr:(2.500e-04,)] [eta: 1 day, 11:44:38, time (data): 1.031 (0.000)] eagle_pixel_x2_opt: 4.2590e+00 l1_pixel_x2_opt: 3.5996e-02 fft_frequency_x2_opt: 3.3157e-02 eagle_pixel_x4_opt: 6.5662e+00 l1_pixel_x4_opt: 5.5788e-02 fft_frequency_x4_opt: 4.6527e-02
618
+ 2025-11-04 16:40:08,357 INFO: [38_co..][epoch: 0, step: 1,000, lr:(2.500e-04,)] [eta: 1 day, 11:40:18, time (data): 1.028 (0.000)] eagle_pixel_x2_opt: 3.7622e+00 l1_pixel_x2_opt: 3.2101e-02 fft_frequency_x2_opt: 2.9383e-02 eagle_pixel_x4_opt: 6.1037e+00 l1_pixel_x4_opt: 5.2774e-02 fft_frequency_x4_opt: 4.2371e-02
04_11_2025/38_continue_archived_20251104_164819/basicsr_options.yaml ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 16:42:45 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 360
82
+ num_heads:
83
+ - 12
84
+ - 12
85
+ - 12
86
+ - 12
87
+ - 12
88
+ - 12
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ primary_head: x4
92
+ head_num_feat: 256
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
103
+ strict_load_g: true
104
+ resume_state: null
105
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
106
+ compile:
107
+ enabled: true
108
+ mode: auto
109
+ dynamic: true
110
+ fullgraph: false
111
+ backend: inductor
112
+ train:
113
+ ema_decay: 0.999
114
+ head_inputs:
115
+ x2:
116
+ lq: 256
117
+ gt: 512
118
+ x4:
119
+ lq: 128
120
+ gt: 512
121
+ optim_g:
122
+ type: Adam
123
+ lr: 0.00025
124
+ weight_decay: 0
125
+ betas:
126
+ - 0.9
127
+ - 0.99
128
+ grad_clip:
129
+ enabled: true
130
+ generator:
131
+ type: norm
132
+ max_norm: 0.4
133
+ norm_type: 2.0
134
+ scheduler:
135
+ type: MultiStepLR
136
+ milestones:
137
+ - 62500
138
+ - 93750
139
+ - 112500
140
+ gamma: 0.5
141
+ total_steps: 125000
142
+ warmup_iter: -1
143
+ eagle_pixel_x2_opt:
144
+ type: Eagle_Loss
145
+ loss_weight: 2.5e-05
146
+ reduction: mean
147
+ space: pixel
148
+ patch_size: 3
149
+ cutoff: 0.5
150
+ target: x2
151
+ l1_pixel_x2_opt:
152
+ type: L1Loss
153
+ loss_weight: 10.0
154
+ reduction: mean
155
+ space: pixel
156
+ target: x2
157
+ fft_frequency_x2_opt:
158
+ type: FFTFrequencyLoss
159
+ loss_weight: 1.0
160
+ reduction: mean
161
+ space: pixel
162
+ target: x2
163
+ norm: ortho
164
+ use_log_amplitude: false
165
+ alpha: 0.0
166
+ normalize_weight: true
167
+ eps: 1e-8
168
+ eagle_pixel_x4_opt:
169
+ type: Eagle_Loss
170
+ loss_weight: 5.0e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ l1_pixel_x4_opt:
177
+ type: L1Loss
178
+ loss_weight: 10.0
179
+ reduction: mean
180
+ space: pixel
181
+ target: x4
182
+ fft_frequency_x4_opt:
183
+ type: FFTFrequencyLoss
184
+ loss_weight: 1.0
185
+ reduction: mean
186
+ space: pixel
187
+ target: x4
188
+ norm: ortho
189
+ use_log_amplitude: false
190
+ alpha: 0.0
191
+ normalize_weight: true
192
+ eps: 1e-8
193
+ val:
194
+ val_freq: 1000
195
+ save_img: true
196
+ head_evals:
197
+ x2:
198
+ save_img: true
199
+ label: val_x2
200
+ val_sizes:
201
+ lq: 512
202
+ gt: 1024
203
+ metrics:
204
+ l1_latent:
205
+ type: L1Loss
206
+ space: latent
207
+ pixel_psnr_pt:
208
+ type: calculate_psnr_pt
209
+ space: pixel
210
+ crop_border: 2
211
+ test_y_channel: false
212
+ x4:
213
+ save_img: true
214
+ label: val_x4
215
+ val_sizes:
216
+ lq: 256
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ l2_latent:
223
+ type: MSELoss
224
+ space: latent
225
+ pixel_psnr_pt:
226
+ type: calculate_psnr_pt
227
+ space: pixel
228
+ crop_border: 2
229
+ test_y_channel: false
230
+ logger:
231
+ print_freq: 100
232
+ save_checkpoint_freq: 5000
233
+ use_tb_logger: true
234
+ wandb:
235
+ project: Swin2SR-Latent-SR
236
+ entity: kazanplova-it-more
237
+ resume_id: null
238
+ max_val_images: 10
239
+ dist_params:
240
+ backend: nccl
241
+ port: 29500
242
+ dist: true
243
+ load_networks_only: false
244
+ exp_name: 38_continue
245
+ name: 38_continue
04_11_2025/38_continue_archived_20251104_164819/train_38_continue_20251104_164245.log ADDED
@@ -0,0 +1,611 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 16:42:45,862 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-04 16:42:45,862 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 16
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 360
83
+ num_heads: [12, 12, 12, 12, 12, 12]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ primary_head: x4
87
+ head_num_feat: 256
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth
92
+ strict_load_g: True
93
+ resume_state: None
94
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
95
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/models
96
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/training_states
97
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue
98
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/38_continue/visualization
99
+ ]
100
+ compile:[
101
+ enabled: True
102
+ mode: auto
103
+ dynamic: True
104
+ fullgraph: False
105
+ backend: inductor
106
+ ]
107
+ train:[
108
+ ema_decay: 0.999
109
+ head_inputs:[
110
+ x2:[
111
+ lq: 256
112
+ gt: 512
113
+ ]
114
+ x4:[
115
+ lq: 128
116
+ gt: 512
117
+ ]
118
+ ]
119
+ optim_g:[
120
+ type: Adam
121
+ lr: 0.00025
122
+ weight_decay: 0
123
+ betas: [0.9, 0.99]
124
+ ]
125
+ grad_clip:[
126
+ enabled: True
127
+ generator:[
128
+ type: norm
129
+ max_norm: 0.4
130
+ norm_type: 2.0
131
+ ]
132
+ ]
133
+ scheduler:[
134
+ type: MultiStepLR
135
+ milestones: [62500, 93750, 112500]
136
+ gamma: 0.5
137
+ ]
138
+ total_steps: 125000
139
+ warmup_iter: -1
140
+ eagle_pixel_x2_opt:[
141
+ type: Eagle_Loss
142
+ loss_weight: 2.5e-05
143
+ reduction: mean
144
+ space: pixel
145
+ patch_size: 3
146
+ cutoff: 0.5
147
+ target: x2
148
+ ]
149
+ l1_pixel_x2_opt:[
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ ]
156
+ fft_frequency_x2_opt:[
157
+ type: FFTFrequencyLoss
158
+ loss_weight: 1.0
159
+ reduction: mean
160
+ space: pixel
161
+ target: x2
162
+ norm: ortho
163
+ use_log_amplitude: False
164
+ alpha: 0.0
165
+ normalize_weight: True
166
+ eps: 1e-8
167
+ ]
168
+ eagle_pixel_x4_opt:[
169
+ type: Eagle_Loss
170
+ loss_weight: 5e-05
171
+ reduction: mean
172
+ space: pixel
173
+ patch_size: 3
174
+ cutoff: 0.5
175
+ target: x4
176
+ ]
177
+ l1_pixel_x4_opt:[
178
+ type: L1Loss
179
+ loss_weight: 10.0
180
+ reduction: mean
181
+ space: pixel
182
+ target: x4
183
+ ]
184
+ fft_frequency_x4_opt:[
185
+ type: FFTFrequencyLoss
186
+ loss_weight: 1.0
187
+ reduction: mean
188
+ space: pixel
189
+ target: x4
190
+ norm: ortho
191
+ use_log_amplitude: False
192
+ alpha: 0.0
193
+ normalize_weight: True
194
+ eps: 1e-8
195
+ ]
196
+ ]
197
+ val:[
198
+ val_freq: 1000
199
+ save_img: True
200
+ head_evals:[
201
+ x2:[
202
+ save_img: True
203
+ label: val_x2
204
+ val_sizes:[
205
+ lq: 512
206
+ gt: 1024
207
+ ]
208
+ metrics:[
209
+ l1_latent:[
210
+ type: L1Loss
211
+ space: latent
212
+ ]
213
+ pixel_psnr_pt:[
214
+ type: calculate_psnr_pt
215
+ space: pixel
216
+ crop_border: 2
217
+ test_y_channel: False
218
+ ]
219
+ ]
220
+ ]
221
+ x4:[
222
+ save_img: True
223
+ label: val_x4
224
+ val_sizes:[
225
+ lq: 256
226
+ gt: 1024
227
+ ]
228
+ metrics:[
229
+ l1_latent:[
230
+ type: L1Loss
231
+ space: latent
232
+ ]
233
+ l2_latent:[
234
+ type: MSELoss
235
+ space: latent
236
+ ]
237
+ pixel_psnr_pt:[
238
+ type: calculate_psnr_pt
239
+ space: pixel
240
+ crop_border: 2
241
+ test_y_channel: False
242
+ ]
243
+ ]
244
+ ]
245
+ ]
246
+ ]
247
+ logger:[
248
+ print_freq: 100
249
+ save_checkpoint_freq: 5000
250
+ use_tb_logger: True
251
+ wandb:[
252
+ project: Swin2SR-Latent-SR
253
+ entity: kazanplova-it-more
254
+ resume_id: None
255
+ max_val_images: 10
256
+ ]
257
+ ]
258
+ dist_params:[
259
+ backend: nccl
260
+ port: 29500
261
+ dist: True
262
+ ]
263
+ load_networks_only: False
264
+ exp_name: 38_continue
265
+ name: 38_continue
266
+ dist: True
267
+ rank: 0
268
+ world_size: 6
269
+ auto_resume: False
270
+ is_train: True
271
+ root_path: /data/kazanplova/latent_vae_upscale_train
272
+
273
+ 2025-11-04 16:42:47,659 INFO: Use wandb logger with id=elsbc4qx; project=Swin2SR-Latent-SR.
274
+ 2025-11-04 16:43:01,597 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
275
+ 2025-11-04 16:43:01,598 INFO: Training statistics:
276
+ Number of train images: 4858507
277
+ Dataset enlarge ratio: 1
278
+ Batch size per gpu: 8
279
+ World size (gpu number): 6
280
+ Steps per epoch: 101219
281
+ Configured training steps: 125000
282
+ Approximate epochs to cover: 2.
283
+ 2025-11-04 16:43:01,602 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
284
+ 2025-11-04 16:43:01,602 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
285
+ 2025-11-04 16:43:01,604 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
286
+ 2025-11-04 16:43:02,075 INFO: Network [SwinIRMultiHead] is created.
287
+ 2025-11-04 16:43:04,296 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 54,917,584
288
+ 2025-11-04 16:43:04,297 INFO: SwinIRMultiHead(
289
+ (conv_first): Conv2d(16, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
290
+ (patch_embed): PatchEmbed(
291
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
292
+ )
293
+ (patch_unembed): PatchUnEmbed()
294
+ (pos_drop): Dropout(p=0.0, inplace=False)
295
+ (layers): ModuleList(
296
+ (0): RSTB(
297
+ (residual_group): BasicLayer(
298
+ dim=360, input_resolution=(32, 32), depth=6
299
+ (blocks): ModuleList(
300
+ (0): SwinTransformerBlock(
301
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
302
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
303
+ (attn): WindowAttention(
304
+ dim=360, window_size=(16, 16), num_heads=12
305
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
306
+ (attn_drop): Dropout(p=0.0, inplace=False)
307
+ (proj): Linear(in_features=360, out_features=360, bias=True)
308
+ (proj_drop): Dropout(p=0.0, inplace=False)
309
+ (softmax): Softmax(dim=-1)
310
+ )
311
+ (drop_path): Identity()
312
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
313
+ (mlp): Mlp(
314
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
315
+ (act): GELU(approximate='none')
316
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
317
+ (drop): Dropout(p=0.0, inplace=False)
318
+ )
319
+ )
320
+ (1): SwinTransformerBlock(
321
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
322
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
323
+ (attn): WindowAttention(
324
+ dim=360, window_size=(16, 16), num_heads=12
325
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
326
+ (attn_drop): Dropout(p=0.0, inplace=False)
327
+ (proj): Linear(in_features=360, out_features=360, bias=True)
328
+ (proj_drop): Dropout(p=0.0, inplace=False)
329
+ (softmax): Softmax(dim=-1)
330
+ )
331
+ (drop_path): DropPath()
332
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
333
+ (mlp): Mlp(
334
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
335
+ (act): GELU(approximate='none')
336
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
337
+ (drop): Dropout(p=0.0, inplace=False)
338
+ )
339
+ )
340
+ (2): SwinTransformerBlock(
341
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
342
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
343
+ (attn): WindowAttention(
344
+ dim=360, window_size=(16, 16), num_heads=12
345
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
346
+ (attn_drop): Dropout(p=0.0, inplace=False)
347
+ (proj): Linear(in_features=360, out_features=360, bias=True)
348
+ (proj_drop): Dropout(p=0.0, inplace=False)
349
+ (softmax): Softmax(dim=-1)
350
+ )
351
+ (drop_path): DropPath()
352
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
353
+ (mlp): Mlp(
354
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
355
+ (act): GELU(approximate='none')
356
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
357
+ (drop): Dropout(p=0.0, inplace=False)
358
+ )
359
+ )
360
+ (3): SwinTransformerBlock(
361
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
362
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
363
+ (attn): WindowAttention(
364
+ dim=360, window_size=(16, 16), num_heads=12
365
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
366
+ (attn_drop): Dropout(p=0.0, inplace=False)
367
+ (proj): Linear(in_features=360, out_features=360, bias=True)
368
+ (proj_drop): Dropout(p=0.0, inplace=False)
369
+ (softmax): Softmax(dim=-1)
370
+ )
371
+ (drop_path): DropPath()
372
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
373
+ (mlp): Mlp(
374
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
375
+ (act): GELU(approximate='none')
376
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
377
+ (drop): Dropout(p=0.0, inplace=False)
378
+ )
379
+ )
380
+ (4): SwinTransformerBlock(
381
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
382
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
383
+ (attn): WindowAttention(
384
+ dim=360, window_size=(16, 16), num_heads=12
385
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
386
+ (attn_drop): Dropout(p=0.0, inplace=False)
387
+ (proj): Linear(in_features=360, out_features=360, bias=True)
388
+ (proj_drop): Dropout(p=0.0, inplace=False)
389
+ (softmax): Softmax(dim=-1)
390
+ )
391
+ (drop_path): DropPath()
392
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
393
+ (mlp): Mlp(
394
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
395
+ (act): GELU(approximate='none')
396
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
397
+ (drop): Dropout(p=0.0, inplace=False)
398
+ )
399
+ )
400
+ (5): SwinTransformerBlock(
401
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
402
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
403
+ (attn): WindowAttention(
404
+ dim=360, window_size=(16, 16), num_heads=12
405
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
406
+ (attn_drop): Dropout(p=0.0, inplace=False)
407
+ (proj): Linear(in_features=360, out_features=360, bias=True)
408
+ (proj_drop): Dropout(p=0.0, inplace=False)
409
+ (softmax): Softmax(dim=-1)
410
+ )
411
+ (drop_path): DropPath()
412
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
413
+ (mlp): Mlp(
414
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
415
+ (act): GELU(approximate='none')
416
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
417
+ (drop): Dropout(p=0.0, inplace=False)
418
+ )
419
+ )
420
+ )
421
+ )
422
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
423
+ (patch_embed): PatchEmbed()
424
+ (patch_unembed): PatchUnEmbed()
425
+ )
426
+ (1-5): 5 x RSTB(
427
+ (residual_group): BasicLayer(
428
+ dim=360, input_resolution=(32, 32), depth=6
429
+ (blocks): ModuleList(
430
+ (0): SwinTransformerBlock(
431
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
432
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
433
+ (attn): WindowAttention(
434
+ dim=360, window_size=(16, 16), num_heads=12
435
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
436
+ (attn_drop): Dropout(p=0.0, inplace=False)
437
+ (proj): Linear(in_features=360, out_features=360, bias=True)
438
+ (proj_drop): Dropout(p=0.0, inplace=False)
439
+ (softmax): Softmax(dim=-1)
440
+ )
441
+ (drop_path): DropPath()
442
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
443
+ (mlp): Mlp(
444
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
445
+ (act): GELU(approximate='none')
446
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
447
+ (drop): Dropout(p=0.0, inplace=False)
448
+ )
449
+ )
450
+ (1): SwinTransformerBlock(
451
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
452
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
453
+ (attn): WindowAttention(
454
+ dim=360, window_size=(16, 16), num_heads=12
455
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
456
+ (attn_drop): Dropout(p=0.0, inplace=False)
457
+ (proj): Linear(in_features=360, out_features=360, bias=True)
458
+ (proj_drop): Dropout(p=0.0, inplace=False)
459
+ (softmax): Softmax(dim=-1)
460
+ )
461
+ (drop_path): DropPath()
462
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
463
+ (mlp): Mlp(
464
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
465
+ (act): GELU(approximate='none')
466
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
467
+ (drop): Dropout(p=0.0, inplace=False)
468
+ )
469
+ )
470
+ (2): SwinTransformerBlock(
471
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
472
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
473
+ (attn): WindowAttention(
474
+ dim=360, window_size=(16, 16), num_heads=12
475
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
476
+ (attn_drop): Dropout(p=0.0, inplace=False)
477
+ (proj): Linear(in_features=360, out_features=360, bias=True)
478
+ (proj_drop): Dropout(p=0.0, inplace=False)
479
+ (softmax): Softmax(dim=-1)
480
+ )
481
+ (drop_path): DropPath()
482
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
483
+ (mlp): Mlp(
484
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
485
+ (act): GELU(approximate='none')
486
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
487
+ (drop): Dropout(p=0.0, inplace=False)
488
+ )
489
+ )
490
+ (3): SwinTransformerBlock(
491
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
492
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
493
+ (attn): WindowAttention(
494
+ dim=360, window_size=(16, 16), num_heads=12
495
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
496
+ (attn_drop): Dropout(p=0.0, inplace=False)
497
+ (proj): Linear(in_features=360, out_features=360, bias=True)
498
+ (proj_drop): Dropout(p=0.0, inplace=False)
499
+ (softmax): Softmax(dim=-1)
500
+ )
501
+ (drop_path): DropPath()
502
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
503
+ (mlp): Mlp(
504
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
505
+ (act): GELU(approximate='none')
506
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
507
+ (drop): Dropout(p=0.0, inplace=False)
508
+ )
509
+ )
510
+ (4): SwinTransformerBlock(
511
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=0, mlp_ratio=2.0
512
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
513
+ (attn): WindowAttention(
514
+ dim=360, window_size=(16, 16), num_heads=12
515
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
516
+ (attn_drop): Dropout(p=0.0, inplace=False)
517
+ (proj): Linear(in_features=360, out_features=360, bias=True)
518
+ (proj_drop): Dropout(p=0.0, inplace=False)
519
+ (softmax): Softmax(dim=-1)
520
+ )
521
+ (drop_path): DropPath()
522
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
523
+ (mlp): Mlp(
524
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
525
+ (act): GELU(approximate='none')
526
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
527
+ (drop): Dropout(p=0.0, inplace=False)
528
+ )
529
+ )
530
+ (5): SwinTransformerBlock(
531
+ dim=360, input_resolution=(32, 32), num_heads=12, window_size=16, shift_size=8, mlp_ratio=2.0
532
+ (norm1): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
533
+ (attn): WindowAttention(
534
+ dim=360, window_size=(16, 16), num_heads=12
535
+ (qkv): Linear(in_features=360, out_features=1080, bias=True)
536
+ (attn_drop): Dropout(p=0.0, inplace=False)
537
+ (proj): Linear(in_features=360, out_features=360, bias=True)
538
+ (proj_drop): Dropout(p=0.0, inplace=False)
539
+ (softmax): Softmax(dim=-1)
540
+ )
541
+ (drop_path): DropPath()
542
+ (norm2): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
543
+ (mlp): Mlp(
544
+ (fc1): Linear(in_features=360, out_features=720, bias=True)
545
+ (act): GELU(approximate='none')
546
+ (fc2): Linear(in_features=720, out_features=360, bias=True)
547
+ (drop): Dropout(p=0.0, inplace=False)
548
+ )
549
+ )
550
+ )
551
+ )
552
+ (conv): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
553
+ (patch_embed): PatchEmbed()
554
+ (patch_unembed): PatchUnEmbed()
555
+ )
556
+ )
557
+ (norm): LayerNorm((360,), eps=1e-05, elementwise_affine=True)
558
+ (conv_after_body): Conv2d(360, 360, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
559
+ (heads): ModuleDict(
560
+ (x2): _SwinIRPixelShuffleHead(
561
+ (conv_before): Sequential(
562
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
563
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
564
+ )
565
+ (upsample): Upsample(
566
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
567
+ (1): PixelShuffle(upscale_factor=2)
568
+ )
569
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ )
571
+ (x4): _SwinIRPixelShuffleHead(
572
+ (conv_before): Sequential(
573
+ (0): Conv2d(360, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
574
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
575
+ )
576
+ (upsample): Upsample(
577
+ (0): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
578
+ (1): PixelShuffle(upscale_factor=2)
579
+ (2): Conv2d(256, 1024, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (3): PixelShuffle(upscale_factor=2)
581
+ )
582
+ (conv_last): Conv2d(256, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ )
584
+ )
585
+ )
586
+ 2025-11-04 16:43:04,446 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
587
+ 2025-11-04 16:43:04,506 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
588
+ 2025-11-04 16:43:04,508 INFO: Use EMA with decay: 0.999
589
+ 2025-11-04 16:43:04,999 INFO: Network [SwinIRMultiHead] is created.
590
+ 2025-11-04 16:43:05,220 INFO: Loading: params_ema does not exist, use params.
591
+ 2025-11-04 16:43:05,221 INFO: Loading SwinIRMultiHead from runs/04_11_2025/38_archived_20251104_140039/models/net_g_15000.pth [key=params].
592
+ 2025-11-04 16:43:05,278 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
593
+ 2025-11-04 16:43:05,280 INFO: Loss [Eagle_Loss] is created.
594
+ 2025-11-04 16:43:05,280 INFO: Initialized eagle_pixel_x2_opt in pixel space (w=2.5e-05).
595
+ 2025-11-04 16:43:05,281 INFO: Loss [L1Loss] is created.
596
+ 2025-11-04 16:43:05,282 INFO: Initialized l1_pixel_x2_opt in pixel space (w=10.0).
597
+ 2025-11-04 16:43:05,283 INFO: Loss [FFTFrequencyLoss] is created.
598
+ 2025-11-04 16:43:05,284 INFO: Initialized fft_frequency_x2_opt in pixel space (w=1.0).
599
+ 2025-11-04 16:43:05,285 INFO: Loss [Eagle_Loss] is created.
600
+ 2025-11-04 16:43:05,286 INFO: Initialized eagle_pixel_x4_opt in pixel space (w=5e-05).
601
+ 2025-11-04 16:43:05,287 INFO: Loss [L1Loss] is created.
602
+ 2025-11-04 16:43:05,288 INFO: Initialized l1_pixel_x4_opt in pixel space (w=10.0).
603
+ 2025-11-04 16:43:05,289 INFO: Loss [FFTFrequencyLoss] is created.
604
+ 2025-11-04 16:43:05,290 INFO: Initialized fft_frequency_x4_opt in pixel space (w=1.0).
605
+ 2025-11-04 16:43:05,292 INFO: Precision configuration — train: bf16, eval: fp32
606
+ 2025-11-04 16:43:05,292 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
607
+ 2025-11-04 16:43:05,293 INFO: Model [SwinIRLatentModelMultiHead] is created.
608
+ 2025-11-04 16:44:21,025 INFO: Use cuda prefetch dataloader
609
+ 2025-11-04 16:44:21,026 INFO: Start training from epoch: 0, step: 0
610
+ 2025-11-04 16:44:22,761 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
611
+ 2025-11-04 16:46:22,069 INFO: [38_co..][epoch: 0, step: 100, lr:(2.500e-04,)] [eta: 1 day, 11:32:10, time (data): 1.210 (0.013)] eagle_pixel_x2_opt: 4.0121e+00 l1_pixel_x2_opt: 3.5740e-02 fft_frequency_x2_opt: 3.2103e-02 eagle_pixel_x4_opt: 6.1645e+00 l1_pixel_x4_opt: 5.1576e-02 fft_frequency_x4_opt: 4.3915e-02
04_11_2025/39/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 21:31:42 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 10
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: runs/04_11_2025/39_archived_20251104_212958/models/net_g_5000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 5000
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39/train_39_20251104_213142.log ADDED
The diff for this file is too large to render. See raw diff
 
04_11_2025/39_archived_20251104_171025/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:04:38 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 8
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0002
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_171025/train_39_20251104_170438.log ADDED
@@ -0,0 +1,633 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:04:38,209 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-04 17:04:38,209 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 8
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0002
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:04:40,013 INFO: Use wandb logger with id=ao6kzb5j; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:04:53,578 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:04:53,579 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 8
296
+ World size (gpu number): 6
297
+ Steps per epoch: 101219
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 2.
300
+ 2025-11-04 17:04:53,582 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:04:53,583 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:04:53,584 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
303
+ 2025-11-04 17:04:53,713 INFO: Network [SwinIRMultiHead] is created.
304
+ 2025-11-04 17:04:55,700 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
305
+ 2025-11-04 17:04:55,701 INFO: SwinIRMultiHead(
306
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
307
+ (patch_embed): PatchEmbed(
308
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
309
+ )
310
+ (patch_unembed): PatchUnEmbed()
311
+ (pos_drop): Dropout(p=0.0, inplace=False)
312
+ (layers): ModuleList(
313
+ (0): RSTB(
314
+ (residual_group): BasicLayer(
315
+ dim=180, input_resolution=(32, 32), depth=6
316
+ (blocks): ModuleList(
317
+ (0): SwinTransformerBlock(
318
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
319
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=180, window_size=(8, 8), num_heads=6
322
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=180, out_features=180, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): Identity()
329
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (1): SwinTransformerBlock(
338
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
339
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=180, window_size=(8, 8), num_heads=6
342
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=180, out_features=180, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (2): SwinTransformerBlock(
358
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
359
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=180, window_size=(8, 8), num_heads=6
362
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=180, out_features=180, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (3): SwinTransformerBlock(
378
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
379
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=180, window_size=(8, 8), num_heads=6
382
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=180, out_features=180, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (4): SwinTransformerBlock(
398
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
399
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=180, window_size=(8, 8), num_heads=6
402
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=180, out_features=180, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ (5): SwinTransformerBlock(
418
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, 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
+ )
438
+ )
439
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
440
+ (patch_embed): PatchEmbed()
441
+ (patch_unembed): PatchUnEmbed()
442
+ )
443
+ (1-5): 5 x RSTB(
444
+ (residual_group): BasicLayer(
445
+ dim=180, input_resolution=(32, 32), depth=6
446
+ (blocks): ModuleList(
447
+ (0): SwinTransformerBlock(
448
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
449
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=180, window_size=(8, 8), num_heads=6
452
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=180, out_features=180, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (1): SwinTransformerBlock(
468
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
469
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=180, window_size=(8, 8), num_heads=6
472
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=180, out_features=180, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (2): SwinTransformerBlock(
488
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
489
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=180, window_size=(8, 8), num_heads=6
492
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=180, out_features=180, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (3): SwinTransformerBlock(
508
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
509
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=180, window_size=(8, 8), num_heads=6
512
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=180, out_features=180, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (4): SwinTransformerBlock(
528
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
529
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=180, window_size=(8, 8), num_heads=6
532
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=180, out_features=180, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ (5): SwinTransformerBlock(
548
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
549
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
550
+ (attn): WindowAttention(
551
+ dim=180, window_size=(8, 8), num_heads=6
552
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
553
+ (attn_drop): Dropout(p=0.0, inplace=False)
554
+ (proj): Linear(in_features=180, out_features=180, bias=True)
555
+ (proj_drop): Dropout(p=0.0, inplace=False)
556
+ (softmax): Softmax(dim=-1)
557
+ )
558
+ (drop_path): DropPath()
559
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
560
+ (mlp): Mlp(
561
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
562
+ (act): GELU(approximate='none')
563
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
564
+ (drop): Dropout(p=0.0, inplace=False)
565
+ )
566
+ )
567
+ )
568
+ )
569
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ (patch_embed): PatchEmbed()
571
+ (patch_unembed): PatchUnEmbed()
572
+ )
573
+ )
574
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
575
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
576
+ (heads): ModuleDict(
577
+ (x2): _SwinIRPixelShuffleHead(
578
+ (conv_before): Sequential(
579
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
581
+ )
582
+ (upsample): Upsample(
583
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
584
+ (1): PixelShuffle(upscale_factor=2)
585
+ )
586
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
587
+ )
588
+ (x4): _SwinIRPixelShuffleHead(
589
+ (conv_before): Sequential(
590
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
591
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
592
+ )
593
+ (upsample): Upsample(
594
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
595
+ (1): PixelShuffle(upscale_factor=2)
596
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
597
+ (3): PixelShuffle(upscale_factor=2)
598
+ )
599
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
600
+ )
601
+ )
602
+ )
603
+ 2025-11-04 17:04:56,149 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
604
+ 2025-11-04 17:04:56,172 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
605
+ 2025-11-04 17:04:56,174 INFO: Use EMA with decay: 0.999
606
+ 2025-11-04 17:04:56,279 INFO: Network [SwinIRMultiHead] is created.
607
+ 2025-11-04 17:04:56,340 INFO: Loading: params_ema does not exist, use params.
608
+ 2025-11-04 17:04:56,341 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
609
+ 2025-11-04 17:04:56,363 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
610
+ 2025-11-04 17:04:56,365 INFO: Loss [L1Loss] is created.
611
+ 2025-11-04 17:04:56,365 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
612
+ 2025-11-04 17:04:56,366 INFO: Loss [FFTFrequencyLoss] is created.
613
+ 2025-11-04 17:04:56,367 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
614
+ 2025-11-04 17:04:56,368 INFO: Loss [DownsampleConsistencyLoss] is created.
615
+ 2025-11-04 17:04:56,369 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
616
+ 2025-11-04 17:04:56,370 INFO: Loss [HighFrequencyL1Loss] is created.
617
+ 2025-11-04 17:04:56,371 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
618
+ 2025-11-04 17:04:56,372 INFO: Loss [L1Loss] is created.
619
+ 2025-11-04 17:04:56,372 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
620
+ 2025-11-04 17:04:56,372 INFO: Loss [FFTFrequencyLoss] is created.
621
+ 2025-11-04 17:04:56,373 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
622
+ 2025-11-04 17:04:56,374 INFO: Loss [DownsampleConsistencyLoss] is created.
623
+ 2025-11-04 17:04:56,375 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
624
+ 2025-11-04 17:04:56,375 INFO: Loss [HighFrequencyL1Loss] is created.
625
+ 2025-11-04 17:04:56,376 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
626
+ 2025-11-04 17:04:56,378 INFO: Precision configuration — train: bf16, eval: fp32
627
+ 2025-11-04 17:04:56,378 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
628
+ 2025-11-04 17:04:56,379 INFO: Model [SwinIRLatentModelMultiHead] is created.
629
+ 2025-11-04 17:06:14,307 INFO: Use cuda prefetch dataloader
630
+ 2025-11-04 17:06:14,308 INFO: Start training from epoch: 0, step: 0
631
+ 2025-11-04 17:06:16,834 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
632
+ 2025-11-04 17:08:06,469 INFO: [39..][epoch: 0, step: 100, lr:(2.000e-04,)] [eta: 1 day, 9:57:41, time (data): 1.122 (0.013)] l1_latent_x2_opt: 7.2474e-01 fft_frequency_x2_opt: 5.2474e-01 aux_downsample_x2_opt: 5.1147e-02 hf_pixel_x2_opt: 3.6085e-02 l1_latent_x4_opt: 8.1167e-01 fft_frequency_x4_opt: 6.0807e-01 aux_downsample_x4_opt: 6.0569e-02 hf_pixel_x4_opt: 3.5472e-02
633
+ 2025-11-04 17:09:44,360 INFO: [39..][epoch: 0, step: 200, lr:(2.000e-04,)] [eta: 1 day, 9:56:04, time (data): 1.050 (0.007)] l1_latent_x2_opt: 7.0972e-01 fft_frequency_x2_opt: 5.1855e-01 aux_downsample_x2_opt: 5.6912e-02 hf_pixel_x2_opt: 3.7748e-02 l1_latent_x4_opt: 8.0876e-01 fft_frequency_x4_opt: 6.1263e-01 aux_downsample_x4_opt: 6.9721e-02 hf_pixel_x4_opt: 3.9873e-02
04_11_2025/39_archived_20251104_171250/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:10:25 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 32
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_171250/train_39_20251104_171025.log ADDED
@@ -0,0 +1,631 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:10:25,033 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-04 17:10:25,033 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 32
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:10:27,012 INFO: Use wandb logger with id=gvww3tbe; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:10:40,716 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:10:40,717 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 32
296
+ World size (gpu number): 6
297
+ Steps per epoch: 25305
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 5.
300
+ 2025-11-04 17:10:40,720 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:10:40,721 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:10:40,722 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
303
+ 2025-11-04 17:10:40,851 INFO: Network [SwinIRMultiHead] is created.
304
+ 2025-11-04 17:10:42,926 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
305
+ 2025-11-04 17:10:42,927 INFO: SwinIRMultiHead(
306
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
307
+ (patch_embed): PatchEmbed(
308
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
309
+ )
310
+ (patch_unembed): PatchUnEmbed()
311
+ (pos_drop): Dropout(p=0.0, inplace=False)
312
+ (layers): ModuleList(
313
+ (0): RSTB(
314
+ (residual_group): BasicLayer(
315
+ dim=180, input_resolution=(32, 32), depth=6
316
+ (blocks): ModuleList(
317
+ (0): SwinTransformerBlock(
318
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
319
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=180, window_size=(8, 8), num_heads=6
322
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=180, out_features=180, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): Identity()
329
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (1): SwinTransformerBlock(
338
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
339
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=180, window_size=(8, 8), num_heads=6
342
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=180, out_features=180, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (2): SwinTransformerBlock(
358
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
359
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=180, window_size=(8, 8), num_heads=6
362
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=180, out_features=180, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (3): SwinTransformerBlock(
378
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
379
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=180, window_size=(8, 8), num_heads=6
382
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=180, out_features=180, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (4): SwinTransformerBlock(
398
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
399
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=180, window_size=(8, 8), num_heads=6
402
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=180, out_features=180, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ (5): SwinTransformerBlock(
418
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, 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
+ )
438
+ )
439
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
440
+ (patch_embed): PatchEmbed()
441
+ (patch_unembed): PatchUnEmbed()
442
+ )
443
+ (1-5): 5 x RSTB(
444
+ (residual_group): BasicLayer(
445
+ dim=180, input_resolution=(32, 32), depth=6
446
+ (blocks): ModuleList(
447
+ (0): SwinTransformerBlock(
448
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
449
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=180, window_size=(8, 8), num_heads=6
452
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=180, out_features=180, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (1): SwinTransformerBlock(
468
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
469
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=180, window_size=(8, 8), num_heads=6
472
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=180, out_features=180, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (2): SwinTransformerBlock(
488
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
489
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=180, window_size=(8, 8), num_heads=6
492
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=180, out_features=180, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (3): SwinTransformerBlock(
508
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
509
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=180, window_size=(8, 8), num_heads=6
512
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=180, out_features=180, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (4): SwinTransformerBlock(
528
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
529
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=180, window_size=(8, 8), num_heads=6
532
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=180, out_features=180, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ (5): SwinTransformerBlock(
548
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
549
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
550
+ (attn): WindowAttention(
551
+ dim=180, window_size=(8, 8), num_heads=6
552
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
553
+ (attn_drop): Dropout(p=0.0, inplace=False)
554
+ (proj): Linear(in_features=180, out_features=180, bias=True)
555
+ (proj_drop): Dropout(p=0.0, inplace=False)
556
+ (softmax): Softmax(dim=-1)
557
+ )
558
+ (drop_path): DropPath()
559
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
560
+ (mlp): Mlp(
561
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
562
+ (act): GELU(approximate='none')
563
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
564
+ (drop): Dropout(p=0.0, inplace=False)
565
+ )
566
+ )
567
+ )
568
+ )
569
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ (patch_embed): PatchEmbed()
571
+ (patch_unembed): PatchUnEmbed()
572
+ )
573
+ )
574
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
575
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
576
+ (heads): ModuleDict(
577
+ (x2): _SwinIRPixelShuffleHead(
578
+ (conv_before): Sequential(
579
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
581
+ )
582
+ (upsample): Upsample(
583
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
584
+ (1): PixelShuffle(upscale_factor=2)
585
+ )
586
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
587
+ )
588
+ (x4): _SwinIRPixelShuffleHead(
589
+ (conv_before): Sequential(
590
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
591
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
592
+ )
593
+ (upsample): Upsample(
594
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
595
+ (1): PixelShuffle(upscale_factor=2)
596
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
597
+ (3): PixelShuffle(upscale_factor=2)
598
+ )
599
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
600
+ )
601
+ )
602
+ )
603
+ 2025-11-04 17:10:42,978 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
604
+ 2025-11-04 17:10:43,000 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
605
+ 2025-11-04 17:10:43,002 INFO: Use EMA with decay: 0.999
606
+ 2025-11-04 17:10:43,111 INFO: Network [SwinIRMultiHead] is created.
607
+ 2025-11-04 17:10:43,170 INFO: Loading: params_ema does not exist, use params.
608
+ 2025-11-04 17:10:43,171 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
609
+ 2025-11-04 17:10:43,192 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
610
+ 2025-11-04 17:10:43,194 INFO: Loss [L1Loss] is created.
611
+ 2025-11-04 17:10:43,194 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
612
+ 2025-11-04 17:10:43,196 INFO: Loss [FFTFrequencyLoss] is created.
613
+ 2025-11-04 17:10:43,197 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
614
+ 2025-11-04 17:10:43,198 INFO: Loss [DownsampleConsistencyLoss] is created.
615
+ 2025-11-04 17:10:43,199 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
616
+ 2025-11-04 17:10:43,200 INFO: Loss [HighFrequencyL1Loss] is created.
617
+ 2025-11-04 17:10:43,201 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
618
+ 2025-11-04 17:10:43,202 INFO: Loss [L1Loss] is created.
619
+ 2025-11-04 17:10:43,202 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
620
+ 2025-11-04 17:10:43,203 INFO: Loss [FFTFrequencyLoss] is created.
621
+ 2025-11-04 17:10:43,204 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
622
+ 2025-11-04 17:10:43,205 INFO: Loss [DownsampleConsistencyLoss] is created.
623
+ 2025-11-04 17:10:43,205 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
624
+ 2025-11-04 17:10:43,206 INFO: Loss [HighFrequencyL1Loss] is created.
625
+ 2025-11-04 17:10:43,207 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
626
+ 2025-11-04 17:10:43,209 INFO: Precision configuration — train: bf16, eval: fp32
627
+ 2025-11-04 17:10:43,209 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
628
+ 2025-11-04 17:10:43,210 INFO: Model [SwinIRLatentModelMultiHead] is created.
629
+ 2025-11-04 17:11:59,782 INFO: Use cuda prefetch dataloader
630
+ 2025-11-04 17:11:59,783 INFO: Start training from epoch: 0, step: 0
631
+ 2025-11-04 17:12:01,526 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/39_archived_20251104_171656/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:12:50 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 8
42
+ batch_size_per_gpu: 24
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_171656/train_39_20251104_171250.log ADDED
@@ -0,0 +1,631 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:12:50,164 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-04 17:12:50,164 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: False
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 8
50
+ batch_size_per_gpu: 24
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:12:51,776 INFO: Use wandb logger with id=b01rpt88; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:13:04,536 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:13:04,538 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 24
296
+ World size (gpu number): 6
297
+ Steps per epoch: 33740
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 4.
300
+ 2025-11-04 17:13:04,541 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:13:04,541 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:13:04,543 WARNING: Forced find_unused_parameters=True for multi-head training because DDP requires it.
303
+ 2025-11-04 17:13:04,672 INFO: Network [SwinIRMultiHead] is created.
304
+ 2025-11-04 17:13:06,749 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
305
+ 2025-11-04 17:13:06,750 INFO: SwinIRMultiHead(
306
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
307
+ (patch_embed): PatchEmbed(
308
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
309
+ )
310
+ (patch_unembed): PatchUnEmbed()
311
+ (pos_drop): Dropout(p=0.0, inplace=False)
312
+ (layers): ModuleList(
313
+ (0): RSTB(
314
+ (residual_group): BasicLayer(
315
+ dim=180, input_resolution=(32, 32), depth=6
316
+ (blocks): ModuleList(
317
+ (0): SwinTransformerBlock(
318
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
319
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
320
+ (attn): WindowAttention(
321
+ dim=180, window_size=(8, 8), num_heads=6
322
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
323
+ (attn_drop): Dropout(p=0.0, inplace=False)
324
+ (proj): Linear(in_features=180, out_features=180, bias=True)
325
+ (proj_drop): Dropout(p=0.0, inplace=False)
326
+ (softmax): Softmax(dim=-1)
327
+ )
328
+ (drop_path): Identity()
329
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
330
+ (mlp): Mlp(
331
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
332
+ (act): GELU(approximate='none')
333
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
334
+ (drop): Dropout(p=0.0, inplace=False)
335
+ )
336
+ )
337
+ (1): SwinTransformerBlock(
338
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
339
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
340
+ (attn): WindowAttention(
341
+ dim=180, window_size=(8, 8), num_heads=6
342
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
343
+ (attn_drop): Dropout(p=0.0, inplace=False)
344
+ (proj): Linear(in_features=180, out_features=180, bias=True)
345
+ (proj_drop): Dropout(p=0.0, inplace=False)
346
+ (softmax): Softmax(dim=-1)
347
+ )
348
+ (drop_path): DropPath()
349
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
350
+ (mlp): Mlp(
351
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
352
+ (act): GELU(approximate='none')
353
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
354
+ (drop): Dropout(p=0.0, inplace=False)
355
+ )
356
+ )
357
+ (2): SwinTransformerBlock(
358
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
359
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
360
+ (attn): WindowAttention(
361
+ dim=180, window_size=(8, 8), num_heads=6
362
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
363
+ (attn_drop): Dropout(p=0.0, inplace=False)
364
+ (proj): Linear(in_features=180, out_features=180, bias=True)
365
+ (proj_drop): Dropout(p=0.0, inplace=False)
366
+ (softmax): Softmax(dim=-1)
367
+ )
368
+ (drop_path): DropPath()
369
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
370
+ (mlp): Mlp(
371
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
372
+ (act): GELU(approximate='none')
373
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
374
+ (drop): Dropout(p=0.0, inplace=False)
375
+ )
376
+ )
377
+ (3): SwinTransformerBlock(
378
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
379
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
380
+ (attn): WindowAttention(
381
+ dim=180, window_size=(8, 8), num_heads=6
382
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
383
+ (attn_drop): Dropout(p=0.0, inplace=False)
384
+ (proj): Linear(in_features=180, out_features=180, bias=True)
385
+ (proj_drop): Dropout(p=0.0, inplace=False)
386
+ (softmax): Softmax(dim=-1)
387
+ )
388
+ (drop_path): DropPath()
389
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
390
+ (mlp): Mlp(
391
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
392
+ (act): GELU(approximate='none')
393
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
394
+ (drop): Dropout(p=0.0, inplace=False)
395
+ )
396
+ )
397
+ (4): SwinTransformerBlock(
398
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
399
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
400
+ (attn): WindowAttention(
401
+ dim=180, window_size=(8, 8), num_heads=6
402
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
403
+ (attn_drop): Dropout(p=0.0, inplace=False)
404
+ (proj): Linear(in_features=180, out_features=180, bias=True)
405
+ (proj_drop): Dropout(p=0.0, inplace=False)
406
+ (softmax): Softmax(dim=-1)
407
+ )
408
+ (drop_path): DropPath()
409
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
410
+ (mlp): Mlp(
411
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
412
+ (act): GELU(approximate='none')
413
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
414
+ (drop): Dropout(p=0.0, inplace=False)
415
+ )
416
+ )
417
+ (5): SwinTransformerBlock(
418
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, 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
+ )
438
+ )
439
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
440
+ (patch_embed): PatchEmbed()
441
+ (patch_unembed): PatchUnEmbed()
442
+ )
443
+ (1-5): 5 x RSTB(
444
+ (residual_group): BasicLayer(
445
+ dim=180, input_resolution=(32, 32), depth=6
446
+ (blocks): ModuleList(
447
+ (0): SwinTransformerBlock(
448
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
449
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
450
+ (attn): WindowAttention(
451
+ dim=180, window_size=(8, 8), num_heads=6
452
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
453
+ (attn_drop): Dropout(p=0.0, inplace=False)
454
+ (proj): Linear(in_features=180, out_features=180, bias=True)
455
+ (proj_drop): Dropout(p=0.0, inplace=False)
456
+ (softmax): Softmax(dim=-1)
457
+ )
458
+ (drop_path): DropPath()
459
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
460
+ (mlp): Mlp(
461
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
462
+ (act): GELU(approximate='none')
463
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
464
+ (drop): Dropout(p=0.0, inplace=False)
465
+ )
466
+ )
467
+ (1): SwinTransformerBlock(
468
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
469
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
470
+ (attn): WindowAttention(
471
+ dim=180, window_size=(8, 8), num_heads=6
472
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
473
+ (attn_drop): Dropout(p=0.0, inplace=False)
474
+ (proj): Linear(in_features=180, out_features=180, bias=True)
475
+ (proj_drop): Dropout(p=0.0, inplace=False)
476
+ (softmax): Softmax(dim=-1)
477
+ )
478
+ (drop_path): DropPath()
479
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
480
+ (mlp): Mlp(
481
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
482
+ (act): GELU(approximate='none')
483
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
484
+ (drop): Dropout(p=0.0, inplace=False)
485
+ )
486
+ )
487
+ (2): SwinTransformerBlock(
488
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
489
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
490
+ (attn): WindowAttention(
491
+ dim=180, window_size=(8, 8), num_heads=6
492
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
493
+ (attn_drop): Dropout(p=0.0, inplace=False)
494
+ (proj): Linear(in_features=180, out_features=180, bias=True)
495
+ (proj_drop): Dropout(p=0.0, inplace=False)
496
+ (softmax): Softmax(dim=-1)
497
+ )
498
+ (drop_path): DropPath()
499
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
500
+ (mlp): Mlp(
501
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
502
+ (act): GELU(approximate='none')
503
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
504
+ (drop): Dropout(p=0.0, inplace=False)
505
+ )
506
+ )
507
+ (3): SwinTransformerBlock(
508
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
509
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
510
+ (attn): WindowAttention(
511
+ dim=180, window_size=(8, 8), num_heads=6
512
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
513
+ (attn_drop): Dropout(p=0.0, inplace=False)
514
+ (proj): Linear(in_features=180, out_features=180, bias=True)
515
+ (proj_drop): Dropout(p=0.0, inplace=False)
516
+ (softmax): Softmax(dim=-1)
517
+ )
518
+ (drop_path): DropPath()
519
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
520
+ (mlp): Mlp(
521
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
522
+ (act): GELU(approximate='none')
523
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
524
+ (drop): Dropout(p=0.0, inplace=False)
525
+ )
526
+ )
527
+ (4): SwinTransformerBlock(
528
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
529
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
530
+ (attn): WindowAttention(
531
+ dim=180, window_size=(8, 8), num_heads=6
532
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
533
+ (attn_drop): Dropout(p=0.0, inplace=False)
534
+ (proj): Linear(in_features=180, out_features=180, bias=True)
535
+ (proj_drop): Dropout(p=0.0, inplace=False)
536
+ (softmax): Softmax(dim=-1)
537
+ )
538
+ (drop_path): DropPath()
539
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
540
+ (mlp): Mlp(
541
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
542
+ (act): GELU(approximate='none')
543
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
544
+ (drop): Dropout(p=0.0, inplace=False)
545
+ )
546
+ )
547
+ (5): SwinTransformerBlock(
548
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
549
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
550
+ (attn): WindowAttention(
551
+ dim=180, window_size=(8, 8), num_heads=6
552
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
553
+ (attn_drop): Dropout(p=0.0, inplace=False)
554
+ (proj): Linear(in_features=180, out_features=180, bias=True)
555
+ (proj_drop): Dropout(p=0.0, inplace=False)
556
+ (softmax): Softmax(dim=-1)
557
+ )
558
+ (drop_path): DropPath()
559
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
560
+ (mlp): Mlp(
561
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
562
+ (act): GELU(approximate='none')
563
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
564
+ (drop): Dropout(p=0.0, inplace=False)
565
+ )
566
+ )
567
+ )
568
+ )
569
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
570
+ (patch_embed): PatchEmbed()
571
+ (patch_unembed): PatchUnEmbed()
572
+ )
573
+ )
574
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
575
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
576
+ (heads): ModuleDict(
577
+ (x2): _SwinIRPixelShuffleHead(
578
+ (conv_before): Sequential(
579
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
580
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
581
+ )
582
+ (upsample): Upsample(
583
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
584
+ (1): PixelShuffle(upscale_factor=2)
585
+ )
586
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
587
+ )
588
+ (x4): _SwinIRPixelShuffleHead(
589
+ (conv_before): Sequential(
590
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
591
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
592
+ )
593
+ (upsample): Upsample(
594
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
595
+ (1): PixelShuffle(upscale_factor=2)
596
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
597
+ (3): PixelShuffle(upscale_factor=2)
598
+ )
599
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
600
+ )
601
+ )
602
+ )
603
+ 2025-11-04 17:13:06,803 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
604
+ 2025-11-04 17:13:06,825 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
605
+ 2025-11-04 17:13:06,826 INFO: Use EMA with decay: 0.999
606
+ 2025-11-04 17:13:06,935 INFO: Network [SwinIRMultiHead] is created.
607
+ 2025-11-04 17:13:06,996 INFO: Loading: params_ema does not exist, use params.
608
+ 2025-11-04 17:13:06,997 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
609
+ 2025-11-04 17:13:07,017 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
610
+ 2025-11-04 17:13:07,019 INFO: Loss [L1Loss] is created.
611
+ 2025-11-04 17:13:07,019 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
612
+ 2025-11-04 17:13:07,020 INFO: Loss [FFTFrequencyLoss] is created.
613
+ 2025-11-04 17:13:07,021 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
614
+ 2025-11-04 17:13:07,022 INFO: Loss [DownsampleConsistencyLoss] is created.
615
+ 2025-11-04 17:13:07,023 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
616
+ 2025-11-04 17:13:07,024 INFO: Loss [HighFrequencyL1Loss] is created.
617
+ 2025-11-04 17:13:07,025 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
618
+ 2025-11-04 17:13:07,025 INFO: Loss [L1Loss] is created.
619
+ 2025-11-04 17:13:07,025 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
620
+ 2025-11-04 17:13:07,026 INFO: Loss [FFTFrequencyLoss] is created.
621
+ 2025-11-04 17:13:07,027 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
622
+ 2025-11-04 17:13:07,027 INFO: Loss [DownsampleConsistencyLoss] is created.
623
+ 2025-11-04 17:13:07,028 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
624
+ 2025-11-04 17:13:07,029 INFO: Loss [HighFrequencyL1Loss] is created.
625
+ 2025-11-04 17:13:07,030 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
626
+ 2025-11-04 17:13:07,031 INFO: Precision configuration — train: bf16, eval: fp32
627
+ 2025-11-04 17:13:07,032 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
628
+ 2025-11-04 17:13:07,033 INFO: Model [SwinIRLatentModelMultiHead] is created.
629
+ 2025-11-04 17:15:41,590 INFO: Use cuda prefetch dataloader
630
+ 2025-11-04 17:15:41,591 INFO: Start training from epoch: 0, step: 0
631
+ 2025-11-04 17:15:44,793 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/39_archived_20251104_172026/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:16:56 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 8
42
+ batch_size_per_gpu: 20
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_172026/train_39_20251104_171656.log ADDED
@@ -0,0 +1,630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:16:56,392 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-04 17:16:56,392 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: True
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 8
50
+ batch_size_per_gpu: 20
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:16:58,092 INFO: Use wandb logger with id=9lx2vhyx; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:17:10,541 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:17:10,542 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 20
296
+ World size (gpu number): 6
297
+ Steps per epoch: 40488
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 4.
300
+ 2025-11-04 17:17:10,544 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:17:10,545 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:17:10,672 INFO: Network [SwinIRMultiHead] is created.
303
+ 2025-11-04 17:17:12,762 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
304
+ 2025-11-04 17:17:12,763 INFO: SwinIRMultiHead(
305
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
306
+ (patch_embed): PatchEmbed(
307
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
308
+ )
309
+ (patch_unembed): PatchUnEmbed()
310
+ (pos_drop): Dropout(p=0.0, inplace=False)
311
+ (layers): ModuleList(
312
+ (0): RSTB(
313
+ (residual_group): BasicLayer(
314
+ dim=180, input_resolution=(32, 32), depth=6
315
+ (blocks): ModuleList(
316
+ (0): SwinTransformerBlock(
317
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
318
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
319
+ (attn): WindowAttention(
320
+ dim=180, window_size=(8, 8), num_heads=6
321
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
322
+ (attn_drop): Dropout(p=0.0, inplace=False)
323
+ (proj): Linear(in_features=180, out_features=180, bias=True)
324
+ (proj_drop): Dropout(p=0.0, inplace=False)
325
+ (softmax): Softmax(dim=-1)
326
+ )
327
+ (drop_path): Identity()
328
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
329
+ (mlp): Mlp(
330
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
331
+ (act): GELU(approximate='none')
332
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
333
+ (drop): Dropout(p=0.0, inplace=False)
334
+ )
335
+ )
336
+ (1): SwinTransformerBlock(
337
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
338
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
339
+ (attn): WindowAttention(
340
+ dim=180, window_size=(8, 8), num_heads=6
341
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
342
+ (attn_drop): Dropout(p=0.0, inplace=False)
343
+ (proj): Linear(in_features=180, out_features=180, bias=True)
344
+ (proj_drop): Dropout(p=0.0, inplace=False)
345
+ (softmax): Softmax(dim=-1)
346
+ )
347
+ (drop_path): DropPath()
348
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
349
+ (mlp): Mlp(
350
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
351
+ (act): GELU(approximate='none')
352
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
353
+ (drop): Dropout(p=0.0, inplace=False)
354
+ )
355
+ )
356
+ (2): SwinTransformerBlock(
357
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
358
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
359
+ (attn): WindowAttention(
360
+ dim=180, window_size=(8, 8), num_heads=6
361
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
362
+ (attn_drop): Dropout(p=0.0, inplace=False)
363
+ (proj): Linear(in_features=180, out_features=180, bias=True)
364
+ (proj_drop): Dropout(p=0.0, inplace=False)
365
+ (softmax): Softmax(dim=-1)
366
+ )
367
+ (drop_path): DropPath()
368
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
369
+ (mlp): Mlp(
370
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
371
+ (act): GELU(approximate='none')
372
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
373
+ (drop): Dropout(p=0.0, inplace=False)
374
+ )
375
+ )
376
+ (3): SwinTransformerBlock(
377
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
378
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
379
+ (attn): WindowAttention(
380
+ dim=180, window_size=(8, 8), num_heads=6
381
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
382
+ (attn_drop): Dropout(p=0.0, inplace=False)
383
+ (proj): Linear(in_features=180, out_features=180, bias=True)
384
+ (proj_drop): Dropout(p=0.0, inplace=False)
385
+ (softmax): Softmax(dim=-1)
386
+ )
387
+ (drop_path): DropPath()
388
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
389
+ (mlp): Mlp(
390
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
391
+ (act): GELU(approximate='none')
392
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
393
+ (drop): Dropout(p=0.0, inplace=False)
394
+ )
395
+ )
396
+ (4): SwinTransformerBlock(
397
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
398
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
399
+ (attn): WindowAttention(
400
+ dim=180, window_size=(8, 8), num_heads=6
401
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
402
+ (attn_drop): Dropout(p=0.0, inplace=False)
403
+ (proj): Linear(in_features=180, out_features=180, bias=True)
404
+ (proj_drop): Dropout(p=0.0, inplace=False)
405
+ (softmax): Softmax(dim=-1)
406
+ )
407
+ (drop_path): DropPath()
408
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
409
+ (mlp): Mlp(
410
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
411
+ (act): GELU(approximate='none')
412
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
413
+ (drop): Dropout(p=0.0, inplace=False)
414
+ )
415
+ )
416
+ (5): SwinTransformerBlock(
417
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
418
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
419
+ (attn): WindowAttention(
420
+ dim=180, window_size=(8, 8), num_heads=6
421
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
422
+ (attn_drop): Dropout(p=0.0, inplace=False)
423
+ (proj): Linear(in_features=180, out_features=180, bias=True)
424
+ (proj_drop): Dropout(p=0.0, inplace=False)
425
+ (softmax): Softmax(dim=-1)
426
+ )
427
+ (drop_path): DropPath()
428
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
429
+ (mlp): Mlp(
430
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
431
+ (act): GELU(approximate='none')
432
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
433
+ (drop): Dropout(p=0.0, inplace=False)
434
+ )
435
+ )
436
+ )
437
+ )
438
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
439
+ (patch_embed): PatchEmbed()
440
+ (patch_unembed): PatchUnEmbed()
441
+ )
442
+ (1-5): 5 x RSTB(
443
+ (residual_group): BasicLayer(
444
+ dim=180, input_resolution=(32, 32), depth=6
445
+ (blocks): ModuleList(
446
+ (0): SwinTransformerBlock(
447
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
448
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
449
+ (attn): WindowAttention(
450
+ dim=180, window_size=(8, 8), num_heads=6
451
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
452
+ (attn_drop): Dropout(p=0.0, inplace=False)
453
+ (proj): Linear(in_features=180, out_features=180, bias=True)
454
+ (proj_drop): Dropout(p=0.0, inplace=False)
455
+ (softmax): Softmax(dim=-1)
456
+ )
457
+ (drop_path): DropPath()
458
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
459
+ (mlp): Mlp(
460
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
461
+ (act): GELU(approximate='none')
462
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
463
+ (drop): Dropout(p=0.0, inplace=False)
464
+ )
465
+ )
466
+ (1): SwinTransformerBlock(
467
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
468
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
469
+ (attn): WindowAttention(
470
+ dim=180, window_size=(8, 8), num_heads=6
471
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
472
+ (attn_drop): Dropout(p=0.0, inplace=False)
473
+ (proj): Linear(in_features=180, out_features=180, bias=True)
474
+ (proj_drop): Dropout(p=0.0, inplace=False)
475
+ (softmax): Softmax(dim=-1)
476
+ )
477
+ (drop_path): DropPath()
478
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
479
+ (mlp): Mlp(
480
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
481
+ (act): GELU(approximate='none')
482
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
483
+ (drop): Dropout(p=0.0, inplace=False)
484
+ )
485
+ )
486
+ (2): SwinTransformerBlock(
487
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
488
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
489
+ (attn): WindowAttention(
490
+ dim=180, window_size=(8, 8), num_heads=6
491
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
492
+ (attn_drop): Dropout(p=0.0, inplace=False)
493
+ (proj): Linear(in_features=180, out_features=180, bias=True)
494
+ (proj_drop): Dropout(p=0.0, inplace=False)
495
+ (softmax): Softmax(dim=-1)
496
+ )
497
+ (drop_path): DropPath()
498
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
499
+ (mlp): Mlp(
500
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
501
+ (act): GELU(approximate='none')
502
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
503
+ (drop): Dropout(p=0.0, inplace=False)
504
+ )
505
+ )
506
+ (3): SwinTransformerBlock(
507
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
508
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
509
+ (attn): WindowAttention(
510
+ dim=180, window_size=(8, 8), num_heads=6
511
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
512
+ (attn_drop): Dropout(p=0.0, inplace=False)
513
+ (proj): Linear(in_features=180, out_features=180, bias=True)
514
+ (proj_drop): Dropout(p=0.0, inplace=False)
515
+ (softmax): Softmax(dim=-1)
516
+ )
517
+ (drop_path): DropPath()
518
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
519
+ (mlp): Mlp(
520
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
521
+ (act): GELU(approximate='none')
522
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
523
+ (drop): Dropout(p=0.0, inplace=False)
524
+ )
525
+ )
526
+ (4): SwinTransformerBlock(
527
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
528
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
529
+ (attn): WindowAttention(
530
+ dim=180, window_size=(8, 8), num_heads=6
531
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
532
+ (attn_drop): Dropout(p=0.0, inplace=False)
533
+ (proj): Linear(in_features=180, out_features=180, bias=True)
534
+ (proj_drop): Dropout(p=0.0, inplace=False)
535
+ (softmax): Softmax(dim=-1)
536
+ )
537
+ (drop_path): DropPath()
538
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
539
+ (mlp): Mlp(
540
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
541
+ (act): GELU(approximate='none')
542
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
543
+ (drop): Dropout(p=0.0, inplace=False)
544
+ )
545
+ )
546
+ (5): SwinTransformerBlock(
547
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
548
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
549
+ (attn): WindowAttention(
550
+ dim=180, window_size=(8, 8), num_heads=6
551
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
552
+ (attn_drop): Dropout(p=0.0, inplace=False)
553
+ (proj): Linear(in_features=180, out_features=180, bias=True)
554
+ (proj_drop): Dropout(p=0.0, inplace=False)
555
+ (softmax): Softmax(dim=-1)
556
+ )
557
+ (drop_path): DropPath()
558
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
559
+ (mlp): Mlp(
560
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
561
+ (act): GELU(approximate='none')
562
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
563
+ (drop): Dropout(p=0.0, inplace=False)
564
+ )
565
+ )
566
+ )
567
+ )
568
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
569
+ (patch_embed): PatchEmbed()
570
+ (patch_unembed): PatchUnEmbed()
571
+ )
572
+ )
573
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
574
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (heads): ModuleDict(
576
+ (x2): _SwinIRPixelShuffleHead(
577
+ (conv_before): Sequential(
578
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
579
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
580
+ )
581
+ (upsample): Upsample(
582
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ (1): PixelShuffle(upscale_factor=2)
584
+ )
585
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
586
+ )
587
+ (x4): _SwinIRPixelShuffleHead(
588
+ (conv_before): Sequential(
589
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
590
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
591
+ )
592
+ (upsample): Upsample(
593
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
594
+ (1): PixelShuffle(upscale_factor=2)
595
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
596
+ (3): PixelShuffle(upscale_factor=2)
597
+ )
598
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
599
+ )
600
+ )
601
+ )
602
+ 2025-11-04 17:17:12,813 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
603
+ 2025-11-04 17:17:12,835 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
604
+ 2025-11-04 17:17:12,837 INFO: Use EMA with decay: 0.999
605
+ 2025-11-04 17:17:12,945 INFO: Network [SwinIRMultiHead] is created.
606
+ 2025-11-04 17:17:13,005 INFO: Loading: params_ema does not exist, use params.
607
+ 2025-11-04 17:17:13,006 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
608
+ 2025-11-04 17:17:13,028 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
609
+ 2025-11-04 17:17:13,030 INFO: Loss [L1Loss] is created.
610
+ 2025-11-04 17:17:13,030 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
611
+ 2025-11-04 17:17:13,031 INFO: Loss [FFTFrequencyLoss] is created.
612
+ 2025-11-04 17:17:13,032 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
613
+ 2025-11-04 17:17:13,033 INFO: Loss [DownsampleConsistencyLoss] is created.
614
+ 2025-11-04 17:17:13,034 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
615
+ 2025-11-04 17:17:13,035 INFO: Loss [HighFrequencyL1Loss] is created.
616
+ 2025-11-04 17:17:13,036 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
617
+ 2025-11-04 17:17:13,037 INFO: Loss [L1Loss] is created.
618
+ 2025-11-04 17:17:13,038 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
619
+ 2025-11-04 17:17:13,038 INFO: Loss [FFTFrequencyLoss] is created.
620
+ 2025-11-04 17:17:13,038 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
621
+ 2025-11-04 17:17:13,038 INFO: Loss [DownsampleConsistencyLoss] is created.
622
+ 2025-11-04 17:17:13,038 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
623
+ 2025-11-04 17:17:13,039 INFO: Loss [HighFrequencyL1Loss] is created.
624
+ 2025-11-04 17:17:13,040 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
625
+ 2025-11-04 17:17:13,042 INFO: Precision configuration — train: bf16, eval: fp32
626
+ 2025-11-04 17:17:13,042 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
627
+ 2025-11-04 17:17:13,043 INFO: Model [SwinIRLatentModelMultiHead] is created.
628
+ 2025-11-04 17:19:39,512 INFO: Use cuda prefetch dataloader
629
+ 2025-11-04 17:19:39,513 INFO: Start training from epoch: 0, step: 0
630
+ 2025-11-04 17:19:42,688 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/39_archived_20251104_172358/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:20:26 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 8
42
+ batch_size_per_gpu: 16
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_172358/train_39_20251104_172026.log ADDED
@@ -0,0 +1,630 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:20:26,274 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-04 17:20:26,274 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: True
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 8
50
+ batch_size_per_gpu: 16
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:20:27,941 INFO: Use wandb logger with id=mg0c5tu9; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:20:40,469 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:20:40,470 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 16
296
+ World size (gpu number): 6
297
+ Steps per epoch: 50610
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 3.
300
+ 2025-11-04 17:20:40,474 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:20:40,475 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:20:40,602 INFO: Network [SwinIRMultiHead] is created.
303
+ 2025-11-04 17:20:42,650 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
304
+ 2025-11-04 17:20:42,651 INFO: SwinIRMultiHead(
305
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
306
+ (patch_embed): PatchEmbed(
307
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
308
+ )
309
+ (patch_unembed): PatchUnEmbed()
310
+ (pos_drop): Dropout(p=0.0, inplace=False)
311
+ (layers): ModuleList(
312
+ (0): RSTB(
313
+ (residual_group): BasicLayer(
314
+ dim=180, input_resolution=(32, 32), depth=6
315
+ (blocks): ModuleList(
316
+ (0): SwinTransformerBlock(
317
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
318
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
319
+ (attn): WindowAttention(
320
+ dim=180, window_size=(8, 8), num_heads=6
321
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
322
+ (attn_drop): Dropout(p=0.0, inplace=False)
323
+ (proj): Linear(in_features=180, out_features=180, bias=True)
324
+ (proj_drop): Dropout(p=0.0, inplace=False)
325
+ (softmax): Softmax(dim=-1)
326
+ )
327
+ (drop_path): Identity()
328
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
329
+ (mlp): Mlp(
330
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
331
+ (act): GELU(approximate='none')
332
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
333
+ (drop): Dropout(p=0.0, inplace=False)
334
+ )
335
+ )
336
+ (1): SwinTransformerBlock(
337
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
338
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
339
+ (attn): WindowAttention(
340
+ dim=180, window_size=(8, 8), num_heads=6
341
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
342
+ (attn_drop): Dropout(p=0.0, inplace=False)
343
+ (proj): Linear(in_features=180, out_features=180, bias=True)
344
+ (proj_drop): Dropout(p=0.0, inplace=False)
345
+ (softmax): Softmax(dim=-1)
346
+ )
347
+ (drop_path): DropPath()
348
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
349
+ (mlp): Mlp(
350
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
351
+ (act): GELU(approximate='none')
352
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
353
+ (drop): Dropout(p=0.0, inplace=False)
354
+ )
355
+ )
356
+ (2): SwinTransformerBlock(
357
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
358
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
359
+ (attn): WindowAttention(
360
+ dim=180, window_size=(8, 8), num_heads=6
361
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
362
+ (attn_drop): Dropout(p=0.0, inplace=False)
363
+ (proj): Linear(in_features=180, out_features=180, bias=True)
364
+ (proj_drop): Dropout(p=0.0, inplace=False)
365
+ (softmax): Softmax(dim=-1)
366
+ )
367
+ (drop_path): DropPath()
368
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
369
+ (mlp): Mlp(
370
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
371
+ (act): GELU(approximate='none')
372
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
373
+ (drop): Dropout(p=0.0, inplace=False)
374
+ )
375
+ )
376
+ (3): SwinTransformerBlock(
377
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
378
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
379
+ (attn): WindowAttention(
380
+ dim=180, window_size=(8, 8), num_heads=6
381
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
382
+ (attn_drop): Dropout(p=0.0, inplace=False)
383
+ (proj): Linear(in_features=180, out_features=180, bias=True)
384
+ (proj_drop): Dropout(p=0.0, inplace=False)
385
+ (softmax): Softmax(dim=-1)
386
+ )
387
+ (drop_path): DropPath()
388
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
389
+ (mlp): Mlp(
390
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
391
+ (act): GELU(approximate='none')
392
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
393
+ (drop): Dropout(p=0.0, inplace=False)
394
+ )
395
+ )
396
+ (4): SwinTransformerBlock(
397
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
398
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
399
+ (attn): WindowAttention(
400
+ dim=180, window_size=(8, 8), num_heads=6
401
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
402
+ (attn_drop): Dropout(p=0.0, inplace=False)
403
+ (proj): Linear(in_features=180, out_features=180, bias=True)
404
+ (proj_drop): Dropout(p=0.0, inplace=False)
405
+ (softmax): Softmax(dim=-1)
406
+ )
407
+ (drop_path): DropPath()
408
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
409
+ (mlp): Mlp(
410
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
411
+ (act): GELU(approximate='none')
412
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
413
+ (drop): Dropout(p=0.0, inplace=False)
414
+ )
415
+ )
416
+ (5): SwinTransformerBlock(
417
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
418
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
419
+ (attn): WindowAttention(
420
+ dim=180, window_size=(8, 8), num_heads=6
421
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
422
+ (attn_drop): Dropout(p=0.0, inplace=False)
423
+ (proj): Linear(in_features=180, out_features=180, bias=True)
424
+ (proj_drop): Dropout(p=0.0, inplace=False)
425
+ (softmax): Softmax(dim=-1)
426
+ )
427
+ (drop_path): DropPath()
428
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
429
+ (mlp): Mlp(
430
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
431
+ (act): GELU(approximate='none')
432
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
433
+ (drop): Dropout(p=0.0, inplace=False)
434
+ )
435
+ )
436
+ )
437
+ )
438
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
439
+ (patch_embed): PatchEmbed()
440
+ (patch_unembed): PatchUnEmbed()
441
+ )
442
+ (1-5): 5 x RSTB(
443
+ (residual_group): BasicLayer(
444
+ dim=180, input_resolution=(32, 32), depth=6
445
+ (blocks): ModuleList(
446
+ (0): SwinTransformerBlock(
447
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
448
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
449
+ (attn): WindowAttention(
450
+ dim=180, window_size=(8, 8), num_heads=6
451
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
452
+ (attn_drop): Dropout(p=0.0, inplace=False)
453
+ (proj): Linear(in_features=180, out_features=180, bias=True)
454
+ (proj_drop): Dropout(p=0.0, inplace=False)
455
+ (softmax): Softmax(dim=-1)
456
+ )
457
+ (drop_path): DropPath()
458
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
459
+ (mlp): Mlp(
460
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
461
+ (act): GELU(approximate='none')
462
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
463
+ (drop): Dropout(p=0.0, inplace=False)
464
+ )
465
+ )
466
+ (1): SwinTransformerBlock(
467
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
468
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
469
+ (attn): WindowAttention(
470
+ dim=180, window_size=(8, 8), num_heads=6
471
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
472
+ (attn_drop): Dropout(p=0.0, inplace=False)
473
+ (proj): Linear(in_features=180, out_features=180, bias=True)
474
+ (proj_drop): Dropout(p=0.0, inplace=False)
475
+ (softmax): Softmax(dim=-1)
476
+ )
477
+ (drop_path): DropPath()
478
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
479
+ (mlp): Mlp(
480
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
481
+ (act): GELU(approximate='none')
482
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
483
+ (drop): Dropout(p=0.0, inplace=False)
484
+ )
485
+ )
486
+ (2): SwinTransformerBlock(
487
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
488
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
489
+ (attn): WindowAttention(
490
+ dim=180, window_size=(8, 8), num_heads=6
491
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
492
+ (attn_drop): Dropout(p=0.0, inplace=False)
493
+ (proj): Linear(in_features=180, out_features=180, bias=True)
494
+ (proj_drop): Dropout(p=0.0, inplace=False)
495
+ (softmax): Softmax(dim=-1)
496
+ )
497
+ (drop_path): DropPath()
498
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
499
+ (mlp): Mlp(
500
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
501
+ (act): GELU(approximate='none')
502
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
503
+ (drop): Dropout(p=0.0, inplace=False)
504
+ )
505
+ )
506
+ (3): SwinTransformerBlock(
507
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
508
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
509
+ (attn): WindowAttention(
510
+ dim=180, window_size=(8, 8), num_heads=6
511
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
512
+ (attn_drop): Dropout(p=0.0, inplace=False)
513
+ (proj): Linear(in_features=180, out_features=180, bias=True)
514
+ (proj_drop): Dropout(p=0.0, inplace=False)
515
+ (softmax): Softmax(dim=-1)
516
+ )
517
+ (drop_path): DropPath()
518
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
519
+ (mlp): Mlp(
520
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
521
+ (act): GELU(approximate='none')
522
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
523
+ (drop): Dropout(p=0.0, inplace=False)
524
+ )
525
+ )
526
+ (4): SwinTransformerBlock(
527
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
528
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
529
+ (attn): WindowAttention(
530
+ dim=180, window_size=(8, 8), num_heads=6
531
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
532
+ (attn_drop): Dropout(p=0.0, inplace=False)
533
+ (proj): Linear(in_features=180, out_features=180, bias=True)
534
+ (proj_drop): Dropout(p=0.0, inplace=False)
535
+ (softmax): Softmax(dim=-1)
536
+ )
537
+ (drop_path): DropPath()
538
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
539
+ (mlp): Mlp(
540
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
541
+ (act): GELU(approximate='none')
542
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
543
+ (drop): Dropout(p=0.0, inplace=False)
544
+ )
545
+ )
546
+ (5): SwinTransformerBlock(
547
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
548
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
549
+ (attn): WindowAttention(
550
+ dim=180, window_size=(8, 8), num_heads=6
551
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
552
+ (attn_drop): Dropout(p=0.0, inplace=False)
553
+ (proj): Linear(in_features=180, out_features=180, bias=True)
554
+ (proj_drop): Dropout(p=0.0, inplace=False)
555
+ (softmax): Softmax(dim=-1)
556
+ )
557
+ (drop_path): DropPath()
558
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
559
+ (mlp): Mlp(
560
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
561
+ (act): GELU(approximate='none')
562
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
563
+ (drop): Dropout(p=0.0, inplace=False)
564
+ )
565
+ )
566
+ )
567
+ )
568
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
569
+ (patch_embed): PatchEmbed()
570
+ (patch_unembed): PatchUnEmbed()
571
+ )
572
+ )
573
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
574
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (heads): ModuleDict(
576
+ (x2): _SwinIRPixelShuffleHead(
577
+ (conv_before): Sequential(
578
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
579
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
580
+ )
581
+ (upsample): Upsample(
582
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ (1): PixelShuffle(upscale_factor=2)
584
+ )
585
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
586
+ )
587
+ (x4): _SwinIRPixelShuffleHead(
588
+ (conv_before): Sequential(
589
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
590
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
591
+ )
592
+ (upsample): Upsample(
593
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
594
+ (1): PixelShuffle(upscale_factor=2)
595
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
596
+ (3): PixelShuffle(upscale_factor=2)
597
+ )
598
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
599
+ )
600
+ )
601
+ )
602
+ 2025-11-04 17:20:42,724 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
603
+ 2025-11-04 17:20:42,754 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
604
+ 2025-11-04 17:20:42,756 INFO: Use EMA with decay: 0.999
605
+ 2025-11-04 17:20:42,957 INFO: Network [SwinIRMultiHead] is created.
606
+ 2025-11-04 17:20:43,049 INFO: Loading: params_ema does not exist, use params.
607
+ 2025-11-04 17:20:43,050 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
608
+ 2025-11-04 17:20:43,079 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
609
+ 2025-11-04 17:20:43,082 INFO: Loss [L1Loss] is created.
610
+ 2025-11-04 17:20:43,083 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
611
+ 2025-11-04 17:20:43,085 INFO: Loss [FFTFrequencyLoss] is created.
612
+ 2025-11-04 17:20:43,086 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
613
+ 2025-11-04 17:20:43,087 INFO: Loss [DownsampleConsistencyLoss] is created.
614
+ 2025-11-04 17:20:43,088 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
615
+ 2025-11-04 17:20:43,089 INFO: Loss [HighFrequencyL1Loss] is created.
616
+ 2025-11-04 17:20:43,090 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
617
+ 2025-11-04 17:20:43,091 INFO: Loss [L1Loss] is created.
618
+ 2025-11-04 17:20:43,092 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
619
+ 2025-11-04 17:20:43,093 INFO: Loss [FFTFrequencyLoss] is created.
620
+ 2025-11-04 17:20:43,094 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
621
+ 2025-11-04 17:20:43,095 INFO: Loss [DownsampleConsistencyLoss] is created.
622
+ 2025-11-04 17:20:43,096 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
623
+ 2025-11-04 17:20:43,097 INFO: Loss [HighFrequencyL1Loss] is created.
624
+ 2025-11-04 17:20:43,098 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
625
+ 2025-11-04 17:20:43,100 INFO: Precision configuration — train: bf16, eval: fp32
626
+ 2025-11-04 17:20:43,100 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
627
+ 2025-11-04 17:20:43,101 INFO: Model [SwinIRLatentModelMultiHead] is created.
628
+ 2025-11-04 17:23:12,237 INFO: Use cuda prefetch dataloader
629
+ 2025-11-04 17:23:12,238 INFO: Start training from epoch: 0, step: 0
630
+ 2025-11-04 17:23:15,243 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
04_11_2025/39_archived_20251104_174404/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:23:58 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 12
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 500
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_174404/train_39_20251104_172358.log ADDED
@@ -0,0 +1,645 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:23:58,544 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-04 17:23:58,544 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 6
22
+ manual_seed: 0
23
+ find_unused_parameters: True
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 12
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 500
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 6
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:24:00,577 INFO: Use wandb logger with id=809fuhnl; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:24:13,622 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:24:13,623 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 12
296
+ World size (gpu number): 6
297
+ Steps per epoch: 67480
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 2.
300
+ 2025-11-04 17:24:13,627 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:24:13,627 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:24:13,762 INFO: Network [SwinIRMultiHead] is created.
303
+ 2025-11-04 17:24:15,809 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
304
+ 2025-11-04 17:24:15,810 INFO: SwinIRMultiHead(
305
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
306
+ (patch_embed): PatchEmbed(
307
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
308
+ )
309
+ (patch_unembed): PatchUnEmbed()
310
+ (pos_drop): Dropout(p=0.0, inplace=False)
311
+ (layers): ModuleList(
312
+ (0): RSTB(
313
+ (residual_group): BasicLayer(
314
+ dim=180, input_resolution=(32, 32), depth=6
315
+ (blocks): ModuleList(
316
+ (0): SwinTransformerBlock(
317
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
318
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
319
+ (attn): WindowAttention(
320
+ dim=180, window_size=(8, 8), num_heads=6
321
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
322
+ (attn_drop): Dropout(p=0.0, inplace=False)
323
+ (proj): Linear(in_features=180, out_features=180, bias=True)
324
+ (proj_drop): Dropout(p=0.0, inplace=False)
325
+ (softmax): Softmax(dim=-1)
326
+ )
327
+ (drop_path): Identity()
328
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
329
+ (mlp): Mlp(
330
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
331
+ (act): GELU(approximate='none')
332
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
333
+ (drop): Dropout(p=0.0, inplace=False)
334
+ )
335
+ )
336
+ (1): SwinTransformerBlock(
337
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
338
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
339
+ (attn): WindowAttention(
340
+ dim=180, window_size=(8, 8), num_heads=6
341
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
342
+ (attn_drop): Dropout(p=0.0, inplace=False)
343
+ (proj): Linear(in_features=180, out_features=180, bias=True)
344
+ (proj_drop): Dropout(p=0.0, inplace=False)
345
+ (softmax): Softmax(dim=-1)
346
+ )
347
+ (drop_path): DropPath()
348
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
349
+ (mlp): Mlp(
350
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
351
+ (act): GELU(approximate='none')
352
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
353
+ (drop): Dropout(p=0.0, inplace=False)
354
+ )
355
+ )
356
+ (2): SwinTransformerBlock(
357
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
358
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
359
+ (attn): WindowAttention(
360
+ dim=180, window_size=(8, 8), num_heads=6
361
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
362
+ (attn_drop): Dropout(p=0.0, inplace=False)
363
+ (proj): Linear(in_features=180, out_features=180, bias=True)
364
+ (proj_drop): Dropout(p=0.0, inplace=False)
365
+ (softmax): Softmax(dim=-1)
366
+ )
367
+ (drop_path): DropPath()
368
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
369
+ (mlp): Mlp(
370
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
371
+ (act): GELU(approximate='none')
372
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
373
+ (drop): Dropout(p=0.0, inplace=False)
374
+ )
375
+ )
376
+ (3): SwinTransformerBlock(
377
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
378
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
379
+ (attn): WindowAttention(
380
+ dim=180, window_size=(8, 8), num_heads=6
381
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
382
+ (attn_drop): Dropout(p=0.0, inplace=False)
383
+ (proj): Linear(in_features=180, out_features=180, bias=True)
384
+ (proj_drop): Dropout(p=0.0, inplace=False)
385
+ (softmax): Softmax(dim=-1)
386
+ )
387
+ (drop_path): DropPath()
388
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
389
+ (mlp): Mlp(
390
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
391
+ (act): GELU(approximate='none')
392
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
393
+ (drop): Dropout(p=0.0, inplace=False)
394
+ )
395
+ )
396
+ (4): SwinTransformerBlock(
397
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
398
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
399
+ (attn): WindowAttention(
400
+ dim=180, window_size=(8, 8), num_heads=6
401
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
402
+ (attn_drop): Dropout(p=0.0, inplace=False)
403
+ (proj): Linear(in_features=180, out_features=180, bias=True)
404
+ (proj_drop): Dropout(p=0.0, inplace=False)
405
+ (softmax): Softmax(dim=-1)
406
+ )
407
+ (drop_path): DropPath()
408
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
409
+ (mlp): Mlp(
410
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
411
+ (act): GELU(approximate='none')
412
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
413
+ (drop): Dropout(p=0.0, inplace=False)
414
+ )
415
+ )
416
+ (5): SwinTransformerBlock(
417
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
418
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
419
+ (attn): WindowAttention(
420
+ dim=180, window_size=(8, 8), num_heads=6
421
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
422
+ (attn_drop): Dropout(p=0.0, inplace=False)
423
+ (proj): Linear(in_features=180, out_features=180, bias=True)
424
+ (proj_drop): Dropout(p=0.0, inplace=False)
425
+ (softmax): Softmax(dim=-1)
426
+ )
427
+ (drop_path): DropPath()
428
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
429
+ (mlp): Mlp(
430
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
431
+ (act): GELU(approximate='none')
432
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
433
+ (drop): Dropout(p=0.0, inplace=False)
434
+ )
435
+ )
436
+ )
437
+ )
438
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
439
+ (patch_embed): PatchEmbed()
440
+ (patch_unembed): PatchUnEmbed()
441
+ )
442
+ (1-5): 5 x RSTB(
443
+ (residual_group): BasicLayer(
444
+ dim=180, input_resolution=(32, 32), depth=6
445
+ (blocks): ModuleList(
446
+ (0): SwinTransformerBlock(
447
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
448
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
449
+ (attn): WindowAttention(
450
+ dim=180, window_size=(8, 8), num_heads=6
451
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
452
+ (attn_drop): Dropout(p=0.0, inplace=False)
453
+ (proj): Linear(in_features=180, out_features=180, bias=True)
454
+ (proj_drop): Dropout(p=0.0, inplace=False)
455
+ (softmax): Softmax(dim=-1)
456
+ )
457
+ (drop_path): DropPath()
458
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
459
+ (mlp): Mlp(
460
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
461
+ (act): GELU(approximate='none')
462
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
463
+ (drop): Dropout(p=0.0, inplace=False)
464
+ )
465
+ )
466
+ (1): SwinTransformerBlock(
467
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
468
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
469
+ (attn): WindowAttention(
470
+ dim=180, window_size=(8, 8), num_heads=6
471
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
472
+ (attn_drop): Dropout(p=0.0, inplace=False)
473
+ (proj): Linear(in_features=180, out_features=180, bias=True)
474
+ (proj_drop): Dropout(p=0.0, inplace=False)
475
+ (softmax): Softmax(dim=-1)
476
+ )
477
+ (drop_path): DropPath()
478
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
479
+ (mlp): Mlp(
480
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
481
+ (act): GELU(approximate='none')
482
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
483
+ (drop): Dropout(p=0.0, inplace=False)
484
+ )
485
+ )
486
+ (2): SwinTransformerBlock(
487
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
488
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
489
+ (attn): WindowAttention(
490
+ dim=180, window_size=(8, 8), num_heads=6
491
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
492
+ (attn_drop): Dropout(p=0.0, inplace=False)
493
+ (proj): Linear(in_features=180, out_features=180, bias=True)
494
+ (proj_drop): Dropout(p=0.0, inplace=False)
495
+ (softmax): Softmax(dim=-1)
496
+ )
497
+ (drop_path): DropPath()
498
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
499
+ (mlp): Mlp(
500
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
501
+ (act): GELU(approximate='none')
502
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
503
+ (drop): Dropout(p=0.0, inplace=False)
504
+ )
505
+ )
506
+ (3): SwinTransformerBlock(
507
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
508
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
509
+ (attn): WindowAttention(
510
+ dim=180, window_size=(8, 8), num_heads=6
511
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
512
+ (attn_drop): Dropout(p=0.0, inplace=False)
513
+ (proj): Linear(in_features=180, out_features=180, bias=True)
514
+ (proj_drop): Dropout(p=0.0, inplace=False)
515
+ (softmax): Softmax(dim=-1)
516
+ )
517
+ (drop_path): DropPath()
518
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
519
+ (mlp): Mlp(
520
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
521
+ (act): GELU(approximate='none')
522
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
523
+ (drop): Dropout(p=0.0, inplace=False)
524
+ )
525
+ )
526
+ (4): SwinTransformerBlock(
527
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
528
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
529
+ (attn): WindowAttention(
530
+ dim=180, window_size=(8, 8), num_heads=6
531
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
532
+ (attn_drop): Dropout(p=0.0, inplace=False)
533
+ (proj): Linear(in_features=180, out_features=180, bias=True)
534
+ (proj_drop): Dropout(p=0.0, inplace=False)
535
+ (softmax): Softmax(dim=-1)
536
+ )
537
+ (drop_path): DropPath()
538
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
539
+ (mlp): Mlp(
540
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
541
+ (act): GELU(approximate='none')
542
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
543
+ (drop): Dropout(p=0.0, inplace=False)
544
+ )
545
+ )
546
+ (5): SwinTransformerBlock(
547
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
548
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
549
+ (attn): WindowAttention(
550
+ dim=180, window_size=(8, 8), num_heads=6
551
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
552
+ (attn_drop): Dropout(p=0.0, inplace=False)
553
+ (proj): Linear(in_features=180, out_features=180, bias=True)
554
+ (proj_drop): Dropout(p=0.0, inplace=False)
555
+ (softmax): Softmax(dim=-1)
556
+ )
557
+ (drop_path): DropPath()
558
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
559
+ (mlp): Mlp(
560
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
561
+ (act): GELU(approximate='none')
562
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
563
+ (drop): Dropout(p=0.0, inplace=False)
564
+ )
565
+ )
566
+ )
567
+ )
568
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
569
+ (patch_embed): PatchEmbed()
570
+ (patch_unembed): PatchUnEmbed()
571
+ )
572
+ )
573
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
574
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (heads): ModuleDict(
576
+ (x2): _SwinIRPixelShuffleHead(
577
+ (conv_before): Sequential(
578
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
579
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
580
+ )
581
+ (upsample): Upsample(
582
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ (1): PixelShuffle(upscale_factor=2)
584
+ )
585
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
586
+ )
587
+ (x4): _SwinIRPixelShuffleHead(
588
+ (conv_before): Sequential(
589
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
590
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
591
+ )
592
+ (upsample): Upsample(
593
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
594
+ (1): PixelShuffle(upscale_factor=2)
595
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
596
+ (3): PixelShuffle(upscale_factor=2)
597
+ )
598
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
599
+ )
600
+ )
601
+ )
602
+ 2025-11-04 17:24:15,862 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
603
+ 2025-11-04 17:24:15,884 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
604
+ 2025-11-04 17:24:15,885 INFO: Use EMA with decay: 0.999
605
+ 2025-11-04 17:24:15,993 INFO: Network [SwinIRMultiHead] is created.
606
+ 2025-11-04 17:24:16,054 INFO: Loading: params_ema does not exist, use params.
607
+ 2025-11-04 17:24:16,055 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
608
+ 2025-11-04 17:24:16,076 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
609
+ 2025-11-04 17:24:16,078 INFO: Loss [L1Loss] is created.
610
+ 2025-11-04 17:24:16,078 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
611
+ 2025-11-04 17:24:16,079 INFO: Loss [FFTFrequencyLoss] is created.
612
+ 2025-11-04 17:24:16,080 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
613
+ 2025-11-04 17:24:16,082 INFO: Loss [DownsampleConsistencyLoss] is created.
614
+ 2025-11-04 17:24:16,083 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
615
+ 2025-11-04 17:24:16,084 INFO: Loss [HighFrequencyL1Loss] is created.
616
+ 2025-11-04 17:24:16,085 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
617
+ 2025-11-04 17:24:16,087 INFO: Loss [L1Loss] is created.
618
+ 2025-11-04 17:24:16,087 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
619
+ 2025-11-04 17:24:16,088 INFO: Loss [FFTFrequencyLoss] is created.
620
+ 2025-11-04 17:24:16,089 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
621
+ 2025-11-04 17:24:16,090 INFO: Loss [DownsampleConsistencyLoss] is created.
622
+ 2025-11-04 17:24:16,091 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
623
+ 2025-11-04 17:24:16,091 INFO: Loss [HighFrequencyL1Loss] is created.
624
+ 2025-11-04 17:24:16,092 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
625
+ 2025-11-04 17:24:16,095 INFO: Precision configuration — train: bf16, eval: fp32
626
+ 2025-11-04 17:24:16,095 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
627
+ 2025-11-04 17:24:16,096 INFO: Model [SwinIRLatentModelMultiHead] is created.
628
+ 2025-11-04 17:25:32,845 INFO: Use cuda prefetch dataloader
629
+ 2025-11-04 17:25:32,846 INFO: Start training from epoch: 0, step: 0
630
+ 2025-11-04 17:25:34,862 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
631
+ 2025-11-04 17:27:59,195 INFO: [39..][epoch: 0, step: 100, lr:(5.000e-04,)] [eta: 1 day, 21:51:56, time (data): 1.463 (0.014)] l1_latent_x2_opt: 7.2477e-01 fft_frequency_x2_opt: 5.1790e-01 aux_downsample_x2_opt: 5.1585e-02 hf_pixel_x2_opt: 3.2817e-02 l1_latent_x4_opt: 8.1886e-01 fft_frequency_x4_opt: 6.0872e-01 aux_downsample_x4_opt: 6.5579e-02 hf_pixel_x4_opt: 3.4039e-02
632
+ 2025-11-04 17:30:13,555 INFO: [39..][epoch: 0, step: 200, lr:(5.000e-04,)] [eta: 1 day, 22:12:05, time (data): 1.404 (0.007)] l1_latent_x2_opt: 7.2126e-01 fft_frequency_x2_opt: 5.1986e-01 aux_downsample_x2_opt: 5.6676e-02 hf_pixel_x2_opt: 3.7261e-02 l1_latent_x4_opt: 8.2266e-01 fft_frequency_x4_opt: 6.1523e-01 aux_downsample_x4_opt: 7.1628e-02 hf_pixel_x4_opt: 3.9245e-02
633
+ 2025-11-04 17:32:28,228 INFO: [39..][epoch: 0, step: 300, lr:(5.000e-04,)] [eta: 1 day, 22:19:31, time (data): 1.347 (0.000)] l1_latent_x2_opt: 7.2014e-01 fft_frequency_x2_opt: 5.1628e-01 aux_downsample_x2_opt: 5.6589e-02 hf_pixel_x2_opt: 3.3866e-02 l1_latent_x4_opt: 8.2612e-01 fft_frequency_x4_opt: 6.0872e-01 aux_downsample_x4_opt: 7.1573e-02 hf_pixel_x4_opt: 3.5252e-02
634
+ 2025-11-04 17:34:42,753 INFO: [39..][epoch: 0, step: 400, lr:(5.000e-04,)] [eta: 1 day, 22:21:21, time (data): 1.346 (0.000)] l1_latent_x2_opt: 7.1569e-01 fft_frequency_x2_opt: 5.2409e-01 aux_downsample_x2_opt: 5.2701e-02 hf_pixel_x2_opt: 3.3162e-02 l1_latent_x4_opt: 8.2035e-01 fft_frequency_x4_opt: 6.1784e-01 aux_downsample_x4_opt: 6.6638e-02 hf_pixel_x4_opt: 3.5358e-02
635
+ 2025-11-04 17:36:57,066 INFO: [39..][epoch: 0, step: 500, lr:(5.000e-04,)] [eta: 1 day, 22:20:42, time (data): 1.343 (0.000)] l1_latent_x2_opt: 7.2576e-01 fft_frequency_x2_opt: 5.2441e-01 aux_downsample_x2_opt: 4.9497e-02 hf_pixel_x2_opt: 3.1129e-02 l1_latent_x4_opt: 8.2374e-01 fft_frequency_x4_opt: 6.1068e-01 aux_downsample_x4_opt: 6.0516e-02 hf_pixel_x4_opt: 3.1338e-02
636
+ 2025-11-04 17:39:09,132 INFO: Validation val_x2
637
+ # l1_latent: 0.7635 Best: 0.7635 @ 500 iter
638
+ # pixel_psnr_pt: 28.7287 Best: 28.7287 @ 500 iter
639
+
640
+ 2025-11-04 17:41:18,080 INFO: Validation val_x4
641
+ # l1_latent: 0.8521 Best: 0.8521 @ 500 iter
642
+ # l2_latent: 1.1937 Best: 1.1937 @ 500 iter
643
+ # pixel_psnr_pt: 26.2661 Best: 26.2661 @ 500 iter
644
+
645
+ 2025-11-04 17:43:32,744 INFO: [39..][epoch: 0, step: 600, lr:(5.000e-04,)] [eta: 2 days, 13:21:09, time (data): 1.345 (0.000)] l1_latent_x2_opt: 7.3411e-01 fft_frequency_x2_opt: 5.2734e-01 aux_downsample_x2_opt: 5.4268e-02 hf_pixel_x2_opt: 3.5028e-02 l1_latent_x4_opt: 8.4425e-01 fft_frequency_x4_opt: 6.2565e-01 aux_downsample_x4_opt: 7.0657e-02 hf_pixel_x4_opt: 3.7107e-02
04_11_2025/39_archived_20251104_212958/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 17:44:04 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 12
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 5000
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_212958/train_39_20251104_174404.log ADDED
@@ -0,0 +1,690 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 17:44:04,636 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-04 17:44:04,636 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 8
22
+ manual_seed: 0
23
+ find_unused_parameters: True
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 12
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 5000
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 8
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 17:44:06,403 INFO: Use wandb logger with id=j67rxaon; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 17:44:19,059 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 17:44:19,060 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 12
296
+ World size (gpu number): 8
297
+ Steps per epoch: 50610
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 3.
300
+ 2025-11-04 17:44:19,064 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 17:44:19,065 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 17:44:19,195 INFO: Network [SwinIRMultiHead] is created.
303
+ 2025-11-04 17:44:21,462 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
304
+ 2025-11-04 17:44:21,463 INFO: SwinIRMultiHead(
305
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
306
+ (patch_embed): PatchEmbed(
307
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
308
+ )
309
+ (patch_unembed): PatchUnEmbed()
310
+ (pos_drop): Dropout(p=0.0, inplace=False)
311
+ (layers): ModuleList(
312
+ (0): RSTB(
313
+ (residual_group): BasicLayer(
314
+ dim=180, input_resolution=(32, 32), depth=6
315
+ (blocks): ModuleList(
316
+ (0): SwinTransformerBlock(
317
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
318
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
319
+ (attn): WindowAttention(
320
+ dim=180, window_size=(8, 8), num_heads=6
321
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
322
+ (attn_drop): Dropout(p=0.0, inplace=False)
323
+ (proj): Linear(in_features=180, out_features=180, bias=True)
324
+ (proj_drop): Dropout(p=0.0, inplace=False)
325
+ (softmax): Softmax(dim=-1)
326
+ )
327
+ (drop_path): Identity()
328
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
329
+ (mlp): Mlp(
330
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
331
+ (act): GELU(approximate='none')
332
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
333
+ (drop): Dropout(p=0.0, inplace=False)
334
+ )
335
+ )
336
+ (1): SwinTransformerBlock(
337
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
338
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
339
+ (attn): WindowAttention(
340
+ dim=180, window_size=(8, 8), num_heads=6
341
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
342
+ (attn_drop): Dropout(p=0.0, inplace=False)
343
+ (proj): Linear(in_features=180, out_features=180, bias=True)
344
+ (proj_drop): Dropout(p=0.0, inplace=False)
345
+ (softmax): Softmax(dim=-1)
346
+ )
347
+ (drop_path): DropPath()
348
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
349
+ (mlp): Mlp(
350
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
351
+ (act): GELU(approximate='none')
352
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
353
+ (drop): Dropout(p=0.0, inplace=False)
354
+ )
355
+ )
356
+ (2): SwinTransformerBlock(
357
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
358
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
359
+ (attn): WindowAttention(
360
+ dim=180, window_size=(8, 8), num_heads=6
361
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
362
+ (attn_drop): Dropout(p=0.0, inplace=False)
363
+ (proj): Linear(in_features=180, out_features=180, bias=True)
364
+ (proj_drop): Dropout(p=0.0, inplace=False)
365
+ (softmax): Softmax(dim=-1)
366
+ )
367
+ (drop_path): DropPath()
368
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
369
+ (mlp): Mlp(
370
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
371
+ (act): GELU(approximate='none')
372
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
373
+ (drop): Dropout(p=0.0, inplace=False)
374
+ )
375
+ )
376
+ (3): SwinTransformerBlock(
377
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
378
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
379
+ (attn): WindowAttention(
380
+ dim=180, window_size=(8, 8), num_heads=6
381
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
382
+ (attn_drop): Dropout(p=0.0, inplace=False)
383
+ (proj): Linear(in_features=180, out_features=180, bias=True)
384
+ (proj_drop): Dropout(p=0.0, inplace=False)
385
+ (softmax): Softmax(dim=-1)
386
+ )
387
+ (drop_path): DropPath()
388
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
389
+ (mlp): Mlp(
390
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
391
+ (act): GELU(approximate='none')
392
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
393
+ (drop): Dropout(p=0.0, inplace=False)
394
+ )
395
+ )
396
+ (4): SwinTransformerBlock(
397
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
398
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
399
+ (attn): WindowAttention(
400
+ dim=180, window_size=(8, 8), num_heads=6
401
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
402
+ (attn_drop): Dropout(p=0.0, inplace=False)
403
+ (proj): Linear(in_features=180, out_features=180, bias=True)
404
+ (proj_drop): Dropout(p=0.0, inplace=False)
405
+ (softmax): Softmax(dim=-1)
406
+ )
407
+ (drop_path): DropPath()
408
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
409
+ (mlp): Mlp(
410
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
411
+ (act): GELU(approximate='none')
412
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
413
+ (drop): Dropout(p=0.0, inplace=False)
414
+ )
415
+ )
416
+ (5): SwinTransformerBlock(
417
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
418
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
419
+ (attn): WindowAttention(
420
+ dim=180, window_size=(8, 8), num_heads=6
421
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
422
+ (attn_drop): Dropout(p=0.0, inplace=False)
423
+ (proj): Linear(in_features=180, out_features=180, bias=True)
424
+ (proj_drop): Dropout(p=0.0, inplace=False)
425
+ (softmax): Softmax(dim=-1)
426
+ )
427
+ (drop_path): DropPath()
428
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
429
+ (mlp): Mlp(
430
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
431
+ (act): GELU(approximate='none')
432
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
433
+ (drop): Dropout(p=0.0, inplace=False)
434
+ )
435
+ )
436
+ )
437
+ )
438
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
439
+ (patch_embed): PatchEmbed()
440
+ (patch_unembed): PatchUnEmbed()
441
+ )
442
+ (1-5): 5 x RSTB(
443
+ (residual_group): BasicLayer(
444
+ dim=180, input_resolution=(32, 32), depth=6
445
+ (blocks): ModuleList(
446
+ (0): SwinTransformerBlock(
447
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
448
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
449
+ (attn): WindowAttention(
450
+ dim=180, window_size=(8, 8), num_heads=6
451
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
452
+ (attn_drop): Dropout(p=0.0, inplace=False)
453
+ (proj): Linear(in_features=180, out_features=180, bias=True)
454
+ (proj_drop): Dropout(p=0.0, inplace=False)
455
+ (softmax): Softmax(dim=-1)
456
+ )
457
+ (drop_path): DropPath()
458
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
459
+ (mlp): Mlp(
460
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
461
+ (act): GELU(approximate='none')
462
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
463
+ (drop): Dropout(p=0.0, inplace=False)
464
+ )
465
+ )
466
+ (1): SwinTransformerBlock(
467
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
468
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
469
+ (attn): WindowAttention(
470
+ dim=180, window_size=(8, 8), num_heads=6
471
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
472
+ (attn_drop): Dropout(p=0.0, inplace=False)
473
+ (proj): Linear(in_features=180, out_features=180, bias=True)
474
+ (proj_drop): Dropout(p=0.0, inplace=False)
475
+ (softmax): Softmax(dim=-1)
476
+ )
477
+ (drop_path): DropPath()
478
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
479
+ (mlp): Mlp(
480
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
481
+ (act): GELU(approximate='none')
482
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
483
+ (drop): Dropout(p=0.0, inplace=False)
484
+ )
485
+ )
486
+ (2): SwinTransformerBlock(
487
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
488
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
489
+ (attn): WindowAttention(
490
+ dim=180, window_size=(8, 8), num_heads=6
491
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
492
+ (attn_drop): Dropout(p=0.0, inplace=False)
493
+ (proj): Linear(in_features=180, out_features=180, bias=True)
494
+ (proj_drop): Dropout(p=0.0, inplace=False)
495
+ (softmax): Softmax(dim=-1)
496
+ )
497
+ (drop_path): DropPath()
498
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
499
+ (mlp): Mlp(
500
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
501
+ (act): GELU(approximate='none')
502
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
503
+ (drop): Dropout(p=0.0, inplace=False)
504
+ )
505
+ )
506
+ (3): SwinTransformerBlock(
507
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
508
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
509
+ (attn): WindowAttention(
510
+ dim=180, window_size=(8, 8), num_heads=6
511
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
512
+ (attn_drop): Dropout(p=0.0, inplace=False)
513
+ (proj): Linear(in_features=180, out_features=180, bias=True)
514
+ (proj_drop): Dropout(p=0.0, inplace=False)
515
+ (softmax): Softmax(dim=-1)
516
+ )
517
+ (drop_path): DropPath()
518
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
519
+ (mlp): Mlp(
520
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
521
+ (act): GELU(approximate='none')
522
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
523
+ (drop): Dropout(p=0.0, inplace=False)
524
+ )
525
+ )
526
+ (4): SwinTransformerBlock(
527
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
528
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
529
+ (attn): WindowAttention(
530
+ dim=180, window_size=(8, 8), num_heads=6
531
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
532
+ (attn_drop): Dropout(p=0.0, inplace=False)
533
+ (proj): Linear(in_features=180, out_features=180, bias=True)
534
+ (proj_drop): Dropout(p=0.0, inplace=False)
535
+ (softmax): Softmax(dim=-1)
536
+ )
537
+ (drop_path): DropPath()
538
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
539
+ (mlp): Mlp(
540
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
541
+ (act): GELU(approximate='none')
542
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
543
+ (drop): Dropout(p=0.0, inplace=False)
544
+ )
545
+ )
546
+ (5): SwinTransformerBlock(
547
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
548
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
549
+ (attn): WindowAttention(
550
+ dim=180, window_size=(8, 8), num_heads=6
551
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
552
+ (attn_drop): Dropout(p=0.0, inplace=False)
553
+ (proj): Linear(in_features=180, out_features=180, bias=True)
554
+ (proj_drop): Dropout(p=0.0, inplace=False)
555
+ (softmax): Softmax(dim=-1)
556
+ )
557
+ (drop_path): DropPath()
558
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
559
+ (mlp): Mlp(
560
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
561
+ (act): GELU(approximate='none')
562
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
563
+ (drop): Dropout(p=0.0, inplace=False)
564
+ )
565
+ )
566
+ )
567
+ )
568
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
569
+ (patch_embed): PatchEmbed()
570
+ (patch_unembed): PatchUnEmbed()
571
+ )
572
+ )
573
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
574
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (heads): ModuleDict(
576
+ (x2): _SwinIRPixelShuffleHead(
577
+ (conv_before): Sequential(
578
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
579
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
580
+ )
581
+ (upsample): Upsample(
582
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ (1): PixelShuffle(upscale_factor=2)
584
+ )
585
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
586
+ )
587
+ (x4): _SwinIRPixelShuffleHead(
588
+ (conv_before): Sequential(
589
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
590
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
591
+ )
592
+ (upsample): Upsample(
593
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
594
+ (1): PixelShuffle(upscale_factor=2)
595
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
596
+ (3): PixelShuffle(upscale_factor=2)
597
+ )
598
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
599
+ )
600
+ )
601
+ )
602
+ 2025-11-04 17:44:21,542 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
603
+ 2025-11-04 17:44:21,574 WARNING: torch.compile failed for net_g; running in eager mode. Unrecognized mode=auto, should be one of: default, reduce-overhead, max-autotune-no-cudagraphs, max-autotune
604
+ 2025-11-04 17:44:21,576 INFO: Use EMA with decay: 0.999
605
+ 2025-11-04 17:44:21,758 INFO: Network [SwinIRMultiHead] is created.
606
+ 2025-11-04 17:44:21,851 INFO: Loading: params_ema does not exist, use params.
607
+ 2025-11-04 17:44:21,852 INFO: Loading SwinIRMultiHead from ./pretrained_weights/01_11_2025/31/models/net_g_110000.pth [key=params].
608
+ 2025-11-04 17:44:21,881 INFO: Torch.compile disabled for EMA network; validation runs in eager mode.
609
+ 2025-11-04 17:44:21,884 INFO: Loss [L1Loss] is created.
610
+ 2025-11-04 17:44:21,884 INFO: Initialized l1_latent_x2_opt in latent space (w=1.0).
611
+ 2025-11-04 17:44:21,885 INFO: Loss [FFTFrequencyLoss] is created.
612
+ 2025-11-04 17:44:21,886 INFO: Initialized fft_frequency_x2_opt in latent space (w=0.1).
613
+ 2025-11-04 17:44:21,887 INFO: Loss [DownsampleConsistencyLoss] is created.
614
+ 2025-11-04 17:44:21,888 INFO: Initialized aux_downsample_x2_opt in pixel space (w=0.1).
615
+ 2025-11-04 17:44:21,890 INFO: Loss [HighFrequencyL1Loss] is created.
616
+ 2025-11-04 17:44:21,891 INFO: Initialized hf_pixel_x2_opt in pixel space (w=0.05).
617
+ 2025-11-04 17:44:21,892 INFO: Loss [L1Loss] is created.
618
+ 2025-11-04 17:44:21,893 INFO: Initialized l1_latent_x4_opt in latent space (w=1.0).
619
+ 2025-11-04 17:44:21,894 INFO: Loss [FFTFrequencyLoss] is created.
620
+ 2025-11-04 17:44:21,895 INFO: Initialized fft_frequency_x4_opt in latent space (w=0.1).
621
+ 2025-11-04 17:44:21,895 INFO: Loss [DownsampleConsistencyLoss] is created.
622
+ 2025-11-04 17:44:21,895 INFO: Initialized aux_downsample_x4_opt in pixel space (w=0.1).
623
+ 2025-11-04 17:44:21,896 INFO: Loss [HighFrequencyL1Loss] is created.
624
+ 2025-11-04 17:44:21,897 INFO: Initialized hf_pixel_x4_opt in pixel space (w=0.05).
625
+ 2025-11-04 17:44:21,899 INFO: Precision configuration — train: bf16, eval: fp32
626
+ 2025-11-04 17:44:21,899 INFO: Gradient clipping enabled (G:norm(max_norm=0.4, norm_type=2.0)).
627
+ 2025-11-04 17:44:21,899 INFO: Model [SwinIRLatentModelMultiHead] is created.
628
+ 2025-11-04 17:45:39,919 INFO: Use cuda prefetch dataloader
629
+ 2025-11-04 17:45:39,920 INFO: Start training from epoch: 0, step: 0
630
+ 2025-11-04 17:45:42,256 INFO: Loading VAE(name=flux_vae, kind=kl) from wolfgangblack/flux_vae
631
+ 2025-11-04 17:48:06,672 INFO: [39..][epoch: 0, step: 100, lr:(5.000e-04,)] [eta: 1 day, 22:03:03, time (data): 1.468 (0.015)] l1_latent_x2_opt: 7.1538e-01 fft_frequency_x2_opt: 5.1611e-01 aux_downsample_x2_opt: 5.2473e-02 hf_pixel_x2_opt: 3.3547e-02 l1_latent_x4_opt: 8.1259e-01 fft_frequency_x4_opt: 5.9814e-01 aux_downsample_x4_opt: 6.4306e-02 hf_pixel_x4_opt: 3.4876e-02
632
+ 2025-11-04 17:50:21,752 INFO: [39..][epoch: 0, step: 200, lr:(5.000e-04,)] [eta: 1 day, 22:25:06, time (data): 1.409 (0.007)] l1_latent_x2_opt: 7.2462e-01 fft_frequency_x2_opt: 5.1978e-01 aux_downsample_x2_opt: 5.8646e-02 hf_pixel_x2_opt: 3.8853e-02 l1_latent_x4_opt: 8.2175e-01 fft_frequency_x4_opt: 6.0938e-01 aux_downsample_x4_opt: 7.1363e-02 hf_pixel_x4_opt: 3.9566e-02
633
+ 2025-11-04 17:52:36,893 INFO: [39..][epoch: 0, step: 300, lr:(5.000e-04,)] [eta: 1 day, 22:31:27, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.1494e-01 fft_frequency_x2_opt: 5.2539e-01 aux_downsample_x2_opt: 5.5444e-02 hf_pixel_x2_opt: 3.6638e-02 l1_latent_x4_opt: 8.1160e-01 fft_frequency_x4_opt: 6.2158e-01 aux_downsample_x4_opt: 7.0688e-02 hf_pixel_x4_opt: 3.8187e-02
634
+ 2025-11-04 17:54:51,895 INFO: [39..][epoch: 0, step: 400, lr:(5.000e-04,)] [eta: 1 day, 22:32:46, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.2170e-01 fft_frequency_x2_opt: 5.2588e-01 aux_downsample_x2_opt: 5.4698e-02 hf_pixel_x2_opt: 3.4865e-02 l1_latent_x4_opt: 8.2728e-01 fft_frequency_x4_opt: 6.1133e-01 aux_downsample_x4_opt: 6.7423e-02 hf_pixel_x4_opt: 3.6045e-02
635
+ 2025-11-04 17:57:07,534 INFO: [39..][epoch: 0, step: 500, lr:(5.000e-04,)] [eta: 1 day, 22:35:19, time (data): 1.357 (0.000)] l1_latent_x2_opt: 7.1057e-01 fft_frequency_x2_opt: 5.1440e-01 aux_downsample_x2_opt: 5.4125e-02 hf_pixel_x2_opt: 3.3586e-02 l1_latent_x4_opt: 8.1176e-01 fft_frequency_x4_opt: 6.1230e-01 aux_downsample_x4_opt: 7.0314e-02 hf_pixel_x4_opt: 3.7586e-02
636
+ 2025-11-04 17:59:23,634 INFO: [39..][epoch: 0, step: 600, lr:(5.000e-04,)] [eta: 1 day, 22:37:50, time (data): 1.359 (0.000)] l1_latent_x2_opt: 7.1819e-01 fft_frequency_x2_opt: 5.1831e-01 aux_downsample_x2_opt: 5.4263e-02 hf_pixel_x2_opt: 3.5276e-02 l1_latent_x4_opt: 8.2229e-01 fft_frequency_x4_opt: 6.1182e-01 aux_downsample_x4_opt: 7.0281e-02 hf_pixel_x4_opt: 3.8503e-02
637
+ 2025-11-04 18:01:38,566 INFO: [39..][epoch: 0, step: 700, lr:(5.000e-04,)] [eta: 1 day, 22:35:33, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.3096e-01 fft_frequency_x2_opt: 5.3174e-01 aux_downsample_x2_opt: 5.4279e-02 hf_pixel_x2_opt: 3.4074e-02 l1_latent_x4_opt: 8.2776e-01 fft_frequency_x4_opt: 6.2500e-01 aux_downsample_x4_opt: 6.8199e-02 hf_pixel_x4_opt: 3.5843e-02
638
+ 2025-11-04 18:03:53,449 INFO: [39..][epoch: 0, step: 800, lr:(5.000e-04,)] [eta: 1 day, 22:33:09, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.3620e-01 fft_frequency_x2_opt: 5.2246e-01 aux_downsample_x2_opt: 5.5530e-02 hf_pixel_x2_opt: 3.6471e-02 l1_latent_x4_opt: 8.3013e-01 fft_frequency_x4_opt: 6.1523e-01 aux_downsample_x4_opt: 7.0553e-02 hf_pixel_x4_opt: 3.8146e-02
639
+ 2025-11-04 18:06:08,534 INFO: [39..][epoch: 0, step: 900, lr:(5.000e-04,)] [eta: 1 day, 22:31:14, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.2444e-01 fft_frequency_x2_opt: 5.2930e-01 aux_downsample_x2_opt: 4.8316e-02 hf_pixel_x2_opt: 3.1387e-02 l1_latent_x4_opt: 8.1942e-01 fft_frequency_x4_opt: 6.1182e-01 aux_downsample_x4_opt: 6.1079e-02 hf_pixel_x4_opt: 3.2247e-02
640
+ 2025-11-04 18:08:23,633 INFO: [39..][epoch: 0, step: 1,000, lr:(5.000e-04,)] [eta: 1 day, 22:29:18, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.3483e-01 fft_frequency_x2_opt: 5.1465e-01 aux_downsample_x2_opt: 5.8090e-02 hf_pixel_x2_opt: 3.7956e-02 l1_latent_x4_opt: 8.3406e-01 fft_frequency_x4_opt: 6.0596e-01 aux_downsample_x4_opt: 7.0483e-02 hf_pixel_x4_opt: 3.7886e-02
641
+ 2025-11-04 18:10:38,554 INFO: [39..][epoch: 0, step: 1,100, lr:(5.000e-04,)] [eta: 1 day, 22:26:57, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.1678e-01 fft_frequency_x2_opt: 5.1831e-01 aux_downsample_x2_opt: 5.2998e-02 hf_pixel_x2_opt: 3.3298e-02 l1_latent_x4_opt: 8.0588e-01 fft_frequency_x4_opt: 6.0791e-01 aux_downsample_x4_opt: 6.3533e-02 hf_pixel_x4_opt: 3.4202e-02
642
+ 2025-11-04 18:12:53,495 INFO: [39..][epoch: 0, step: 1,200, lr:(5.000e-04,)] [eta: 1 day, 22:24:40, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.1548e-01 fft_frequency_x2_opt: 5.1685e-01 aux_downsample_x2_opt: 4.7315e-02 hf_pixel_x2_opt: 2.9344e-02 l1_latent_x4_opt: 8.0816e-01 fft_frequency_x4_opt: 6.0254e-01 aux_downsample_x4_opt: 5.9042e-02 hf_pixel_x4_opt: 3.0520e-02
643
+ 2025-11-04 18:15:08,326 INFO: [39..][epoch: 0, step: 1,300, lr:(5.000e-04,)] [eta: 1 day, 22:22:13, time (data): 1.348 (0.000)] l1_latent_x2_opt: 7.3182e-01 fft_frequency_x2_opt: 5.2222e-01 aux_downsample_x2_opt: 5.0035e-02 hf_pixel_x2_opt: 3.3350e-02 l1_latent_x4_opt: 8.2970e-01 fft_frequency_x4_opt: 6.1279e-01 aux_downsample_x4_opt: 6.3545e-02 hf_pixel_x4_opt: 3.4917e-02
644
+ 2025-11-04 18:17:23,751 INFO: [39..][epoch: 0, step: 1,400, lr:(5.000e-04,)] [eta: 1 day, 22:20:40, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.2209e-01 fft_frequency_x2_opt: 5.1953e-01 aux_downsample_x2_opt: 4.8760e-02 hf_pixel_x2_opt: 3.2254e-02 l1_latent_x4_opt: 8.1701e-01 fft_frequency_x4_opt: 6.1035e-01 aux_downsample_x4_opt: 6.1903e-02 hf_pixel_x4_opt: 3.3500e-02
645
+ 2025-11-04 18:19:39,029 INFO: [39..][epoch: 0, step: 1,500, lr:(5.000e-04,)] [eta: 1 day, 22:18:49, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.2367e-01 fft_frequency_x2_opt: 5.1733e-01 aux_downsample_x2_opt: 5.2854e-02 hf_pixel_x2_opt: 3.4301e-02 l1_latent_x4_opt: 8.1990e-01 fft_frequency_x4_opt: 6.0938e-01 aux_downsample_x4_opt: 6.7018e-02 hf_pixel_x4_opt: 3.5185e-02
646
+ 2025-11-04 18:21:53,877 INFO: [39..][epoch: 0, step: 1,600, lr:(5.000e-04,)] [eta: 1 day, 22:16:22, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.2551e-01 fft_frequency_x2_opt: 5.2417e-01 aux_downsample_x2_opt: 5.1626e-02 hf_pixel_x2_opt: 3.4591e-02 l1_latent_x4_opt: 8.2464e-01 fft_frequency_x4_opt: 6.1279e-01 aux_downsample_x4_opt: 6.5784e-02 hf_pixel_x4_opt: 3.7126e-02
647
+ 2025-11-04 18:24:11,059 INFO: [39..][epoch: 0, step: 1,700, lr:(5.000e-04,)] [eta: 1 day, 22:16:45, time (data): 1.374 (0.000)] l1_latent_x2_opt: 7.0685e-01 fft_frequency_x2_opt: 5.1196e-01 aux_downsample_x2_opt: 4.6546e-02 hf_pixel_x2_opt: 3.1026e-02 l1_latent_x4_opt: 7.9315e-01 fft_frequency_x4_opt: 5.9766e-01 aux_downsample_x4_opt: 6.0185e-02 hf_pixel_x4_opt: 3.2489e-02
648
+ 2025-11-04 18:26:26,875 INFO: [39..][epoch: 0, step: 1,800, lr:(5.000e-04,)] [eta: 1 day, 22:15:17, time (data): 1.366 (0.000)] l1_latent_x2_opt: 7.2728e-01 fft_frequency_x2_opt: 5.2441e-01 aux_downsample_x2_opt: 5.4100e-02 hf_pixel_x2_opt: 3.5413e-02 l1_latent_x4_opt: 8.2565e-01 fft_frequency_x4_opt: 6.1328e-01 aux_downsample_x4_opt: 6.7567e-02 hf_pixel_x4_opt: 3.5887e-02
649
+ 2025-11-04 18:28:41,834 INFO: [39..][epoch: 0, step: 1,900, lr:(5.000e-04,)] [eta: 1 day, 22:12:49, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.3979e-01 fft_frequency_x2_opt: 5.3149e-01 aux_downsample_x2_opt: 5.5061e-02 hf_pixel_x2_opt: 3.6172e-02 l1_latent_x4_opt: 8.3253e-01 fft_frequency_x4_opt: 6.1816e-01 aux_downsample_x4_opt: 6.8824e-02 hf_pixel_x4_opt: 3.7857e-02
650
+ 2025-11-04 18:30:56,836 INFO: [39..][epoch: 0, step: 2,000, lr:(5.000e-04,)] [eta: 1 day, 22:10:25, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.1404e-01 fft_frequency_x2_opt: 5.1465e-01 aux_downsample_x2_opt: 4.7809e-02 hf_pixel_x2_opt: 3.0376e-02 l1_latent_x4_opt: 8.1420e-01 fft_frequency_x4_opt: 6.0547e-01 aux_downsample_x4_opt: 6.1369e-02 hf_pixel_x4_opt: 3.1697e-02
651
+ 2025-11-04 18:33:12,865 INFO: [39..][epoch: 0, step: 2,100, lr:(5.000e-04,)] [eta: 1 day, 22:09:02, time (data): 1.362 (0.000)] l1_latent_x2_opt: 7.1883e-01 fft_frequency_x2_opt: 5.2393e-01 aux_downsample_x2_opt: 5.1495e-02 hf_pixel_x2_opt: 3.3885e-02 l1_latent_x4_opt: 8.1879e-01 fft_frequency_x4_opt: 6.1670e-01 aux_downsample_x4_opt: 6.6821e-02 hf_pixel_x4_opt: 3.6232e-02
652
+ 2025-11-04 18:35:27,769 INFO: [39..][epoch: 0, step: 2,200, lr:(5.000e-04,)] [eta: 1 day, 22:06:31, time (data): 1.355 (0.000)] l1_latent_x2_opt: 7.2259e-01 fft_frequency_x2_opt: 5.2002e-01 aux_downsample_x2_opt: 5.5170e-02 hf_pixel_x2_opt: 3.5376e-02 l1_latent_x4_opt: 8.2379e-01 fft_frequency_x4_opt: 6.1475e-01 aux_downsample_x4_opt: 6.9685e-02 hf_pixel_x4_opt: 3.6974e-02
653
+ 2025-11-04 18:37:42,780 INFO: [39..][epoch: 0, step: 2,300, lr:(5.000e-04,)] [eta: 1 day, 22:04:07, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.0540e-01 fft_frequency_x2_opt: 5.1172e-01 aux_downsample_x2_opt: 5.4046e-02 hf_pixel_x2_opt: 3.5699e-02 l1_latent_x4_opt: 8.0685e-01 fft_frequency_x4_opt: 6.0498e-01 aux_downsample_x4_opt: 6.9422e-02 hf_pixel_x4_opt: 3.7606e-02
654
+ 2025-11-04 18:39:57,635 INFO: [39..][epoch: 0, step: 2,400, lr:(5.000e-04,)] [eta: 1 day, 22:01:36, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.2828e-01 fft_frequency_x2_opt: 5.2612e-01 aux_downsample_x2_opt: 5.1853e-02 hf_pixel_x2_opt: 3.4054e-02 l1_latent_x4_opt: 8.2290e-01 fft_frequency_x4_opt: 6.1963e-01 aux_downsample_x4_opt: 6.5827e-02 hf_pixel_x4_opt: 3.5909e-02
655
+ 2025-11-04 18:42:12,603 INFO: [39..][epoch: 0, step: 2,500, lr:(5.000e-04,)] [eta: 1 day, 21:59:12, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.0629e-01 fft_frequency_x2_opt: 5.2148e-01 aux_downsample_x2_opt: 5.4957e-02 hf_pixel_x2_opt: 3.5025e-02 l1_latent_x4_opt: 8.1038e-01 fft_frequency_x4_opt: 6.1279e-01 aux_downsample_x4_opt: 6.9279e-02 hf_pixel_x4_opt: 3.6056e-02
656
+ 2025-11-04 18:44:28,572 INFO: [39..][epoch: 0, step: 2,600, lr:(5.000e-04,)] [eta: 1 day, 21:57:35, time (data): 1.355 (0.000)] l1_latent_x2_opt: 7.1186e-01 fft_frequency_x2_opt: 5.0684e-01 aux_downsample_x2_opt: 5.3425e-02 hf_pixel_x2_opt: 3.4876e-02 l1_latent_x4_opt: 8.1505e-01 fft_frequency_x4_opt: 5.8838e-01 aux_downsample_x4_opt: 6.6993e-02 hf_pixel_x4_opt: 3.6462e-02
657
+ 2025-11-04 18:46:43,332 INFO: [39..][epoch: 0, step: 2,700, lr:(5.000e-04,)] [eta: 1 day, 21:55:01, time (data): 1.348 (0.000)] l1_latent_x2_opt: 7.2911e-01 fft_frequency_x2_opt: 5.2881e-01 aux_downsample_x2_opt: 4.8840e-02 hf_pixel_x2_opt: 3.1548e-02 l1_latent_x4_opt: 8.2863e-01 fft_frequency_x4_opt: 6.1621e-01 aux_downsample_x4_opt: 6.1509e-02 hf_pixel_x4_opt: 3.2518e-02
658
+ 2025-11-04 18:48:58,081 INFO: [39..][epoch: 0, step: 2,800, lr:(5.000e-04,)] [eta: 1 day, 21:52:28, time (data): 1.348 (0.000)] l1_latent_x2_opt: 7.2362e-01 fft_frequency_x2_opt: 5.2124e-01 aux_downsample_x2_opt: 5.2436e-02 hf_pixel_x2_opt: 3.5142e-02 l1_latent_x4_opt: 8.1948e-01 fft_frequency_x4_opt: 6.1133e-01 aux_downsample_x4_opt: 6.5940e-02 hf_pixel_x4_opt: 3.6466e-02
659
+ 2025-11-04 18:51:14,591 INFO: [39..][epoch: 0, step: 2,900, lr:(5.000e-04,)] [eta: 1 day, 21:51:10, time (data): 1.368 (0.000)] l1_latent_x2_opt: 7.0759e-01 fft_frequency_x2_opt: 5.0098e-01 aux_downsample_x2_opt: 4.7543e-02 hf_pixel_x2_opt: 3.0715e-02 l1_latent_x4_opt: 8.0679e-01 fft_frequency_x4_opt: 5.9180e-01 aux_downsample_x4_opt: 6.3564e-02 hf_pixel_x4_opt: 3.2049e-02
660
+ 2025-11-04 18:53:30,048 INFO: [39..][epoch: 0, step: 3,000, lr:(5.000e-04,)] [eta: 1 day, 21:49:06, time (data): 1.361 (0.000)] l1_latent_x2_opt: 7.0903e-01 fft_frequency_x2_opt: 5.1807e-01 aux_downsample_x2_opt: 5.4698e-02 hf_pixel_x2_opt: 3.7555e-02 l1_latent_x4_opt: 8.0087e-01 fft_frequency_x4_opt: 6.1133e-01 aux_downsample_x4_opt: 6.8103e-02 hf_pixel_x4_opt: 3.9139e-02
661
+ 2025-11-04 18:55:46,300 INFO: [39..][epoch: 0, step: 3,100, lr:(5.000e-04,)] [eta: 1 day, 21:47:32, time (data): 1.362 (0.000)] l1_latent_x2_opt: 7.2234e-01 fft_frequency_x2_opt: 5.2539e-01 aux_downsample_x2_opt: 5.3446e-02 hf_pixel_x2_opt: 3.5487e-02 l1_latent_x4_opt: 8.2032e-01 fft_frequency_x4_opt: 6.1963e-01 aux_downsample_x4_opt: 6.7726e-02 hf_pixel_x4_opt: 3.7343e-02
662
+ 2025-11-04 18:58:01,157 INFO: [39..][epoch: 0, step: 3,200, lr:(5.000e-04,)] [eta: 1 day, 21:45:02, time (data): 1.355 (0.000)] l1_latent_x2_opt: 7.2524e-01 fft_frequency_x2_opt: 5.2930e-01 aux_downsample_x2_opt: 5.6736e-02 hf_pixel_x2_opt: 3.9300e-02 l1_latent_x4_opt: 8.2499e-01 fft_frequency_x4_opt: 6.2646e-01 aux_downsample_x4_opt: 7.0797e-02 hf_pixel_x4_opt: 4.1326e-02
663
+ 2025-11-04 19:00:15,895 INFO: [39..][epoch: 0, step: 3,300, lr:(5.000e-04,)] [eta: 1 day, 21:42:29, time (data): 1.347 (0.000)] l1_latent_x2_opt: 7.3721e-01 fft_frequency_x2_opt: 5.2734e-01 aux_downsample_x2_opt: 5.2932e-02 hf_pixel_x2_opt: 3.5381e-02 l1_latent_x4_opt: 8.3380e-01 fft_frequency_x4_opt: 6.1816e-01 aux_downsample_x4_opt: 6.6464e-02 hf_pixel_x4_opt: 3.6365e-02
664
+ 2025-11-04 19:02:30,650 INFO: [39..][epoch: 0, step: 3,400, lr:(5.000e-04,)] [eta: 1 day, 21:39:57, time (data): 1.347 (0.000)] l1_latent_x2_opt: 7.2536e-01 fft_frequency_x2_opt: 5.2783e-01 aux_downsample_x2_opt: 5.3571e-02 hf_pixel_x2_opt: 3.5719e-02 l1_latent_x4_opt: 8.2371e-01 fft_frequency_x4_opt: 6.1865e-01 aux_downsample_x4_opt: 6.7078e-02 hf_pixel_x4_opt: 3.6596e-02
665
+ 2025-11-04 19:04:46,275 INFO: [39..][epoch: 0, step: 3,500, lr:(5.000e-04,)] [eta: 1 day, 21:37:57, time (data): 1.357 (0.000)] l1_latent_x2_opt: 7.1946e-01 fft_frequency_x2_opt: 5.2759e-01 aux_downsample_x2_opt: 5.0332e-02 hf_pixel_x2_opt: 3.2460e-02 l1_latent_x4_opt: 8.2649e-01 fft_frequency_x4_opt: 6.2109e-01 aux_downsample_x4_opt: 6.5609e-02 hf_pixel_x4_opt: 3.4554e-02
666
+ 2025-11-04 19:07:01,833 INFO: [39..][epoch: 0, step: 3,600, lr:(5.000e-04,)] [eta: 1 day, 21:35:54, time (data): 1.356 (0.000)] l1_latent_x2_opt: 7.1833e-01 fft_frequency_x2_opt: 5.1758e-01 aux_downsample_x2_opt: 5.4198e-02 hf_pixel_x2_opt: 3.5062e-02 l1_latent_x4_opt: 8.1729e-01 fft_frequency_x4_opt: 6.1035e-01 aux_downsample_x4_opt: 6.8125e-02 hf_pixel_x4_opt: 3.5862e-02
667
+ 2025-11-04 19:09:18,544 INFO: [39..][epoch: 0, step: 3,700, lr:(5.000e-04,)] [eta: 1 day, 21:34:27, time (data): 1.371 (0.000)] l1_latent_x2_opt: 7.2597e-01 fft_frequency_x2_opt: 5.2295e-01 aux_downsample_x2_opt: 5.2231e-02 hf_pixel_x2_opt: 3.3028e-02 l1_latent_x4_opt: 8.2601e-01 fft_frequency_x4_opt: 6.1621e-01 aux_downsample_x4_opt: 6.7380e-02 hf_pixel_x4_opt: 3.5541e-02
668
+ 2025-11-04 19:11:35,332 INFO: [39..][epoch: 0, step: 3,800, lr:(5.000e-04,)] [eta: 1 day, 21:33:01, time (data): 1.369 (0.000)] l1_latent_x2_opt: 7.1383e-01 fft_frequency_x2_opt: 5.2148e-01 aux_downsample_x2_opt: 4.9597e-02 hf_pixel_x2_opt: 3.2262e-02 l1_latent_x4_opt: 8.0896e-01 fft_frequency_x4_opt: 6.1523e-01 aux_downsample_x4_opt: 6.1547e-02 hf_pixel_x4_opt: 3.4062e-02
669
+ 2025-11-04 19:13:50,277 INFO: [39..][epoch: 0, step: 3,900, lr:(5.000e-04,)] [eta: 1 day, 21:30:34, time (data): 1.349 (0.000)] l1_latent_x2_opt: 7.2276e-01 fft_frequency_x2_opt: 5.1953e-01 aux_downsample_x2_opt: 4.7234e-02 hf_pixel_x2_opt: 2.9734e-02 l1_latent_x4_opt: 8.2144e-01 fft_frequency_x4_opt: 6.1328e-01 aux_downsample_x4_opt: 6.2862e-02 hf_pixel_x4_opt: 3.2668e-02
670
+ 2025-11-04 19:16:05,353 INFO: [39..][epoch: 0, step: 4,000, lr:(5.000e-04,)] [eta: 1 day, 21:28:13, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.3263e-01 fft_frequency_x2_opt: 5.3271e-01 aux_downsample_x2_opt: 5.2168e-02 hf_pixel_x2_opt: 3.4322e-02 l1_latent_x4_opt: 8.2936e-01 fft_frequency_x4_opt: 6.2354e-01 aux_downsample_x4_opt: 6.5301e-02 hf_pixel_x4_opt: 3.5689e-02
671
+ 2025-11-04 19:18:20,526 INFO: [39..][epoch: 0, step: 4,100, lr:(5.000e-04,)] [eta: 1 day, 21:25:54, time (data): 1.352 (0.000)] l1_latent_x2_opt: 7.1286e-01 fft_frequency_x2_opt: 5.1074e-01 aux_downsample_x2_opt: 4.6884e-02 hf_pixel_x2_opt: 3.0640e-02 l1_latent_x4_opt: 8.1557e-01 fft_frequency_x4_opt: 5.9180e-01 aux_downsample_x4_opt: 5.8137e-02 hf_pixel_x4_opt: 3.0957e-02
672
+ 2025-11-04 19:20:35,592 INFO: [39..][epoch: 0, step: 4,200, lr:(5.000e-04,)] [eta: 1 day, 21:23:33, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.2062e-01 fft_frequency_x2_opt: 5.2441e-01 aux_downsample_x2_opt: 5.2407e-02 hf_pixel_x2_opt: 3.4586e-02 l1_latent_x4_opt: 8.2534e-01 fft_frequency_x4_opt: 6.1279e-01 aux_downsample_x4_opt: 6.5348e-02 hf_pixel_x4_opt: 3.6032e-02
673
+ 2025-11-04 19:22:50,603 INFO: [39..][epoch: 0, step: 4,300, lr:(5.000e-04,)] [eta: 1 day, 21:21:10, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.3037e-01 fft_frequency_x2_opt: 5.2295e-01 aux_downsample_x2_opt: 4.8673e-02 hf_pixel_x2_opt: 3.2038e-02 l1_latent_x4_opt: 8.3314e-01 fft_frequency_x4_opt: 6.0400e-01 aux_downsample_x4_opt: 6.1514e-02 hf_pixel_x4_opt: 3.2493e-02
674
+ 2025-11-04 19:25:05,868 INFO: [39..][epoch: 0, step: 4,400, lr:(5.000e-04,)] [eta: 1 day, 21:18:54, time (data): 1.352 (0.000)] l1_latent_x2_opt: 7.3493e-01 fft_frequency_x2_opt: 5.3564e-01 aux_downsample_x2_opt: 5.3350e-02 hf_pixel_x2_opt: 3.4770e-02 l1_latent_x4_opt: 8.3158e-01 fft_frequency_x4_opt: 6.2598e-01 aux_downsample_x4_opt: 6.6108e-02 hf_pixel_x4_opt: 3.6103e-02
675
+ 2025-11-04 19:27:22,034 INFO: [39..][epoch: 0, step: 4,500, lr:(5.000e-04,)] [eta: 1 day, 21:17:03, time (data): 1.365 (0.000)] l1_latent_x2_opt: 7.1594e-01 fft_frequency_x2_opt: 5.2026e-01 aux_downsample_x2_opt: 5.7206e-02 hf_pixel_x2_opt: 3.7309e-02 l1_latent_x4_opt: 8.1017e-01 fft_frequency_x4_opt: 6.1279e-01 aux_downsample_x4_opt: 7.1502e-02 hf_pixel_x4_opt: 3.8709e-02
676
+ 2025-11-04 19:29:37,121 INFO: [39..][epoch: 0, step: 4,600, lr:(5.000e-04,)] [eta: 1 day, 21:14:43, time (data): 1.357 (0.000)] l1_latent_x2_opt: 7.1196e-01 fft_frequency_x2_opt: 5.2051e-01 aux_downsample_x2_opt: 4.9442e-02 hf_pixel_x2_opt: 3.2259e-02 l1_latent_x4_opt: 8.1157e-01 fft_frequency_x4_opt: 6.0547e-01 aux_downsample_x4_opt: 6.2155e-02 hf_pixel_x4_opt: 3.3576e-02
677
+ 2025-11-04 19:31:52,148 INFO: [39..][epoch: 0, step: 4,700, lr:(5.000e-04,)] [eta: 1 day, 21:12:21, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.1185e-01 fft_frequency_x2_opt: 5.1611e-01 aux_downsample_x2_opt: 5.2363e-02 hf_pixel_x2_opt: 3.3759e-02 l1_latent_x4_opt: 8.1760e-01 fft_frequency_x4_opt: 6.1230e-01 aux_downsample_x4_opt: 6.7342e-02 hf_pixel_x4_opt: 3.7106e-02
678
+ 2025-11-04 19:34:07,213 INFO: [39..][epoch: 0, step: 4,800, lr:(5.000e-04,)] [eta: 1 day, 21:10:00, time (data): 1.350 (0.000)] l1_latent_x2_opt: 7.1616e-01 fft_frequency_x2_opt: 5.2319e-01 aux_downsample_x2_opt: 5.3919e-02 hf_pixel_x2_opt: 3.5840e-02 l1_latent_x4_opt: 8.1068e-01 fft_frequency_x4_opt: 6.0986e-01 aux_downsample_x4_opt: 6.6938e-02 hf_pixel_x4_opt: 3.6482e-02
679
+ 2025-11-04 19:36:22,310 INFO: [39..][epoch: 0, step: 4,900, lr:(5.000e-04,)] [eta: 1 day, 21:07:40, time (data): 1.351 (0.000)] l1_latent_x2_opt: 7.1679e-01 fft_frequency_x2_opt: 5.1318e-01 aux_downsample_x2_opt: 5.6177e-02 hf_pixel_x2_opt: 3.4949e-02 l1_latent_x4_opt: 8.1787e-01 fft_frequency_x4_opt: 6.0840e-01 aux_downsample_x4_opt: 7.0094e-02 hf_pixel_x4_opt: 3.6273e-02
680
+ 2025-11-04 19:38:38,266 INFO: [39..][epoch: 0, step: 5,000, lr:(5.000e-04,)] [eta: 1 day, 21:05:41, time (data): 1.356 (0.000)] l1_latent_x2_opt: 7.1474e-01 fft_frequency_x2_opt: 5.1758e-01 aux_downsample_x2_opt: 5.4436e-02 hf_pixel_x2_opt: 3.5155e-02 l1_latent_x4_opt: 8.0913e-01 fft_frequency_x4_opt: 6.1084e-01 aux_downsample_x4_opt: 6.8508e-02 hf_pixel_x4_opt: 3.6914e-02
681
+ 2025-11-04 19:38:38,267 INFO: Saving models and training states.
682
+ 2025-11-04 19:40:55,716 INFO: Validation val_x2
683
+ # l1_latent: 0.7662 Best: 0.7662 @ 5000 iter
684
+ # pixel_psnr_pt: 28.7766 Best: 28.7766 @ 5000 iter
685
+
686
+ 2025-11-04 19:43:28,886 INFO: Validation val_x4
687
+ # l1_latent: 0.8514 Best: 0.8514 @ 5000 iter
688
+ # l2_latent: 1.1908 Best: 1.1908 @ 5000 iter
689
+ # pixel_psnr_pt: 26.3475 Best: 26.3475 @ 5000 iter
690
+
04_11_2025/39_archived_20251104_213142/basicsr_options.yaml ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Tue Nov 4 21:29:58 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/04_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 10
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ prefetch_mode: cuda
46
+ latent_dtype: bf16
47
+ val:
48
+ name: sdxk_120_1024x1024
49
+ type: MultiScaleLatentCacheDataset
50
+ scales:
51
+ - 256
52
+ - 512
53
+ - 1024
54
+ cache_dirs:
55
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
56
+ vae_names:
57
+ - flux_vae
58
+ phase: val
59
+ io_backend:
60
+ type: disk
61
+ scale: 4
62
+ mean: null
63
+ std: null
64
+ batch_size_per_gpu: 16
65
+ num_worker_per_gpu: 4
66
+ pin_memory: true
67
+ latent_dtype: bf16
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:
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ - 6
81
+ embed_dim: 180
82
+ num_heads:
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ - 6
89
+ mlp_ratio: 2
90
+ resi_connection: 1conv
91
+ head_num_feat: 128
92
+ primary_head: x4
93
+ heads:
94
+ - name: x2
95
+ scale: 2
96
+ out_chans: 16
97
+ - name: x4
98
+ scale: 4
99
+ out_chans: 16
100
+ primary: true
101
+ path:
102
+ pretrain_network_g: ./runs/04_11_2025/39/models/net_g_5000.pth
103
+ strict_load_g: true
104
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025
105
+ compile:
106
+ enabled: true
107
+ mode: auto
108
+ dynamic: true
109
+ fullgraph: false
110
+ backend: inductor
111
+ train:
112
+ ema_decay: 0.999
113
+ head_inputs:
114
+ x2:
115
+ lq: 256
116
+ gt: 512
117
+ x4:
118
+ lq: 128
119
+ gt: 512
120
+ optim_g:
121
+ type: Adam
122
+ lr: 0.0005
123
+ weight_decay: 0
124
+ betas:
125
+ - 0.9
126
+ - 0.995
127
+ grad_clip:
128
+ enabled: true
129
+ generator:
130
+ type: norm
131
+ max_norm: 0.4
132
+ norm_type: 2.0
133
+ scheduler:
134
+ type: MultiStepLR
135
+ milestones:
136
+ - 62500
137
+ - 93750
138
+ - 112500
139
+ gamma: 0.5
140
+ total_steps: 125000
141
+ warmup_iter: -1
142
+ l1_latent_x2_opt:
143
+ type: L1Loss
144
+ loss_weight: 1.0
145
+ reduction: mean
146
+ space: latent
147
+ target: x2
148
+ fft_frequency_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
+ aux_downsample_x2_opt:
160
+ type: DownsampleConsistencyLoss
161
+ loss_weight: 0.1
162
+ reduction: mean
163
+ space: pixel
164
+ target: x2
165
+ down_factor: 2
166
+ mode: bicubic
167
+ hf_pixel_x2_opt:
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ l1_latent_x4_opt:
176
+ type: L1Loss
177
+ loss_weight: 1.0
178
+ reduction: mean
179
+ space: latent
180
+ target: x4
181
+ fft_frequency_x4_opt:
182
+ type: FFTFrequencyLoss
183
+ loss_weight: 0.1
184
+ reduction: mean
185
+ space: latent
186
+ target: x4
187
+ norm: ortho
188
+ use_log_amplitude: false
189
+ alpha: 0.0
190
+ normalize_weight: true
191
+ eps: 1e-8
192
+ aux_downsample_x4_opt:
193
+ type: DownsampleConsistencyLoss
194
+ loss_weight: 0.1
195
+ reduction: mean
196
+ space: pixel
197
+ target: x4
198
+ down_factor: 2
199
+ mode: bicubic
200
+ hf_pixel_x4_opt:
201
+ type: HighFrequencyL1Loss
202
+ loss_weight: 0.05
203
+ reduction: mean
204
+ space: pixel
205
+ target: x4
206
+ kernel_size: 5
207
+ sigma: 1.0
208
+ val:
209
+ val_freq: 5000
210
+ save_img: true
211
+ head_evals:
212
+ x2:
213
+ save_img: true
214
+ label: val_x2
215
+ val_sizes:
216
+ lq: 512
217
+ gt: 1024
218
+ metrics:
219
+ l1_latent:
220
+ type: L1Loss
221
+ space: latent
222
+ pixel_psnr_pt:
223
+ type: calculate_psnr_pt
224
+ space: pixel
225
+ crop_border: 2
226
+ test_y_channel: false
227
+ x4:
228
+ save_img: true
229
+ label: val_x4
230
+ val_sizes:
231
+ lq: 256
232
+ gt: 1024
233
+ metrics:
234
+ l1_latent:
235
+ type: L1Loss
236
+ space: latent
237
+ l2_latent:
238
+ type: MSELoss
239
+ space: latent
240
+ pixel_psnr_pt:
241
+ type: calculate_psnr_pt
242
+ space: pixel
243
+ crop_border: 2
244
+ test_y_channel: false
245
+ logger:
246
+ print_freq: 100
247
+ save_checkpoint_freq: 5000
248
+ use_tb_logger: true
249
+ wandb:
250
+ project: Swin2SR-Latent-SR
251
+ entity: kazanplova-it-more
252
+ resume_id: null
253
+ max_val_images: 3
254
+ dist_params:
255
+ backend: nccl
256
+ port: 29500
257
+ dist: true
258
+ load_networks_only: false
259
+ exp_name: '39'
260
+ name: '39'
04_11_2025/39_archived_20251104_213142/train_39_20251104_212958.log ADDED
@@ -0,0 +1,601 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-11-04 21:29:58,712 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-04 21:29:58,712 INFO:
18
+ model_type: SwinIRLatentModelMultiHead
19
+ primary_head: x4
20
+ scale: 4
21
+ num_gpu: 8
22
+ manual_seed: 0
23
+ find_unused_parameters: True
24
+ precision:[
25
+ train: bf16
26
+ eval: fp32
27
+ ]
28
+ vae_sources:[
29
+ flux_vae:[
30
+ hf_repo: wolfgangblack/flux_vae
31
+ vae_kind: kl
32
+ ]
33
+ ]
34
+ datasets:[
35
+ train:[
36
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
37
+ type: MultiScaleLatentCacheDataset
38
+ scales: [128, 256, 512]
39
+ 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']
40
+ vae_names: ['flux_vae']
41
+ phase: train
42
+ filename_tmpl: {}
43
+ io_backend:[
44
+ type: disk
45
+ ]
46
+ scale: 4
47
+ mean: None
48
+ std: None
49
+ num_worker_per_gpu: 4
50
+ batch_size_per_gpu: 10
51
+ pin_memory: True
52
+ persistent_workers: True
53
+ prefetch_mode: cuda
54
+ latent_dtype: bf16
55
+ ]
56
+ val:[
57
+ name: sdxk_120_1024x1024
58
+ type: MultiScaleLatentCacheDataset
59
+ scales: [256, 512, 1024]
60
+ cache_dirs: ['/data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae']
61
+ vae_names: ['flux_vae']
62
+ phase: val
63
+ io_backend:[
64
+ type: disk
65
+ ]
66
+ scale: 4
67
+ mean: None
68
+ std: None
69
+ batch_size_per_gpu: 16
70
+ num_worker_per_gpu: 4
71
+ pin_memory: True
72
+ latent_dtype: bf16
73
+ ]
74
+ ]
75
+ network_g:[
76
+ type: SwinIRMultiHead
77
+ in_chans: 16
78
+ img_size: 32
79
+ window_size: 8
80
+ img_range: 1.0
81
+ depths: [6, 6, 6, 6, 6, 6]
82
+ embed_dim: 180
83
+ num_heads: [6, 6, 6, 6, 6, 6]
84
+ mlp_ratio: 2
85
+ resi_connection: 1conv
86
+ head_num_feat: 128
87
+ primary_head: x4
88
+ heads: [OrderedDict({'name': 'x2', 'scale': 2, 'out_chans': 16}), OrderedDict({'name': 'x4', 'scale': 4, 'out_chans': 16, 'primary': True})]
89
+ ]
90
+ path:[
91
+ pretrain_network_g: ./runs/04_11_2025/39/models/net_g_5000.pth
92
+ strict_load_g: True
93
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
94
+ models: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/models
95
+ training_states: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/training_states
96
+ log: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39
97
+ visualization: /data/kazanplova/latent_vae_upscale_train/runs/04_11_2025/39/visualization
98
+ ]
99
+ compile:[
100
+ enabled: True
101
+ mode: auto
102
+ dynamic: True
103
+ fullgraph: False
104
+ backend: inductor
105
+ ]
106
+ train:[
107
+ ema_decay: 0.999
108
+ head_inputs:[
109
+ x2:[
110
+ lq: 256
111
+ gt: 512
112
+ ]
113
+ x4:[
114
+ lq: 128
115
+ gt: 512
116
+ ]
117
+ ]
118
+ optim_g:[
119
+ type: Adam
120
+ lr: 0.0005
121
+ weight_decay: 0
122
+ betas: [0.9, 0.995]
123
+ ]
124
+ grad_clip:[
125
+ enabled: True
126
+ generator:[
127
+ type: norm
128
+ max_norm: 0.4
129
+ norm_type: 2.0
130
+ ]
131
+ ]
132
+ scheduler:[
133
+ type: MultiStepLR
134
+ milestones: [62500, 93750, 112500]
135
+ gamma: 0.5
136
+ ]
137
+ total_steps: 125000
138
+ warmup_iter: -1
139
+ l1_latent_x2_opt:[
140
+ type: L1Loss
141
+ loss_weight: 1.0
142
+ reduction: mean
143
+ space: latent
144
+ target: x2
145
+ ]
146
+ fft_frequency_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
+ aux_downsample_x2_opt:[
159
+ type: DownsampleConsistencyLoss
160
+ loss_weight: 0.1
161
+ reduction: mean
162
+ space: pixel
163
+ target: x2
164
+ down_factor: 2
165
+ mode: bicubic
166
+ ]
167
+ hf_pixel_x2_opt:[
168
+ type: HighFrequencyL1Loss
169
+ loss_weight: 0.05
170
+ reduction: mean
171
+ space: pixel
172
+ target: x2
173
+ kernel_size: 5
174
+ sigma: 1.0
175
+ ]
176
+ l1_latent_x4_opt:[
177
+ type: L1Loss
178
+ loss_weight: 1.0
179
+ reduction: mean
180
+ space: latent
181
+ target: x4
182
+ ]
183
+ fft_frequency_x4_opt:[
184
+ type: FFTFrequencyLoss
185
+ loss_weight: 0.1
186
+ reduction: mean
187
+ space: latent
188
+ target: x4
189
+ norm: ortho
190
+ use_log_amplitude: False
191
+ alpha: 0.0
192
+ normalize_weight: True
193
+ eps: 1e-8
194
+ ]
195
+ aux_downsample_x4_opt:[
196
+ type: DownsampleConsistencyLoss
197
+ loss_weight: 0.1
198
+ reduction: mean
199
+ space: pixel
200
+ target: x4
201
+ down_factor: 2
202
+ mode: bicubic
203
+ ]
204
+ hf_pixel_x4_opt:[
205
+ type: HighFrequencyL1Loss
206
+ loss_weight: 0.05
207
+ reduction: mean
208
+ space: pixel
209
+ target: x4
210
+ kernel_size: 5
211
+ sigma: 1.0
212
+ ]
213
+ ]
214
+ val:[
215
+ val_freq: 5000
216
+ save_img: True
217
+ head_evals:[
218
+ x2:[
219
+ save_img: True
220
+ label: val_x2
221
+ val_sizes:[
222
+ lq: 512
223
+ gt: 1024
224
+ ]
225
+ metrics:[
226
+ l1_latent:[
227
+ type: L1Loss
228
+ space: latent
229
+ ]
230
+ pixel_psnr_pt:[
231
+ type: calculate_psnr_pt
232
+ space: pixel
233
+ crop_border: 2
234
+ test_y_channel: False
235
+ ]
236
+ ]
237
+ ]
238
+ x4:[
239
+ save_img: True
240
+ label: val_x4
241
+ val_sizes:[
242
+ lq: 256
243
+ gt: 1024
244
+ ]
245
+ metrics:[
246
+ l1_latent:[
247
+ type: L1Loss
248
+ space: latent
249
+ ]
250
+ l2_latent:[
251
+ type: MSELoss
252
+ space: latent
253
+ ]
254
+ pixel_psnr_pt:[
255
+ type: calculate_psnr_pt
256
+ space: pixel
257
+ crop_border: 2
258
+ test_y_channel: False
259
+ ]
260
+ ]
261
+ ]
262
+ ]
263
+ ]
264
+ logger:[
265
+ print_freq: 100
266
+ save_checkpoint_freq: 5000
267
+ use_tb_logger: True
268
+ wandb:[
269
+ project: Swin2SR-Latent-SR
270
+ entity: kazanplova-it-more
271
+ resume_id: None
272
+ max_val_images: 3
273
+ ]
274
+ ]
275
+ dist_params:[
276
+ backend: nccl
277
+ port: 29500
278
+ dist: True
279
+ ]
280
+ load_networks_only: False
281
+ exp_name: 39
282
+ name: 39
283
+ dist: True
284
+ rank: 0
285
+ world_size: 8
286
+ auto_resume: False
287
+ is_train: True
288
+ root_path: /data/kazanplova/latent_vae_upscale_train
289
+
290
+ 2025-11-04 21:30:00,381 INFO: Use wandb logger with id=u9urcy9z; project=Swin2SR-Latent-SR.
291
+ 2025-11-04 21:30:13,034 INFO: Dataset [MultiScaleLatentCacheDataset] - gpt4_nanobana_midjourney_recraft_CropsFluxVAE is built.
292
+ 2025-11-04 21:30:13,035 INFO: Training statistics:
293
+ Number of train images: 4858507
294
+ Dataset enlarge ratio: 1
295
+ Batch size per gpu: 10
296
+ World size (gpu number): 8
297
+ Steps per epoch: 60732
298
+ Configured training steps: 125000
299
+ Approximate epochs to cover: 3.
300
+ 2025-11-04 21:30:13,039 INFO: Dataset [MultiScaleLatentCacheDataset] - sdxk_120_1024x1024 is built.
301
+ 2025-11-04 21:30:13,039 INFO: Number of val images/folders in sdxk_120_1024x1024: 153
302
+ 2025-11-04 21:30:13,169 INFO: Network [SwinIRMultiHead] is created.
303
+ 2025-11-04 21:30:15,363 INFO: Network: DistributedDataParallel - SwinIRMultiHead, with parameters: 13,743,240
304
+ 2025-11-04 21:30:15,364 INFO: SwinIRMultiHead(
305
+ (conv_first): Conv2d(16, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
306
+ (patch_embed): PatchEmbed(
307
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
308
+ )
309
+ (patch_unembed): PatchUnEmbed()
310
+ (pos_drop): Dropout(p=0.0, inplace=False)
311
+ (layers): ModuleList(
312
+ (0): RSTB(
313
+ (residual_group): BasicLayer(
314
+ dim=180, input_resolution=(32, 32), depth=6
315
+ (blocks): ModuleList(
316
+ (0): SwinTransformerBlock(
317
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
318
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
319
+ (attn): WindowAttention(
320
+ dim=180, window_size=(8, 8), num_heads=6
321
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
322
+ (attn_drop): Dropout(p=0.0, inplace=False)
323
+ (proj): Linear(in_features=180, out_features=180, bias=True)
324
+ (proj_drop): Dropout(p=0.0, inplace=False)
325
+ (softmax): Softmax(dim=-1)
326
+ )
327
+ (drop_path): Identity()
328
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
329
+ (mlp): Mlp(
330
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
331
+ (act): GELU(approximate='none')
332
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
333
+ (drop): Dropout(p=0.0, inplace=False)
334
+ )
335
+ )
336
+ (1): SwinTransformerBlock(
337
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
338
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
339
+ (attn): WindowAttention(
340
+ dim=180, window_size=(8, 8), num_heads=6
341
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
342
+ (attn_drop): Dropout(p=0.0, inplace=False)
343
+ (proj): Linear(in_features=180, out_features=180, bias=True)
344
+ (proj_drop): Dropout(p=0.0, inplace=False)
345
+ (softmax): Softmax(dim=-1)
346
+ )
347
+ (drop_path): DropPath()
348
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
349
+ (mlp): Mlp(
350
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
351
+ (act): GELU(approximate='none')
352
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
353
+ (drop): Dropout(p=0.0, inplace=False)
354
+ )
355
+ )
356
+ (2): SwinTransformerBlock(
357
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
358
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
359
+ (attn): WindowAttention(
360
+ dim=180, window_size=(8, 8), num_heads=6
361
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
362
+ (attn_drop): Dropout(p=0.0, inplace=False)
363
+ (proj): Linear(in_features=180, out_features=180, bias=True)
364
+ (proj_drop): Dropout(p=0.0, inplace=False)
365
+ (softmax): Softmax(dim=-1)
366
+ )
367
+ (drop_path): DropPath()
368
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
369
+ (mlp): Mlp(
370
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
371
+ (act): GELU(approximate='none')
372
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
373
+ (drop): Dropout(p=0.0, inplace=False)
374
+ )
375
+ )
376
+ (3): SwinTransformerBlock(
377
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
378
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
379
+ (attn): WindowAttention(
380
+ dim=180, window_size=(8, 8), num_heads=6
381
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
382
+ (attn_drop): Dropout(p=0.0, inplace=False)
383
+ (proj): Linear(in_features=180, out_features=180, bias=True)
384
+ (proj_drop): Dropout(p=0.0, inplace=False)
385
+ (softmax): Softmax(dim=-1)
386
+ )
387
+ (drop_path): DropPath()
388
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
389
+ (mlp): Mlp(
390
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
391
+ (act): GELU(approximate='none')
392
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
393
+ (drop): Dropout(p=0.0, inplace=False)
394
+ )
395
+ )
396
+ (4): SwinTransformerBlock(
397
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
398
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
399
+ (attn): WindowAttention(
400
+ dim=180, window_size=(8, 8), num_heads=6
401
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
402
+ (attn_drop): Dropout(p=0.0, inplace=False)
403
+ (proj): Linear(in_features=180, out_features=180, bias=True)
404
+ (proj_drop): Dropout(p=0.0, inplace=False)
405
+ (softmax): Softmax(dim=-1)
406
+ )
407
+ (drop_path): DropPath()
408
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
409
+ (mlp): Mlp(
410
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
411
+ (act): GELU(approximate='none')
412
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
413
+ (drop): Dropout(p=0.0, inplace=False)
414
+ )
415
+ )
416
+ (5): SwinTransformerBlock(
417
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
418
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
419
+ (attn): WindowAttention(
420
+ dim=180, window_size=(8, 8), num_heads=6
421
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
422
+ (attn_drop): Dropout(p=0.0, inplace=False)
423
+ (proj): Linear(in_features=180, out_features=180, bias=True)
424
+ (proj_drop): Dropout(p=0.0, inplace=False)
425
+ (softmax): Softmax(dim=-1)
426
+ )
427
+ (drop_path): DropPath()
428
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
429
+ (mlp): Mlp(
430
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
431
+ (act): GELU(approximate='none')
432
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
433
+ (drop): Dropout(p=0.0, inplace=False)
434
+ )
435
+ )
436
+ )
437
+ )
438
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
439
+ (patch_embed): PatchEmbed()
440
+ (patch_unembed): PatchUnEmbed()
441
+ )
442
+ (1-5): 5 x RSTB(
443
+ (residual_group): BasicLayer(
444
+ dim=180, input_resolution=(32, 32), depth=6
445
+ (blocks): ModuleList(
446
+ (0): SwinTransformerBlock(
447
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
448
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
449
+ (attn): WindowAttention(
450
+ dim=180, window_size=(8, 8), num_heads=6
451
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
452
+ (attn_drop): Dropout(p=0.0, inplace=False)
453
+ (proj): Linear(in_features=180, out_features=180, bias=True)
454
+ (proj_drop): Dropout(p=0.0, inplace=False)
455
+ (softmax): Softmax(dim=-1)
456
+ )
457
+ (drop_path): DropPath()
458
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
459
+ (mlp): Mlp(
460
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
461
+ (act): GELU(approximate='none')
462
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
463
+ (drop): Dropout(p=0.0, inplace=False)
464
+ )
465
+ )
466
+ (1): SwinTransformerBlock(
467
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
468
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
469
+ (attn): WindowAttention(
470
+ dim=180, window_size=(8, 8), num_heads=6
471
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
472
+ (attn_drop): Dropout(p=0.0, inplace=False)
473
+ (proj): Linear(in_features=180, out_features=180, bias=True)
474
+ (proj_drop): Dropout(p=0.0, inplace=False)
475
+ (softmax): Softmax(dim=-1)
476
+ )
477
+ (drop_path): DropPath()
478
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
479
+ (mlp): Mlp(
480
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
481
+ (act): GELU(approximate='none')
482
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
483
+ (drop): Dropout(p=0.0, inplace=False)
484
+ )
485
+ )
486
+ (2): SwinTransformerBlock(
487
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
488
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
489
+ (attn): WindowAttention(
490
+ dim=180, window_size=(8, 8), num_heads=6
491
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
492
+ (attn_drop): Dropout(p=0.0, inplace=False)
493
+ (proj): Linear(in_features=180, out_features=180, bias=True)
494
+ (proj_drop): Dropout(p=0.0, inplace=False)
495
+ (softmax): Softmax(dim=-1)
496
+ )
497
+ (drop_path): DropPath()
498
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
499
+ (mlp): Mlp(
500
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
501
+ (act): GELU(approximate='none')
502
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
503
+ (drop): Dropout(p=0.0, inplace=False)
504
+ )
505
+ )
506
+ (3): SwinTransformerBlock(
507
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
508
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
509
+ (attn): WindowAttention(
510
+ dim=180, window_size=(8, 8), num_heads=6
511
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
512
+ (attn_drop): Dropout(p=0.0, inplace=False)
513
+ (proj): Linear(in_features=180, out_features=180, bias=True)
514
+ (proj_drop): Dropout(p=0.0, inplace=False)
515
+ (softmax): Softmax(dim=-1)
516
+ )
517
+ (drop_path): DropPath()
518
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
519
+ (mlp): Mlp(
520
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
521
+ (act): GELU(approximate='none')
522
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
523
+ (drop): Dropout(p=0.0, inplace=False)
524
+ )
525
+ )
526
+ (4): SwinTransformerBlock(
527
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=0, mlp_ratio=2.0
528
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
529
+ (attn): WindowAttention(
530
+ dim=180, window_size=(8, 8), num_heads=6
531
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
532
+ (attn_drop): Dropout(p=0.0, inplace=False)
533
+ (proj): Linear(in_features=180, out_features=180, bias=True)
534
+ (proj_drop): Dropout(p=0.0, inplace=False)
535
+ (softmax): Softmax(dim=-1)
536
+ )
537
+ (drop_path): DropPath()
538
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
539
+ (mlp): Mlp(
540
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
541
+ (act): GELU(approximate='none')
542
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
543
+ (drop): Dropout(p=0.0, inplace=False)
544
+ )
545
+ )
546
+ (5): SwinTransformerBlock(
547
+ dim=180, input_resolution=(32, 32), num_heads=6, window_size=8, shift_size=4, mlp_ratio=2.0
548
+ (norm1): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
549
+ (attn): WindowAttention(
550
+ dim=180, window_size=(8, 8), num_heads=6
551
+ (qkv): Linear(in_features=180, out_features=540, bias=True)
552
+ (attn_drop): Dropout(p=0.0, inplace=False)
553
+ (proj): Linear(in_features=180, out_features=180, bias=True)
554
+ (proj_drop): Dropout(p=0.0, inplace=False)
555
+ (softmax): Softmax(dim=-1)
556
+ )
557
+ (drop_path): DropPath()
558
+ (norm2): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
559
+ (mlp): Mlp(
560
+ (fc1): Linear(in_features=180, out_features=360, bias=True)
561
+ (act): GELU(approximate='none')
562
+ (fc2): Linear(in_features=360, out_features=180, bias=True)
563
+ (drop): Dropout(p=0.0, inplace=False)
564
+ )
565
+ )
566
+ )
567
+ )
568
+ (conv): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
569
+ (patch_embed): PatchEmbed()
570
+ (patch_unembed): PatchUnEmbed()
571
+ )
572
+ )
573
+ (norm): LayerNorm((180,), eps=1e-05, elementwise_affine=True)
574
+ (conv_after_body): Conv2d(180, 180, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
575
+ (heads): ModuleDict(
576
+ (x2): _SwinIRPixelShuffleHead(
577
+ (conv_before): Sequential(
578
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
579
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
580
+ )
581
+ (upsample): Upsample(
582
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
583
+ (1): PixelShuffle(upscale_factor=2)
584
+ )
585
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
586
+ )
587
+ (x4): _SwinIRPixelShuffleHead(
588
+ (conv_before): Sequential(
589
+ (0): Conv2d(180, 128, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
590
+ (1): LeakyReLU(negative_slope=0.01, inplace=True)
591
+ )
592
+ (upsample): Upsample(
593
+ (0): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
594
+ (1): PixelShuffle(upscale_factor=2)
595
+ (2): Conv2d(128, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
596
+ (3): PixelShuffle(upscale_factor=2)
597
+ )
598
+ (conv_last): Conv2d(128, 16, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
599
+ )
600
+ )
601
+ )
05_11_2025/40/basicsr_options.yaml ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # GENERATE TIME: Wed Nov 5 16:51:50 2025
2
+ # CMD:
3
+ # train_vae.py -opt /data/kazanplova/latent_vae_upscale_train/runs/05_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: true
11
+ precision:
12
+ train: bf16
13
+ eval: fp32
14
+ vae_sources:
15
+ flux_vae:
16
+ hf_repo: wolfgangblack/flux_vae
17
+ vae_kind: kl
18
+ datasets:
19
+ train:
20
+ name: gpt4_nanobana_midjourney_recraft_CropsFluxVAE
21
+ type: MultiScaleLatentCacheDataset
22
+ scales:
23
+ - 128
24
+ - 256
25
+ - 512
26
+ cache_dirs:
27
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/nano_banana_crops/embeddings/flux_vae
28
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/midjourney_full_dataset_crops_new/embeddings/flux_vae
29
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/gpt4_crops/embeddings/flux_vae
30
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/recraft_data_crops/embeddings/flux_vae
31
+ - /data/kazanplova/datasets/full_latent_upscale_dataset_train/mjv5_crops_fix/embeddings/flux_vae
32
+ vae_names:
33
+ - flux_vae
34
+ phase: train
35
+ filename_tmpl: '{}'
36
+ io_backend:
37
+ type: disk
38
+ scale: 4
39
+ mean: null
40
+ std: null
41
+ num_worker_per_gpu: 4
42
+ batch_size_per_gpu: 12
43
+ pin_memory: true
44
+ persistent_workers: true
45
+ latent_dtype: bf16
46
+ val:
47
+ name: sdxk_120_1024x1024
48
+ type: MultiScaleLatentCacheDataset
49
+ scales:
50
+ - 256
51
+ - 512
52
+ - 1024
53
+ cache_dirs:
54
+ - /data/kazanplova/datasets/latent_upscale_validation_120_samples/embeddings/flux_vae
55
+ vae_names:
56
+ - flux_vae
57
+ phase: val
58
+ io_backend:
59
+ type: disk
60
+ scale: 4
61
+ mean: null
62
+ std: null
63
+ batch_size_per_gpu: 16
64
+ num_worker_per_gpu: 4
65
+ pin_memory: true
66
+ latent_dtype: bf16
67
+ network_g:
68
+ type: SwinIRMultiHead
69
+ in_chans: 16
70
+ img_size: 32
71
+ window_size: 8
72
+ img_range: 1.0
73
+ depths:
74
+ - 6
75
+ - 6
76
+ - 6
77
+ - 6
78
+ - 6
79
+ - 6
80
+ embed_dim: 180
81
+ num_heads:
82
+ - 6
83
+ - 6
84
+ - 6
85
+ - 6
86
+ - 6
87
+ - 6
88
+ mlp_ratio: 2
89
+ resi_connection: 1conv
90
+ primary_head: x4
91
+ head_num_feat: 128
92
+ heads:
93
+ - name: x2
94
+ scale: 2
95
+ out_chans: 16
96
+ - name: x4
97
+ scale: 4
98
+ out_chans: 16
99
+ primary: true
100
+ path:
101
+ pretrain_network_g: runs/04_11_2025/39/models/net_g_45000.pth
102
+ strict_load_g: true
103
+ experiments_root: /data/kazanplova/latent_vae_upscale_train/runs/05_11_2025
104
+ compile:
105
+ enabled: true
106
+ mode: auto
107
+ dynamic: true
108
+ fullgraph: false
109
+ backend: inductor
110
+ train:
111
+ ema_decay: 0.999
112
+ head_inputs:
113
+ x2:
114
+ lq: 256
115
+ gt: 512
116
+ x4:
117
+ lq: 128
118
+ gt: 512
119
+ optim_g:
120
+ type: Adam
121
+ lr: 0.0002
122
+ weight_decay: 0
123
+ betas:
124
+ - 0.9
125
+ - 0.99
126
+ grad_clip:
127
+ enabled: true
128
+ generator:
129
+ type: norm
130
+ max_norm: 0.4
131
+ norm_type: 2.0
132
+ scheduler:
133
+ type: MultiStepLR
134
+ milestones:
135
+ - 62500
136
+ - 93750
137
+ - 112500
138
+ gamma: 0.5
139
+ total_steps: 125000
140
+ warmup_iter: -1
141
+ eagle_pixel_x2_opt:
142
+ type: Eagle_Loss
143
+ loss_weight: 5.0e-05
144
+ reduction: mean
145
+ space: pixel
146
+ patch_size: 3
147
+ cutoff: 0.5
148
+ target: x2
149
+ l1_pixel_x2_opt:
150
+ type: L1Loss
151
+ loss_weight: 10.0
152
+ reduction: mean
153
+ space: pixel
154
+ target: x2
155
+ fft_frequency_x2_opt:
156
+ type: FFTFrequencyLoss
157
+ loss_weight: 1.0
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
+ patch_size: 3
172
+ cutoff: 0.5
173
+ target: x4
174
+ l1_pixel_x4_opt:
175
+ type: L1Loss
176
+ loss_weight: 10.0
177
+ reduction: mean
178
+ space: pixel
179
+ target: x4
180
+ fft_frequency_x4_opt:
181
+ type: FFTFrequencyLoss
182
+ loss_weight: 1.0
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
+ val_sizes:
199
+ lq: 512
200
+ gt: 1024
201
+ metrics:
202
+ l1_latent:
203
+ type: L1Loss
204
+ space: latent
205
+ pixel_psnr_pt:
206
+ type: calculate_psnr_pt
207
+ space: pixel
208
+ crop_border: 2
209
+ test_y_channel: false
210
+ x4:
211
+ save_img: true
212
+ label: val_x4
213
+ val_sizes:
214
+ lq: 256
215
+ gt: 1024
216
+ metrics:
217
+ l1_latent:
218
+ type: L1Loss
219
+ space: latent
220
+ l2_latent:
221
+ type: MSELoss
222
+ space: latent
223
+ pixel_psnr_pt:
224
+ type: calculate_psnr_pt
225
+ space: pixel
226
+ crop_border: 2
227
+ test_y_channel: false
228
+ logger:
229
+ print_freq: 100
230
+ save_checkpoint_freq: 5000
231
+ use_tb_logger: true
232
+ wandb:
233
+ project: Swin2SR-Latent-SR
234
+ entity: kazanplova-it-more
235
+ resume_id: null
236
+ max_val_images: 10
237
+ dist_params:
238
+ backend: nccl
239
+ port: 29500
240
+ dist: true
241
+ load_networks_only: false
242
+ exp_name: '40'
243
+ name: '40'
05_11_2025/40/train_40_20251105_165150.log ADDED
The diff for this file is too large to render. See raw diff