File size: 1,163 Bytes
533920b | 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 | # Reward SANA Idealized
This folder is a SANA-only reward-guided inference package.
## What is inside
- `models/reward_model.py`
- Local SANA reward wrapper (no trainer import from other directories).
- Loads base SANA diffusers modules and local reward checkpoint weights.
- `pipelines/sana_reward_pipeline.py`
- SANA pipeline with per-step reward tracking.
- `pipelines/sana_gradient_ascent_pipeline.py`
- SANA pipeline with gradient-ascent latent updates.
- `eval.py`
- End-to-end evaluation script.
- `examples.sh`
- Cluster entrypoint for prefetch and evaluation.
## Default checkpoint
`examples.sh` defaults to:
`/g/data/rr81/LPO/lrm/lrm_sana/logs/v8/reward_model/step_sana_sana_600m_512_variable-t_lr1e-5_step-8000_filter2_time951/checkpoint-gstep76000`
Override with:
```bash
LRM_MODEL_PATH=/path/to/checkpoint-dir-or-model.safetensors
```
## Run (10-sample smoke test)
```bash
cd /g/data/rr81/LPO/Reward_sana_idealized
OFFLINE_MODE=1 MAX_SAMPLES=10 MODE=gradient_ascent MODEL_PROFILE=sana_600m_512 ./examples.sh
```
## Notes
- Uses existing Python env: `/g/data/rr81/aev/bin/python`.
- GPU nodes should run with offline HF cache.
|