File size: 13,917 Bytes
15d68eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# 2-Week Build Plan β€” Indic Heritage Studio v2 (8Γ—80GB NVIDIA Dev β†’ AMD Demo)

**Hackathon window:** July 15 – August 6, 2026 (3 weeks available; we plan for 2 weeks of build + 1 week buffer)
**Dev hardware:** 8 Γ— NVIDIA A100/H100 80GB = 640 GB total VRAM
**AMD GPU budget:** 10 credits = 10 GPU-hours on Radeon Cloud (only the final demo + benchmark burns these)
**Strategy:** Develop 100% on NVIDIA. Burn AMD credits ONLY for: (1) ROCm verification (0.05 cr), (2) live demo video recording (1 cr), (3) official benchmark (0.5 cr). Estimated AMD usage: **~2 credits**, leaving 8 as buffer.

---

## Why This Plan Wins

The v1 plan assumed a single 8 GB RTX 5060 β€” it had to compromise on every axis (SD 1.5 instead of SDXL, 512Β² instead of 1024Β², 8-frame video instead of 25-frame, no LoRA training, no ControlNet, no inpainting, no multi-GPU).

With 8 Γ— 80GB on tap, v2 removes every compromise:

| Axis | v1 (8 GB) | v2 (8 Γ— 80 GB) | Why it matters for the rubric |
|---|---|---|---|
| T2I model | SD 1.5 (DreamShaper) | **SDXL 1.0 + DreamShaper-XL turbo** | 4Γ— higher resolution, dramatically better detail and coherence |
| Style conditioning | Prompt tags only | **Per-style LoRA fine-tune + IP-Adapter XL** | Authentic heritage look, not just "looks vaguely Indian" |
| Image β†’ video | AnimateDiff 16f 512Β² | **Stable Video Diffusion XT 1.1, 25f 1024Γ—576** | Industry-grade motion quality, 4Γ— more frames |
| Composition control | None | **ControlNet (Canny / Depth / OpenPose)** | Lets users precisely constrain layout β€” a new feature class |
| Image repair | None | **SDXL inpainting** | Restore damaged real heritage paintings |
| Batch throughput | 1 GPU sequential | **Multi-GPU data parallel, 4Γ— workers** | ~4Γ— speedup, scales to 8Γ— if needed |
| Resolution | 512Β² | **1024Β² (1536Β² for showcase)** | Publication-ready outputs |
| Steps | 25 | **25 turbo / 50 high-quality + SDXL refiner** | Both fast iteration AND showcase quality |

The rubric explicitly rewards: complete input→processing→output workflow (40 pts), innovative scenarios (20 pts), practical application & social value (20 pts), and clear/stable/diverse outputs on Radeon GPU (20 pts). v2 hits all four harder than v1 could.

---

## Hardware Reality Check

The dev box you're on reports 8 GPUs Γ— 81920 MB VRAM each. That's 640 GB total β€” likely 8 Γ— A100 80GB or 8 Γ— H100 80GB. This changes the build strategy completely:

- **All pipelines can stay resident simultaneously.** No load/unload thrash. T2I on GPU 0, IP-Adapter XL on GPU 1, SVD on GPU 2, ControlNet on GPU 3 β€” and GPUs 4-7 are batch workers.
- **LoRA training fits comfortably.** SDXL LoRA at rank 32 needs ~30 GB during training. Any single GPU on this box handles it without breaking a sweat.
- **SVD at 25 frames @ 1024Γ—576 is no problem.** No need to fall back to AnimateDiff-XL β€” SVD runs natively at full resolution.
- **Batch processing parallelism is real.** A folder of 40 input images Γ— 5 styles = 200 outputs. At 4 GPU workers Γ— 30 sec/image, that's 25 minutes β€” vs. 100 minutes on a single GPU.

The same Python code runs on AMD Radeon Cloud (single GPU, ~16 GB VRAM) for the final demo β€” `config/settings.py` auto-detects the device count and gracefully falls back to single-GPU mode.

---

## Week 1 (Jul 16–22) β€” Build + Train, Zero AMD Credits

**Goal:** Set up env, prepare heritage art datasets, train per-style LoRAs, smoke-test every pipeline end-to-end. By end of Week 1, every line of code is written and tested on real GPU hardware.

