supli6669 commited on
Commit ·
c0c6431
1
Parent(s): 7d99559
docs: update handover Task 13 — Phase 1 complete, Phase 2 training started
Browse files- handover.md +54 -1
handover.md
CHANGED
|
@@ -713,4 +713,57 @@ Now the reset only triggers when idle. During active processing, the guard preve
|
|
| 713 |
- [MODIFY] [app.py](file:///d:/.gemini-scratch/custom-ai-enhancer/app.py) (Added `and not st.session_state.get('processing')` guard on line 649)
|
| 714 |
|
| 715 |
### Git Commit & Push Status
|
| 716 |
-
- **Status:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
- [MODIFY] [app.py](file:///d:/.gemini-scratch/custom-ai-enhancer/app.py) (Added `and not st.session_state.get('processing')` guard on line 649)
|
| 714 |
|
| 715 |
### Git Commit & Push Status
|
| 716 |
+
- **Status:** Committed (bcf89b8).
|
| 717 |
+
|
| 718 |
+
---
|
| 719 |
+
|
| 720 |
+
## Task 13: Sequential Model Improvement Roadmap — Phase 1 Complete
|
| 721 |
+
|
| 722 |
+
**Date:** 2026-07-20
|
| 723 |
+
**Status:** 🔵 In Progress — Phase 1 done, Phase 2 running
|
| 724 |
+
|
| 725 |
+
### Overview
|
| 726 |
+
Established a mandatory sequential model improvement roadmap enforced via `AGENTS.md` Rule #7 and Rule #8. All future agents must follow phases in order and update `task.md`.
|
| 727 |
+
|
| 728 |
+
### Key Findings During Audit
|
| 729 |
+
- **Dataset:** `models/CodeFormer/datasets/ffhq/ffhq_512/` contains **26,939 images** (including game character subfolders) — already sufficient for training.
|
| 730 |
+
- **Checkpoint:** `net_g_latest.pth` = iter **2,002** / 20,000. Training only 10% complete.
|
| 731 |
+
- **Critical config bug found:** `scheduler.periods: [150000]` with `total_iter: 20000` → LR never annealed. Fixed to `periods: [20000]`.
|
| 732 |
+
- **`train_custom.py` bug:** CPU branch was setting `prefetch_mode: 'cpu'` which overrides yml and spawns multiprocessing workers — causing the same segfault class as Task 8. Fixed to `None`.
|
| 733 |
+
|
| 734 |
+
### Phase 1 Changes (Completed ✅)
|
| 735 |
+
All changes to [CodeFormer_stage3_custom.yml](file:///d:/.gemini-scratch/custom-ai-enhancer/models/CodeFormer/options/CodeFormer_stage3_custom.yml):
|
| 736 |
+
|
| 737 |
+
| Setting | Before | After | Reason |
|
| 738 |
+
|---------|--------|-------|--------|
|
| 739 |
+
| `scheduler.periods` | `[150000]` | `[20000]` | Match `total_iter` — LR annealing fix |
|
| 740 |
+
| `eta_min` | `2.0e-05` | `5.0e-06` | Lower LR floor for better convergence |
|
| 741 |
+
| `jpeg_range` | `[50, 100]` | `[10, 70]` | Heavier compression — real-world images |
|
| 742 |
+
| `jpeg_range_large` | `[30, 80]` | `[5, 50]` | Heavier large-degradation JPEG |
|
| 743 |
+
| `noise_range` | `[0.0, 20.0]` | `[0.0, 30.0]` | Stronger noise augmentation |
|
| 744 |
+
| `downsample_range` | `[1.0, 12.0]` | `[1.0, 20.0]` | Wider blur range |
|
| 745 |
+
| `motion_kernel_prob` | `0.05` | `0.15` | 3× more motion blur exposure |
|
| 746 |
+
| `dataset_enlarge_ratio` | `1` | `5` | 5× more optimizer steps per epoch |
|
| 747 |
+
| `prefetch_mode` | `cpu` | `null` | Prevent multiprocessing segfaults on CPU |
|
| 748 |
+
|
| 749 |
+
Changes to [train_custom.py](file:///d:/.gemini-scratch/custom-ai-enhancer/train_custom.py):
|
| 750 |
+
- `torch.set_num_threads` 4 → 8 (match Ryzen 7735HS 8C)
|
| 751 |
+
- CPU branch `prefetch_mode` forced to `None` (not `'cpu'`)
|
| 752 |
+
- `OMP_NUM_THREADS` etc. set to `8`
|
| 753 |
+
|
| 754 |
+
### Roadmap Artifact Locations
|
| 755 |
+
- **Task list:** `C:\Users\admin\.gemini\antigravity-ide\brain\0bf6bec8-6164-477e-a32d-6f0b9ef577c6\task.md`
|
| 756 |
+
- **Proposals doc:** `C:\Users\admin\.gemini\antigravity-ide\brain\0bf6bec8-6164-477e-a32d-6f0b9ef577c6\model_improvement_proposals.md`
|
| 757 |
+
|
| 758 |
+
### Phase Roadmap Summary
|
| 759 |
+
- **Phase 1** ✅ Config fixes (yml + train_custom.py)
|
| 760 |
+
- **Phase 2** 🔵 Resume training iter 2k → 20k
|
| 761 |
+
- **Phase 3** ⏳ ArcFace identity loss
|
| 762 |
+
- **Phase 4** ⏳ Dataset verification & mixing
|
| 763 |
+
- **Phase 5** ⏳ Static INT8 ONNX quantization
|
| 764 |
+
- **Phase 6** ⏳ Stage II fine-tune (GPU)
|
| 765 |
+
- **Phase 7** ⏳ A/B test UI
|
| 766 |
+
|
| 767 |
+
### Git Commit & Push Status
|
| 768 |
+
- **Commit:** `7d99559` — "feat: add sequential model improvement roadmap (Phase 1 complete)"
|
| 769 |
+
- **Status:** Pending push.
|