Commit d06e069
Adds profiling flags, computes train metrics average. (huggingface#3053)
* WIP controlnet training
- bugfix --streaming
- bugfix running report_to!='wandb'
- adds memory profile before validation
* Adds final logging statement.
* Sets train epochs to 11.
Looking at a longer ~16ep run, we see only good validation images
after ~11ep:
https://wandb.ai/andsteing/controlnet_fill50k/runs/3j2hx6n8
* Removes --logging_dir (it's not used).
* Adds --profile flags.
* Updates --output_dir=runs/fill-circle-{timestamp}.
* Compute mean of `train_metrics`.
Previously `train_metrics[-1]` was logged, resulting in very bumpy train
metrics.
* Improves logging a bit.
- adds l2_grads gradient norm logging
- adds steps_per_sec
- sets walltime as x coordinate of train/step
- logs controlnet_params config
* Adds --ccache (doesn't really help though).
* minor fix in controlnet flax example (huggingface#2986)
* fix the error when push_to_hub but not log validation
* contronet_from_pt & controlnet_revision
* add intermediate checkpointing to the guide
* Bugfix --profile_steps
* Sets `RACKER_PROJECT_NAME='controlnet_fill50k'`.
* Logs fractional epoch.
* Adds relative `walltime` metric.
* Adds `StepTraceAnnotation` and uses `global_step` insetad of `step`.
* Applied `black`.
* Streamlines commands in README a bit.
* Removes `--ccache`.
This makes only a very small difference (~1 min) with this model size, so removing
the option introduced in cdb3cc.
* Re-ran `black`.
* Update examples/controlnet/README.md
Co-authored-by: Sayak Paul <[email protected]>
* Converts spaces to tab.
* Removes repeated args.
* Skips first step (compilation) in profiling
* Updates README with profiling instructions.
* Unifies tabs/spaces in README.
* Re-ran style & quality.
---------
Co-authored-by: Sayak Paul <[email protected]>1 parent 0a73b4d commit d06e069
2 files changed
+119
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
288 | | - | |
289 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
329 | 330 | | |
330 | 331 | | |
331 | 332 | | |
| |||
343 | 344 | | |
344 | 345 | | |
345 | 346 | | |
346 | | - | |
347 | | - | |
| 347 | + | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| |||
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | | - | |
| 367 | + | |
| 368 | + | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
370 | 372 | | |
371 | 373 | | |
372 | 374 | | |
373 | | - | |
| 375 | + | |
374 | 376 | | |
375 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
376 | 382 | | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
392 | 397 | | |
393 | 398 | | |
394 | 399 | | |
| |||
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
403 | | - | |
| 408 | + | |
404 | 409 | | |
405 | 410 | | |
406 | 411 | | |
407 | 412 | | |
408 | 413 | | |
409 | 414 | | |
410 | | - | |
| 415 | + | |
411 | 416 | | |
412 | 417 | | |
413 | 418 | | |
414 | 419 | | |
415 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
220 | 221 | | |
221 | 222 | | |
222 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
223 | 246 | | |
224 | 247 | | |
225 | 248 | | |
| |||
234 | 257 | | |
235 | 258 | | |
236 | 259 | | |
237 | | - | |
238 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
239 | 263 | | |
240 | 264 | | |
241 | 265 | | |
| |||
317 | 341 | | |
318 | 342 | | |
319 | 343 | | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | 344 | | |
330 | 345 | | |
331 | 346 | | |
| |||
459 | 474 | | |
460 | 475 | | |
461 | 476 | | |
| 477 | + | |
| 478 | + | |
462 | 479 | | |
463 | 480 | | |
464 | 481 | | |
| |||
952 | 969 | | |
953 | 970 | | |
954 | 971 | | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
955 | 977 | | |
956 | 978 | | |
957 | 979 | | |
| |||
983 | 1005 | | |
984 | 1006 | | |
985 | 1007 | | |
986 | | - | |
| 1008 | + | |
987 | 1009 | | |
| 1010 | + | |
988 | 1011 | | |
989 | 1012 | | |
990 | 1013 | | |
991 | 1014 | | |
992 | 1015 | | |
993 | 1016 | | |
| 1017 | + | |
994 | 1018 | | |
995 | 1019 | | |
996 | 1020 | | |
997 | | - | |
| 1021 | + | |
998 | 1022 | | |
999 | 1023 | | |
1000 | 1024 | | |
1001 | 1025 | | |
1002 | 1026 | | |
1003 | 1027 | | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
1004 | 1031 | | |
1005 | 1032 | | |
1006 | 1033 | | |
1007 | 1034 | | |
| 1035 | + | |
1008 | 1036 | | |
1009 | 1037 | | |
1010 | 1038 | | |
1011 | | - | |
| 1039 | + | |
1012 | 1040 | | |
1013 | 1041 | | |
1014 | 1042 | | |
| |||
1020 | 1048 | | |
1021 | 1049 | | |
1022 | 1050 | | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1023 | 1058 | | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1027 | 1063 | | |
1028 | 1064 | | |
1029 | 1065 | | |
| |||
1041 | 1077 | | |
1042 | 1078 | | |
1043 | 1079 | | |
| 1080 | + | |
| 1081 | + | |
1044 | 1082 | | |
1045 | 1083 | | |
| 1084 | + | |
1046 | 1085 | | |
1047 | | - | |
1048 | | - | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1049 | 1089 | | |
1050 | 1090 | | |
| 1091 | + | |
| 1092 | + | |
1051 | 1093 | | |
1052 | 1094 | | |
1053 | 1095 | | |
| |||
1058 | 1100 | | |
1059 | 1101 | | |
1060 | 1102 | | |
1061 | | - | |
| 1103 | + | |
1062 | 1104 | | |
1063 | 1105 | | |
| 1106 | + | |
| 1107 | + | |
1064 | 1108 | | |
| 1109 | + | |
| 1110 | + | |
1065 | 1111 | | |
1066 | 1112 | | |
1067 | 1113 | | |
| |||
1084 | 1130 | | |
1085 | 1131 | | |
1086 | 1132 | | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
1087 | 1137 | | |
1088 | 1138 | | |
1089 | 1139 | | |
0 commit comments