1from transformers import AutoProcessor, AutoModelForImageTextToText
2import torch
3
4ckpt = "P1n3/sdg-detector-grpo" # merged full checkpoint
5
6processor = AutoProcessor.from_pretrained(ckpt)
7model = AutoModelForImageTextToText.from_pretrained(
8 ckpt,
9 dtype=torch.bfloat16,
10 device_map="auto",
11)
12model.eval()
1python -m sglang.launch_server \
2 --model-path P1n3/sdg-detector-grpo \
3 --served-model-name sdg-detector \
4 --port 17142 --tp 4 --api-key flowgrpo --trust-remote-code
1<think>
2... reasoning about image quality and caption alignment ...
3</think>
4<answer>
5[
6 {
7 "box_2d": [x0, y0, x1, y1],
8 "label": "artifact" or "misalignment",
9 "description": "...",
10 "importance": 1-100
11 }
12]
13</answer>
1@article{zhang2026and,
2 title={Where, What, Why, and Importance: Structured Defect Grounding for Text-to-Image Feedback},
3 author={Zhang, Huaisong and Yu, Hao and Zhang, Yuxuan and Wang, Jiahe and Chen, Xinrui and Cao, Haoxiang and Lu, Feng and Zhang, Wendong and Yu, Changqian and Yuan, Chun},
4 journal={arXiv preprint arXiv:2606.06113},
5 year={2026}
6}