Spaces:
Running
Running
org card
Browse filesFiles changed (4)
- .gitattributes+2
- README.md+69-4
- assets/paradigm.pngAdded
- assets/teaser.jpgAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textassets/paradigm.png filter=lfs diff=lfs merge=lfs -textassets/teaser.jpg filter=lfs diff=lfs merge=lfs -text
12345678910---title: READMEemoji: ๐colorFrom: indigocolorTo: yellowsdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475---title: READMEemoji: ๐ผ๏ธcolorFrom: greencolorTo: graysdk: staticpinned: false---<h1 align="center">Code-based Image Generation: Benchmarking, Baselines, and Improved Rewards</h1><p align="center">Nicole Wang  <b>·</b> Zhanhao Liang  <b>·</b> <a href="https://scholar.google.com.au/citations?user=GQzvqS4AAAAJ" target="_blank">Xingjian Leng</a>  <b>·</b> <a href="https://zheng-lab-anu.github.io/" target="_blank">Liang Zheng</a></p><p align="center">Australian National University</p><p align="center">๐ Project Page (coming soon)  ๐ป Code (coming soon)  ๐ Paper (coming soon)</p><p align="center"><img src="assets/teaser.jpg" width="100%" alt="Images generated by our model. Every image is a program."></p>---Every image above is a program. In **code-based image generation**, a language model writes a JavaScript programand a fixed renderer turns it into an image, so every image can be read, edited and redrawn at any resolution.<p align="center"><img src="assets/paradigm.png" width="100%" alt="A text prompt goes to the LLM, which writes a program; a renderer turns the program into an image."></p>We post-train Qwen3.8-27B for it with SFT from a mix of GPT teachers, then GRPO. A judge shown both the program andthe rendered image (**IPR**) is a better reward than either alone: **+18.0** GenEval2 GM over the base model,against +15.5 for the program alone and +14.3 for the image alone.## Models| model | base | training | reward ||---|---|---|---|| [CIG-27B-IPR](https://huggingface.co/codeimagegen/CIG-27B-IPR) (best) | Qwen3.8-27B | SFT + GRPO | image + program || [CIG-27B-IR](https://huggingface.co/codeimagegen/CIG-27B-IR) | Qwen3.8-27B | SFT + GRPO | image || [CIG-27B-PR](https://huggingface.co/codeimagegen/CIG-27B-PR) | Qwen3.8-27B | SFT + GRPO | program || [CIG-27B-avgR](https://huggingface.co/codeimagegen/CIG-27B-avgR) | Qwen3.8-27B | SFT + GRPO | mean of image and program || [CIG-27B-SFT](https://huggingface.co/codeimagegen/CIG-27B-SFT) | Qwen3.8-27B | SFT | || [CIG-9B-IPR](https://huggingface.co/codeimagegen/CIG-9B-IPR) | Qwen3.5-9B | SFT + GRPO | image + program || [CIG-9B-SFT](https://huggingface.co/codeimagegen/CIG-9B-SFT) | Qwen3.5-9B | SFT | |Dataset: [CIG-SFT-35k](https://huggingface.co/datasets/codeimagegen/CIG-SFT-35k), 35k prompt and program pairs.## Usage and trainingThe code for setup, generating images, training and evaluation is coming soon on GitHub. One prompt to one image:```python -m grpo.t2i.eval.generate_one --model codeimagegen/CIG-27B-IPR --prompt "a red fox in the snow" --out fox.png```## ๐ Citation```bibtex@article{wang2026codeimagegen,title = {Code-based Image Generation: Benchmarking, Baselines, and Improved Rewards},author = {Wang, Nicole and Liang, Zhanhao and Leng, Xingjian and Zheng, Liang},journal = {arXiv preprint},year = {2026}}```
.gitattributes+2
README.md+69-4
assets/paradigm.pngAdded

Large File Pointer Details
- SHA256: 17ccf3b766b90eb500d75135e6331421d8ab125ae68da62fc641e68bd3e68580
- Pointer size: 131 Bytes
- Size of remote file: 235 kB
assets/teaser.jpgAdded

Large File Pointer Details
- SHA256: 7534ec7d0937bea3982ffc6300248771f87712ca51f2f3399700a623b14f8c8f
- Pointer size: 131 Bytes
- Size of remote file: 560 kB