### Day-by-day

| Day | Task | Output | GPU-hours |
|---|---|---|---|
| Wed Jul 16 | Run `scripts/day1_setup.sh` β€” installs PyTorch CUDA, project deps, downloads all v2 models (~35 GB) | Local env ready | 0 |
| Wed Jul 16 | Get AMD Model API key from https://developer.amd.com.cn/radeon/modelapis. Test with curl. Add to `.env`. | Agent API working | 0 |
| Thu Jul 17 | Run `python scripts/verify_rocm.py` β€” confirm 8 GPUs visible, ~640 GB VRAM. Run `pytest tests/test_agents.py` β€” confirm agent layer works. | Env verified | 0 |
| Thu Jul 17 | Source 30-50 reference images per heritage style. Place under `assets/datasets/raw/<style>/`. See `assets/styles/README.md` for sources. | Raw dataset (5 Γ— ~40 imgs) | 0 |
| Fri Jul 18 | Run `python training/prepare_dataset.py` β€” resizes, captions, writes metadata.jsonl. | 5 prepared datasets | 0 |
| Fri Jul 18 | **Train first LoRA** β€” `python -m training.train_lora --style madhubani --steps 800 --rank 32`. ~30 min on 1 GPU. | `assets/loras/madhubani.safetensors` | 0.5 |
| Sat Jul 19 | Train remaining 4 LoRAs (warli, pattachitra, mughal, tanjore). Run sequentially or in parallel across 5 GPUs. | 5 LoRAs trained | 2.0 |
| Sun Jul 20 | Smoke-test `core/text_to_image.py` with LoRA enabled. Generate 1 image per style. Iterate on prompt engineering if style fidelity is weak. | 5 smoke-test images | 0.5 |
| Sun Jul 20 | Smoke-test `core/style_transfer.py` (IP-Adapter XL). Iterate on `ip_adapter_scale` per style. | 5 styled images | 0.5 |
| Mon Jul 21 | Smoke-test `core/image_to_video.py` (SVD). Generate 1 video per style at 1024Γ—576. | 5 test videos | 1.0 |
| Mon Jul 21 | Smoke-test `core/controlnet.py` and `core/inpainting.py`. One demo each. | 2 demo outputs | 0.5 |
| Tue Jul 22 | Run full `pytest tests/` + UI smoke test (`python app.py`, click through all 6 tabs). Fix bugs. | Tests passing | 0 |

**Week 1 GPU time:** ~5 hours (all free on NVIDIA)
**Week 1 AMD credits used:** 0
**Week 1 commit:** "v2: all 6 pipelines + 5 LoRAs trained + smoke tests passing"

---

## Week 2 (Jul 23–29) β€” Polish + Pre-bake Demo Assets + Submission Package

**Goal:** Pre-bake every demo output, write the PDF + PPT, run multi-GPU benchmark, freeze code. End of Week 2 = ready for AMD demo recording.

### Day-by-day

| Day | Task | Output | GPU-hours |
|---|---|---|---|
| Wed Jul 23 | Run `python scripts/generate_demo_outputs.py` β€” produces 45 T2I + 10 styled + 5 videos + 1 inpaint + 1 controlnet = ~62 demo assets. ~30 min on 8Γ—80GB. | `examples/` populated | 0.5 |
| Thu Jul 24 | Curate best outputs. Write captions. Organize into `examples/1_text_to_image/`, `2_style_transfer/`, `3_image_to_video/`. | Curated gallery | 0 |
| Thu Jul 24 | Run `python scripts/benchmark.py --configs 1 2 4 8 --samples 4` β€” full multi-GPU scaling benchmark. Save JSON + MD + chart. | `outputs/benchmarks/` | 0.5 |
| Fri Jul 25 | Write the README v2 (replace v1). Test that a fresh clone + `pip install -r requirements.txt` + `python app.py` works end-to-end. | README polished | 0 |
| Sat Jul 26 | Write `docs/architecture.md` (already done in this repo). Build architecture diagram via Playwright+CSS. | `docs/architecture_diagram.png` | 0 |
| Sun Jul 27 | Generate the **Project Profile PDF** via the `pdf` skill. Sections: Background, Target Users, Scenarios, Architecture, Model & Algorithm, AMD/ROCm Adaptation, Benchmark, Future Work. Reference pre-baked demo outputs. | `Indic_Heritage_Studio_Profile.pdf` | 0 |
| Mon Jul 28 | Generate the **PPT / poster** via the `pptx` skill. 8-10 slides: Title, Problem, Concept, 5 Heritage Styles, Architecture, Demo Screenshots, AMD Optimization, Benchmark, Future. | `Indic_Heritage_Studio_PPT.pptx` | 0 |
| Tue Jul 29 | Buffer day. Final code review. Commit + push everything to your fork. Code freeze. | Code frozen | 0 |

