RealGen: Photorealistic Text-to-Image Generation via Detector-Guided Rewards¶
Conference: ECCV2026, Poster ID 3927
Paper: ECCV Paper
Area: Image Generation
Keywords: text-to-image, photorealism, detector rewards, prompt rewriting, GRPO
TL;DR¶
RealGen turns synthetic-image detectors into realism rewards, first optimizing Qwen3 prompt rewriting and then FLUX image generation, achieving a 50.15% model-judged win rate against real photographs on RealBench with the full system, which does not establish indistinguishability for all human observers.
Background & Motivation¶
Text-to-image models can handle complex attribute control and text rendering, yet following a prompt and looking like a real photograph remain different objectives. An image may contain the requested objects while revealing synthetic origins through skin texture, local highlights, and background blur. The paper targets this gap between plausible overall content and excessively smooth or oily materials, rather than improving text recognition or object counting. Existing post-training methods use human preference rewards such as PickScore and HPS to favor images that evaluators like, but preference does not necessarily imply realism. An ordinary snapshot can be realistic yet score poorly because its composition or colors are less appealing; reward optimization may consequently encourage a more artistic style.
Another approach curates large collections of high-quality photographs for alignment, but collection costs and aesthetic biases constrain scalability. RealGen instead draws on existing synthetic-image detection models: a model that recognizes unnatural skin or abnormal image statistics might also provide feedback for correcting these defects. This introduces a hypothesis that needs testing: does becoming harder to classify as fake improve perceived realism, or merely exploit classifier weaknesses? The authors therefore combine semantic and feature-level detectors and evaluate with reward-independent detectors, model judges, and a small human validation study. These choices provide cross-checks, but detector scores remain proxies for realism, not evidence that an image is an authentic photograph.
Prompts are another bottleneck: brief inputs often omit materials, lighting, and scene details, encouraging the generator to return frequent, formulaic appearances from its training distribution. The paper does more than replace a diffusion reward: it first teaches a language model to supply concrete photographic descriptions and then teaches the generator to render more natural visual properties. Both stages receive feedback through the final generated image, so rewriting is useful only when it improves the image, rather than simply lengthening the text or enriching its prose. Core Idea: combine semantic artifacts, feature-level artifacts, and text alignment into image rewards, then use staged GRPO to improve both photographic descriptions and photographic generation.
Method¶
Overall Architecture¶
The system receives user text, rewrites it with Qwen3-4B-Instruct, and passes the more specific description to FLUX.1-dev with fine-tuned LoRA layers for denoising and decoding. Its output remains an image; it does not add a user-facing detection report or perform region-by-region repair after generation. Training proceeds through supervised fine-tuning of both components, rewriting optimization with a frozen generator, and generator optimization with a frozen rewriter. Multi-objective detector rewards provide feedback for both reinforcement learning stages, while independent realism evaluation checks whether improvements extend beyond the training rewards. Solid edges below show training-stage progression; dashed edges distinguish image-reward feedback and the post-training inference path.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
Reward["Multi-objective<br/>detector rewards"] -.->|Image scores| Rewrite["Image-feedback<br/>rewriting"]
Cold["SFT cold start<br/>for both components"] --> Rewrite
Rewrite -->|Freeze rewriter| Diffusion["Local exploration,<br/>complete evaluation"]
Reward -.->|Image scores| Diffusion
Diffusion --> Evaluation["Independent<br/>realism evaluation"]
Diffusion -.->|Post-training weights| Inference["Inference: rewrite text,<br/>then denoise and decode"]
Inference --> Image["Generated image"]
Key Designs¶
1. Multi-objective detector rewards: constrain visible artifacts and deep statistical anomalies separately
The semantic branch uses Forensic-Chat, an interpretable synthetic-image detector optimized from Qwen2.5-VL-7B. It examines content-level irregularities such as excessively smooth skin, facial and hand artifacts, and implausible background blur. The authors use the normalized probability of its output "real" token as the semantic reward, rather than optimizing against an entire generated explanation. The feature branch uses OmniAID to constrain frequency artifacts and abnormal noise patterns that are less readily expressed in natural language. The reward for this branch is clearly defined in the prose on page 6:
The third branch is a Long-CLIP image-text alignment reward, intended to prevent realism optimization from ignoring the textual condition. The raw scores cannot simply be added because their scales and distributions differ, potentially allowing one branch to dominate. For each reward dimension, the authors subtract the mean and divide by the standard deviation across the candidate-image batch, then sum the normalized values into the advantage. GRPO consequently updates the policy using relative performance rather than treating one detector's raw probability as the sole criterion. Equations (1) through (5) are visibly damaged in the text extraction; this note explains fusion from the readable prose and does not guess the exact softmax, clipping terms, or KL coefficient. The connection between harder detection and better visual realism is a methodological hypothesis; the reward definition alone cannot rule out reward hacking.
2. Image-feedback rewriting: make the rewriter accountable for the final image
The first stage freezes the image generator and updates only the language model, avoiding simultaneous changes that would obscure the source of reward improvements. Supervised fine-tuning first teaches the language model to follow the system's thinking, planning, and description-generation pattern. During reinforcement learning, it samples \(N\) rewritten prompts for the same input, and the frozen generator produces an image from each rewrite. The detection and alignment branches score these images, and their fused advantages provide the training signal for the text policy. A policy trajectory here is the complete rewritten token sequence, not an image-denoising trajectory; the language model does not need pixel gradients through the generator. GRPO uses the probability ratio between the new and old text policies and relative candidate rewards to favor descriptions that generate better results.
The rewriter learns to add concrete scene details, natural imperfections, and descriptions associated with photographic appearance. These additions steer generation away from a default flawless look toward local variations found in real photography, rather than appending an identical realism phrase to every input. However, enriching a scene can introduce unspecified backgrounds or clothing, so descriptive richness and preservation of user intent must be considered together. Page 7 describes the stage-one reward as a function of the generated image and rewritten text; this alone does not prove that every original requirement is preserved. Long-CLIP provides an alignment safeguard, not a guarantee of consistency for every attribute or constraint.
3. Local exploration, complete evaluation: avoid scoring unfinished images with a detector
The second stage freezes the language model and optimizes the diffusion generation policy using the Flow-GRPO framework. A trajectory now consists of consecutive latent denoising transitions, and the policy ratio compares conditional transition probabilities rather than language-token probabilities. The paper notes that limited-step generation or full-trajectory stochastic exploration can produce noisy, blurry images outside the detectors' familiar input distribution. Evaluating realism on such outputs can produce misleading feedback, confusing incomplete sampling with deficiencies in the generator's realism. The authors therefore execute complete denoising to obtain evaluation images, while selecting only a consecutive window of \(\Delta t\) steps for stochastic exploration and producing \(N\) trajectories. SDE sampling supplies exploration noise, while complete generation lets the reward inspect finished images closer to those produced at inference time.
The modification does not introduce a new denoising network; it gives exploration scope and reward-evaluation scope different responsibilities.
Local stochastic variation supplies comparable policy candidates, while complete evaluation reduces the risk of learning detector-pleasing behavior on blurry intermediate states.
The readable main text does not specify a numerical value for \(\Delta t\), so it cannot support an exact exploration-window reproduction or a claim that a particular window is optimal.
During training, only some short prompts pass through the rewriter; the rest go directly to the generator, exposing it to conditions of different lengths.
This also explains the separate evaluation of Ours without rewriting and Ours* with rewriting; they are not interchangeable configurations.
Ordinary inference requires neither GRPO nor detector rewards; with the full system enabled, text rewriting is followed by image generation.
4. Independent realism evaluation: test whether gains extend beyond the training rewards
RealBench contains 1000 real images with corresponding captions across 7 categories, with increased representation of portraits. It evaluates photorealism against real photographic references rather than replacing instruction-following benchmarks such as GenEval. Detector-Scoring uses the probability of being classified as real, retaining the training detectors Forensic-Chat and OmniAID while adding reward-independent SIDA and Effort. SIDA evaluates visible semantic artifacts and Effort evaluates feature-level anomalies, preventing evaluation from relying entirely on the optimized models. Arena-Scoring instead asks GPT-5 to make a forced choice between two images corresponding to the same text and select the more realistic one. Each model participates in at least 3000 random pairings against other generators or real photographs; the win rate is the number of wins divided by the number of comparisons.
Relative comparison avoids requiring a stable absolute realism score for a single image, but depends on the opponent pool and judge preferences. The reported agreement above 80% between GPT-5 and Gemini 3.0 is a cross-model check, not a measure of agreement with humans. A separate study recruits 15 non-expert evaluators and samples 100 generated images from each of 4 models for single-image authenticity judgments and real-fake pairwise comparisons. The two tasks use non-overlapping data for each evaluator; OmniAID and GPT-5 agree with human judgments at 75% and 87%, respectively. These findings support relative automated rankings, but limited participant, model, and image coverage cannot exclude reward hacking across all distributions.
A Worked Example¶
Figure 8 on page 14 starts from a short description of a person's hair and eye colors and shows the rewriter adding clothing, an outdoor setting, and a glass background. It also introduces natural lighting and subtle skin texture, reducing reliance on a generic portrait prior. During stage-one training, related inputs produce multiple rewrites, and final-image rewards determine which rewrites are reinforced rather than having a person select the longest text. Stage two keeps the textual condition relatively stable and directs learning toward visual rendering, including materials and background reflections. This is a mechanism illustration from the paper, not a standalone quantitative experiment; it provides no basis for inventing an improvement magnitude for an individual detail.
Loss & Training¶
Both stages use GRPO: the text stage updates token sequences and the image stage updates denoising transitions, sharing the normalized multidimensional reward as their advantage signal. Training images primarily come from the real-image subset of HPD v3, with supervised fine-tuning cold starts for both components before reinforcement learning. Experiments use 8 H200 GPUs, batch sizes of 32 and 12 for the first and second stages, and approximately 230 steps for the overall reinforcement learning process. These describe hardware and training configuration, not throughput, elapsed training time, or inference cost per image. The readable main text does not fully specify cold-start data construction, LoRA settings, or exploration-window hyperparameters, so the method summary is not a complete reproduction recipe.
Key Experimental Results¶
Main Results¶
The following selection is from Table 1 on page 10, evaluated on RealBench; detector scores retain the paper's scale, and the Arena columns are percentage win rates, with higher being better throughout.
Effort and SIDA are excluded from training rewards; VS Real compares against real photographs and VS Others compares against other models, so the columns are not substitutes.
Ours* enables language-model prompt rewriting, whereas Ours omits this inference component.
| Model / Config | Effort | SIDA | VS Real (%) | VS Others (%) | HPSv2.1 | HPSv3 |
|---|---|---|---|---|---|---|
| FLUX.1-Dev | 14.85 | 26.03 | 12.61 | 43.60 | 31.21 | 13.58 |
| Qwen-Image | 17.10 | 30.93 | 18.25 | 47.35 | 25.50 | 8.15 |
| SRPO | 24.73 | 50.62 | 40.70 | 64.30 | 29.66 | 12.43 |
| FLUX-Krea | 18.42 | 37.46 | 37.60 | 66.40 | 30.75 | 12.50 |
| Ours | 31.71 | 67.43 | 43.41 | 74.80 | 31.87 | 13.61 |
| Ours* | 38.35 | 73.10 | 50.15 | 84.85 | 28.24 | 11.11 |
The full system exceeds FLUX-Krea by 12.55 percentage points on VS Real, but this is a model judge's choice under the specified pairing protocol, not human authenticity-classification accuracy.
Rewriting increases VS Others from 74.80% to 84.85%, while HPSv3 falls from 13.61 to 11.11.
The table therefore does not support improvement in every aesthetic and preference metric after rewriting; it instead demonstrates a possible separation between realism and general preference scores.
For cross-dataset evidence, Table 2 on page 12 reports OmniAID of 56.93 and HPSv3 of 13.10 for Ours on the HPDv2 Photo subset, versus 44.96 and 11.39 for FLUX-Krea.
Ablation Study¶
The following table reproduces the reward comparison in Table 4 on page 14, retaining the reported values for post-training the baseline with different rewards.
Effort, SIDA, and VS Real provide reward-independent evaluation; CLIP monitors text alignment and should not be described as a completely independent realism judge.
| Reward Config | Effort | SIDA | VS Real (%) | CLIP |
|---|---|---|---|---|
| Base (FLUX.1) | 14.85 | 26.03 | 12.61 | 86.33 |
| + PickScore | 12.75 | 29.30 | 22.96 | 86.17 |
| + HPSv2.1 | 11.46 | 28.82 | 19.12 | 86.24 |
| + Detector-Score | 31.71 | 67.43 | 43.41 | 86.80 |
Detector rewards exceed PickScore by 18.96 points on Effort and 20.45 percentage points on VS Real, supporting the motivation that preference rewards are not equivalent to realism rewards.
However, this compares the aggregate Detector-Score rather than individually removing Forensic-Chat, OmniAID, or Long-CLIP, so it does not isolate each branch's causal contribution.
Key Findings¶
- Figure 7 on page 14 reports
VS Realof 12.16% for the baseline, 27.28% after rewriter-only optimization, and 50.15% after additional generator optimization, supporting gains from both stages. - The Figure 7 baseline of 12.16% differs from 12.61% in Tables 1 and 4; this note preserves their respective sources rather than correcting them or combining the two series.
- Improvements in reward-independent detectors and a model judge are stronger evidence than training rewards alone, but broader human studies are still required to establish general perceptual benefits.
Highlights & Insights¶
- Synthetic-image detection becomes training feedback rather than only a post-generation filter. A transferable idea is to supplement broad preference rewards with evaluators trained for specific defects.
- Image-level feedback connects prompt enhancement to actual rendering. The training objective is closer to the user's final experience than supervision of linguistic presentation alone.
- Local exploration and complete evaluation address exploration costs and scoring reliability separately. The reward model's input distribution is itself part of reinforcement learning stability.
Limitations & Future Work¶
- Detectors are proxies: improvement on unseen detectors reduces overfitting concerns, but a small set of models may share biases. Stronger tests should include independent populations, photographic settings, and out-of-distribution images.
- Arena uses a model judge and forced choices, so a win rate near 50% against real images indicates competitiveness only under that protocol. The main tables provide no confidence intervals, preventing statistical-significance claims about small differences.
- Automatic rewriting introduces unspecified details, leaving preservation of the original instruction in need of fine-grained testing. Lower preference scores in Table 1 also show that realism gains are not a cost-free improvement in every aspect of quality.
- Individual reward branches lack removal ablations, so none can be declared indispensable from these experiments. The readable text is also insufficient to recover all training hyperparameters and damaged equations.
- The following is the note author's application-level interpretation: more realistic synthetic content should be accompanied by provenance labeling and responsible publication; difficulty of detection is not grounds for claiming that content is authentic.
Related Work & Insights¶
- Compared with Flow-GRPO / DanceGRPO: RealGen follows visual-generation reinforcement learning, primarily changing rewards, the prompt component, and diffusion exploration rather than reinventing GRPO.
- Compared with FLUX-Krea / SRPO: It explicitly delegates photorealism feedback to synthetic-image detectors instead of relying only on general human preference. A fair interpretation considers unseen detectors, Arena, and preference scores together.
- Compared with PromptEnhancer: Expanding prompts is not the endpoint; RealGen optimizes the text policy using generated-image rewards and subsequently trains the generator.
- Compared with artifact-localization and repair methods: It changes the generation distribution during post-training rather than only repairing existing images locally. Complementarity with local repair is a follow-up question from the reader, not a demonstrated result of this paper.
Rating¶
The following are the note author's subjective assessments on a 5-point scale, not conference review scores. - Novelty: 4/5. Detector rewards and staged optimization form a clear approach, while the underlying optimization algorithm comes from prior work. - Experimental Thoroughness: 4/5. Reward-independent detection, cross-dataset tests, and human validation are included, but branch-level ablations and uncertainty estimates are missing. - Writing Quality: 3/5. The pipeline is clear, but reproduction details are incomplete and the stage figure and main table contain an unexplained baseline discrepancy. - Value: 4/5. The work offers a reusable direction for realism post-training and motivates separating authenticity, semantic consistency, and aesthetic preference.