Semantic-First: Temporal Scheduling in Flow Matching for Reliable Emotional Image Generation
Organizations: Lanzhou University
Abstract
Affect-controlled image generation should change how a scene feels while preserving what the prompt specifies. We study the temporal allocation of stochastic exploration and policy optimization in flow-matching models as a means of controlling this balance. During RL training, our semantic-first schedule uses deterministic ordinary differential equation (ODE) sampling during the high-noise phase and confines stochastic differential equation (SDE) exploration and group relative policy optimization (GRPO) to a late window. Controlled experiments separate exploration location, optimization location, and terminal-step sampling, showing distinct semantic benefits from late exploration and late updates. On FLUX.1-dev, semantic-first improves prompt faithfulness, independently evaluated affect accuracy, and human-rated semantic preservation and overall preference. The expanded semantic audit records 2.7% subject drift, while GRPO training time decreases by 41.1% relative to original full-path Flow-GRPO. Window-width experiments characterize the affect-semantic and computational trade-offs, and replication on SD3.5-Medium reproduces the scheduling advantage. These results establish denoising time as a practical control dimension for reliable emotional image generation.
Figures & tables
| Method | V-Error | A-Error | CLIP | DINO | IQA | TIFA |
|---|---|---|---|---|---|---|
| EmotiCrafter | ||||||
| FLUX+VA-EIT | ||||||
| A: Full-path | ||||||
| B: Full-path | ||||||
| Progressive | ||||||
| Emotion-first |
| ID | SDE transitions | Optimized transitions | Transition 24 |
|---|---|---|---|
| A | 0–24 | 0–23 | SDE |
| B | 0–23 | 0–23 | ODE |
| C | 0–23 | 0–3 | ODE |
| D | 0–23 | 20–23 | ODE |
| E | 0–3 | 0–3 | ODE |
| F | 20–23 | 20–23 | ODE |
| ID | V-Error | A-Error | CLIPScore | DINO | CLIP-IQA |
|---|---|---|---|---|---|
| A | |||||
| B | |||||
| C | |||||
| D | |||||
| E | |||||
| F |
| Method | Qwen V-MAE | Qwen A-MAE |
|---|---|---|
| EmotiCrafter | ||
| FLUX+VA-EIT (no RL) | ||
| Flow-GRPO A | ||
| Full-path B | ||
| Progressive | ||
| Emotion-first E |
| Method | Identity | Count | Action | Spatial | Drift |
|---|---|---|---|---|---|
| EmotiCrafter | 72.0 | 67.7 | 65.8 | 65.7 | 28.0 |
| FLUX+VA-EIT (no RL) | 83.3 | 83.8 | 81.7 | 81.0 | 16.7 |
| Flow-GRPO | 73.3 | 70.8 | 70.8 | 70.5 | 26.7 |
| Progressive | 80.0 | 79.2 | 79.2 | 76.2 | 20.0 |
| Emotion-first | 70.0 | 66.9 | 63.3 | 63.8 | 30.0 |
| Semantic-first (ours) | 97.3 | 97.7 | 95.8 | 95.2 | 2.7 |
| Width (steps) | V-Error | A-Error | CLIP | DINO | IQA |
|---|---|---|---|---|---|
| W2 (22–23) | |||||
| W4 (20–23) | |||||
| W6 (18–23) | |||||
| W8 (16–23) |
| Method | V-Error | A-Error | CLIP | DINO | IQA |
|---|---|---|---|---|---|
| M0: no RL | |||||
| M1: Full-path | |||||
| M2: Early | |||||
| M3: Late (ours) |
| Method | Affect match | Semantic preservation | Overall preference |
|---|---|---|---|
| EmotiCrafter | |||
| FLUX+VA-EIT (no RL) | |||
| Flow-GRPO | |||
| Progressive | |||
| Emotion-first | |||
| Semantic-first (ours) |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Comparison | CLIPScore | DINO | V-Error | A-Error |
|---|---|---|---|---|
| F B | ||||
| F E | ||||
| D C | ||||
| F D | ||||
| S2 S1 | ||||
| B A |
| Baseline | Qwen V-MAE difference | Qwen A-MAE difference |
|---|---|---|
| EmotiCrafter | ||
| FLUX+VA-EIT (no RL) | ||
| Flow-GRPO A | ||
| Full-path B | ||
| Progressive | ||
| Emotion-first E |
| Baseline | Difference | 95% CI |
|---|---|---|
| EmotiCrafter | ||
| FLUX+VA-EIT (no RL) | ||
| Flow-GRPO A | ||
| Full-path B | ||
| Progressive | ||
| Emotion-first E |
| Baseline | Affect match | Semantic preservation | Overall preference |
|---|---|---|---|
| EmotiCrafter | |||
| FLUX+VA-EIT (no RL) | |||
| Flow-GRPO | |||
| Progressive | |||
| Emotion-first |
| Metric | M3 M1 | M3 M2 |
|---|---|---|
| V-Error | ||
| A-Error | ||
| CLIPScore | ||
| DINO | ||
| Qwen V-MAE | ||
| Qwen A-MAE |
| Metric | W2 W4 | W6 W4 | W8 W4 |
|---|---|---|---|
| V-Error | |||
| A-Error | |||
| CLIPScore | |||
| DINO | |||
| Qwen V-MAE | |||
| Qwen A-MAE |
| ID | SDE steps | V-Error | A-Error | CLIP | DINO | IQA |
|---|---|---|---|---|---|---|
| S0 | None (ODE) | |||||
| S1 | 0–3 | |||||
| S2 | 20–23 |
| Inference | V-Error | A-Error | CLIPScore | DINO | CLIP-IQA |
|---|---|---|---|---|---|
| F-all | |||||
| F-window |
| Width | Optimized steps | s/iteration | Wall-clock h | Total GPU-h |
|---|---|---|---|---|
| W2 | 2 | 13.85 | 1.15 | 9.23 |
| W4 | 4 | 18.76 | 1.56 | 12.51 |
| W6 | 6 | 24.32 | 2.03 | 16.21 |
| W8 | 8 | 29.68 | 2.47 | 19.79 |
| Window | V-Error | A-Error | CLIP | TIFA | IQA | DINO |
|---|---|---|---|---|---|---|
| Early | ||||||
| Middle | ||||||
| Late |
| Method | Target | V-Error | A-Error | CLIP | DINO | Retention (%) |
|---|---|---|---|---|---|---|
| Emotion-first | 0.918 | 1.371 | ||||
| Emotion-first | 1.003 | 0.982 | ||||
| Emotion-first | 0.884 | 1.268 | ||||
| Emotion-first | 1.025 | 1.105 | ||||
| Emotion-first | 0.822 | 1.082 | ||||
| Semantic-first | 0.996 | 1.381 |
| Width | Qwen V-MAE | Qwen A-MAE |
|---|---|---|
| W2 | ||
| W4 | ||
| W6 | ||
| W8 |
| Method | Qwen V-MAE | Qwen A-MAE |
|---|---|---|
| M0: no RL | ||
| M1: Full-path | ||
| M2: Early | ||
| M3: Late (ours) |
| ID | Optimized steps | s/iteration | Wall-clock h | Total GPU-h | Time saved |
|---|---|---|---|---|---|
| A | 24 | 31.84 | 2.65 | 21.23 | – |
| B | 24 | 31.27 | 2.61 | 20.85 | 1.8% |
| C | 4 | 24.96 | 2.08 | 16.64 | 21.6% |
| D | 4 | 24.51 | 2.04 | 16.34 | 23.0% |
| E | 4 | 19.37 | 1.61 | 12.91 | 39.2% |
| F | 4 | 18.76 | 1.56 | 12.51 | 41.1% |
Controllable Image Generation
Controllable image generation steers images using spatial, visual, semantic, stylistic, or physical constraints beyond ordinary text prompts.
See all 215 papers