**Week 2 GPU time:** ~1 hour (all free)
**Week 2 AMD credits used:** 0
**Week 2 commit:** "v2: demo gallery + benchmark + PDF + PPT β€” ready for AMD demo"

---

## Week 3 (Jul 30–Aug 5) β€” AMD Verification + Demo Recording + Submit

**Goal:** Burn the minimum AMD credits needed for the rule-compliant demo video and benchmark. Submit.

### Day-by-day

| Day | Task | AMD credits |
|---|---|---|
| Wed Jul 30 | Local: final review of PDF + PPT. Iterate. Practice the demo video script by walking through it on your local UI. | 0 |
| Thu Jul 31 | Local: prep the AMD session β€” review `scripts/amd_demo_recording.sh`. Test the script logic locally first. | 0 |
| Fri Aug 1 | Local: final check. Commit + push. Make sure the repo is clean. | 0 |
| Sat Aug 2 | Local: prep OBS (or screen recorder). Set up 1920Γ—1080 canvas. Verify audio. | 0 |
| Sun Aug 3 | **AMD instance launch #1 (verification + benchmark, ~30 min):** Launch instance β†’ run `scripts/verify_rocm.py` β†’ run `scripts/benchmark.py --configs 1 --samples 2 --out-dir outputs/benchmarks/amd/` β†’ **DESTROY**. | 0.5 |
| Mon Aug 4 | **AMD instance launch #2 (demo recording, ~60 min):** Launch instance β†’ scp your pre-baked demo assets up (so you don't need to regenerate) β†’ run `scripts/amd_demo_recording.sh` while recording screen with OBS β†’ **DESTROY**. | 1.0 |
| Tue Aug 5 | Local: edit the demo video (trim dead air, add title card). Final code commit. Open PR against `AMD-DEV-CONTEST/Radeon-hackathon-2026-07`. PR title: `Track 1, TeamIndicForge, Indic Heritage Studio`. | 0 |

**Week 3 AMD credits used:** ~1.5
**Cumulative AMD:** 1.5 / 10
**Buffer remaining:** 8.5 credits (for emergencies, re-recording, etc.)

---

## The AMD Demo Recording Session (Aug 4) β€” Detailed

This is the only session where every minute counts. Pre-stage everything.

### Pre-session prep (do this on Mon Aug 3, locally)

1. Verify `scripts/amd_demo_recording.sh` runs cleanly on the local NVIDIA box (with `nvidia-smi` instead of `rocm-smi`).
2. Pre-stage the `examples/inputs/portrait.jpg` and `examples/inputs/portrait_mask.png` files in your repo.
3. Set up OBS (or your screen recorder) with a 1920Γ—1080 canvas, capturing the terminal + browser side-by-side.
4. Test audio: do a 30-second test recording.

### The session (Aug 4, target 60 minutes)

| Minute | Action | AMD credit |
|---|---|---|
| 0:00 | Launch instance from your template (SSH enabled) | 0 |
| 0:05 | SSH in, `git clone` your fork, `cd` into project | 0 |
| 0:10 | `cp .env.example .env` + paste AMD API key + set `HF_HOME=/workspace/.cache/huggingface` | 0 |
| 0:12 | `pip install -r requirements.txt` (~3 min) | 0 |
| 0:15 | **Optional:** `scp` your local model cache to `/workspace/.cache/huggingface/` to skip download | 0 |
| 0:18 | Run `scripts/verify_rocm.py` β€” confirm ROCm ready | 0.05 |
| 0:20 | Start OBS recording. Run `scripts/amd_demo_recording.sh`. | (running) |
| 0:50 | Stop recording. Verify video file is good. | 0.7 |
| 0:55 | `scp` outputs and benchmark JSON back to your laptop. **DESTROY INSTANCE**. | (stop clock) |
| 1:00 | Done | **Total: ~0.75** |

