Image Generation from Contextually-Contradictory Prompts

Saar Huberman, Or Patashnik, Omer Dahary, Ron Mokady, Daniel Cohen-Or · DOI

Abstract

Modern text-to-image diffusion models often struggle with "contextual contradictions"—prompts that combine concepts in ways that clash with the model's learned statistical biases. This paper introduces a training-free, stage-aware prompt injection framework. By using a Large Language Model (LLM) to decompose complex prompts into a sequence of structurally similar "proxy prompts" applied at specific denoising stages, the method successfully aligns generated images with difficult text descriptions while maintaining high visual realism.

The Challenge of Contextual Contradictions

While diffusion models like Stable Diffusion and FLUX excel at high-quality image synthesis, they are prone to learned spurious correlations. When a prompt contains a contextual contradiction—a semantically possible but statistically rare combination—the model often defaults to its training priors.

For instance, asking for a "rooster in a nest" frequently results in a generic, colorful bird because the concept of a "nest" is heavily entangled with common songbirds in training data. The model effectively takes a shortcut, ignoring the specific "rooster" identity in favor of the more common correlation. This tension often leads to distorted subjects or a shift toward cartoonish art styles as the model fails to reconcile the conflicting concepts.

Methodology: Stage-Aware Prompt Injection

The proposed solution exploits the coarse-to-fine generation process inherent in diffusion models. In the early stages of denoising, the model establishes low-frequency structures like layout and basic shapes. High-frequency details and textures emerge only in the later stages. The authors' framework works entirely at inference time through three key steps:

  1. Prompt Decomposition: An LLM (GPT-4o) analyzes the target prompt to identify contradictions and generates a sequence of "proxy prompts" mapped to specific timesteps.
  2. Concept Substitution: Instead of removing conflicting objects, the LLM replaces them with structurally similar, non-conflicting placeholders for the early denoising steps.
  3. Time-dependent Injection: The proxy prompt guides the early layout. Once the spatial structure is established, the prompt switches to the target text to fill in the final details.

For the prompt "a dragon blowing water," the model might initially use a proxy like "a dragon blowing white smoke." This establishes the correct spatial layout for an emission. In later steps, the prompt switches back to "water," allowing the model to apply water textures to the already-formed structure.

Key Insights and Results

The research highlights several critical aspects of the diffusion process:

  • Irreversibility: Once a coarse layout is established in early steps, it is effectively "frozen." If the model draws a generic bird shape early on, it cannot be transformed into a rooster later.
  • Placeholder Efficacy: Using a structurally similar placeholder is superior to simply removing the object, as it reserves the necessary spatial "real estate" for the final concept.
  • Style Restoration: By using contradiction-free proxies early on, the method prevents the model from defaulting to surreal or cartoonish styles, preserving photorealism.

Quantitative and Qualitative Evaluation

The method was tested on Whoops!, Whoops-Hard, and a new ContraBench dataset of 40 highly contradictory prompts. Using GPT-4o as a vision-language judge, the proposed method achieved a score of 66.16 on ContraBench, significantly outperforming the base FLUX model (57.16). Human evaluations further supported these findings, with an 81% win rate for prompt alignment and a 63% win rate for visual quality compared to the base model.

Conclusion and Future Work

This stage-aware decomposition framework provides a robust, training-free way to overcome the semantic limitations of current diffusion models. While the method is constrained by the inherent capabilities of the underlying model (such as difficulty with precise finger counts or spatial orientations), it marks a significant step toward more controllable and reasoning-capable image generation. Future work aims to incorporate dynamic adjustments via Vision-Language Models and extend the framework to text-to-video generation.

Summary updated

BibTeX
@misc{huberman2025image,
  author = {Saar Huberman and Or Patashnik and Omer Dahary and Ron Mokady and Daniel Cohen-Or},
  title = {{Image Generation from Contextually-Contradictory Prompts}},
  year = {2025},
  eprint = {2506.01929},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.01929},
}
Figure