### Fallback if demo recording goes wrong

If the AMD instance misbehaves or the video is bad:
- You have 8.5 buffer credits
- Re-launch, re-record β€” same script
- Worst case, do a "screen recording" of you running the commands locally on the 8Γ—80GB NVIDIA box, but **explicitly state in the video** that the same code runs on AMD (show your `benchmark_amd.json` from Aug 3 as proof)

---

## Risk Register & Contingency

| Risk | Mitigation |
|---|---|
| LoRA training produces weak style fidelity | Increase rank from 32 β†’ 64. Increase steps from 800 β†’ 1500. Add more reference images (50+ per style). |
| SVD video looks too static | Increase `motion_bucket_id` (style-specific in `config/styles.py`). Increase `noise_aug_strength` from 0.02 β†’ 0.05. |
| ControlNet output is too rigid | Lower `controlnet_conditioning_scale` from 0.8 β†’ 0.5. |
| SVD OOMs on AMD (16 GB VRAM) | Set `decode_chunk_size=4` (already done). Reduce frames from 25 β†’ 14. |
| AMD instance unavailable on Aug 4 | Use buffer credits on Aug 5 instead. Submit by Aug 5 night IST. |
| Demo video has bugs | Re-record on Aug 5 with buffer credits. |
| `/workspace` doesn't persist on AMD | Verified on Day 1 (Jul 17 AMD session, 0.5 credits). If broken, scp local cache up each session. |
| You get sick / busy | Submit MVP by Aug 3: code + README + local demo video showing 8Γ—80GB NVIDIA execution + a note that AMD verification is pending. Better than nothing. |

---

## Daily Ritual

Every working day:

1. **Morning (5 min):** Check hackathon Discord (`https://discord.gg/zt9caur5B3`) for announcements.
2. **End of session (5 min):** `git add . && git commit -m "WIP: <what you did>" && git push`. Even incomplete work.
3. **Before destroying AMD instance:** `scp` outputs down to your laptop. Once destroyed, gone.

---

## Deliverables Checklist (Track 1 requirements)

- [ ] **PDF Profile Document** β€” generated via `pdf` skill in Week 2 (already done)
- [ ] **Source Code** β€” fork of `AMD-DEV-CONTEST/Radeon-hackathon-2026-07` with `indic-heritage-studio-v2/` folder
- [ ] **README** β€” env config + startup guide + dependency list (already in repo)
- [ ] **Demo Video (3–5 min)** β€” recorded on AMD Radeon Cloud Aug 4
- [ ] **PPT / poster** β€” generated via `pptx` skill in Week 2
- [ ] **Benchmark report** β€” `outputs/benchmarks/benchmark_<host>_rocm-*.json` + `.md` from Aug 3 AMD session

---

## Definition of Done

Submission is "done" when ALL of the following are true:

- [ ] PR opened against `AMD-DEV-CONTEST/Radeon-hackathon-2026-07`
- [ ] PR title: `Track 1, TeamIndicForge, Indic Heritage Studio`
- [ ] PR contains: source code, README, PDF, PPT, demo video link (or video file in repo)
- [ ] Demo video is 3–5 min, **shows live execution on AMD Radeon GPU** (rocm-smi visible)
- [ ] README has reproducibility instructions (evaluator can clone + run)
- [ ] All 6 modes verified working on AMD (not just locally):
      1. T2I (SDXL + LoRA)
      2. Style transfer (IP-Adapter XL)
      3. Image β†’ Video (SVD)
      4. ControlNet
      5. Inpainting
      6. Batch (multi-GPU)
- [ ] `outputs/benchmarks/benchmark_amd.json` exists and is referenced in the PDF
- [ ] Multi-GPU scaling chart (1 vs 2 vs 4 vs 8 GPUs) included in the PDF β€” even if from NVIDIA, it's a strong talking point

**Submit by:** Aug 5, 11:59 PM IST (one day before the Aug 6 deadline β€” buffer for last-minute fixes).