NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Reproducible by Seed? Not on GPUs: Batch-Dependent Non-Determinism in Text-to-Image Models

Javier Conde, Xiuyuan Qi, Shanshan Liu, Pedro Reviriego

It’s late, your GPU is humming, and you’ve finally found that perfect "magic seed" for your text-to-image model. You’re certain that as long as you keep that seed and your prompt the same, you’ll get the exact same masterpiece every time.

Well, I hate to be the bearer of bad news, but a new paper by Javier Conde and his team suggests that your "magic seed" is more of a "polite suggestion." It turns out that on modern GPUs, the image you get depends heavily on who its "neighbors" are in the processing batch, what hardware you’re using, and even the numerical precision of the math.

TL;DR

Fixing the random seed and prompt does not guarantee a reproducible image on GPUs. Because floating-point math isn't perfectly associative, changing the batch size or the GPU hardware alters the order of operations, leading to tiny numerical drifts that can snowball into entirely different images—especially in newer autoregressive models.

What Problem Does This Paper Address?

In the world of AI, we treat the "seed" as a bedrock of reproducibility. If a researcher claims a model is better, or a safety auditor says a model is "clean," they usually provide a seed to prove it.

However, the authors point out a "hidden variable": the execution environment. In production, images aren't generated one by one; they are batched together to save time and money. This paper investigates whether the mere presence of other requests in a batch—or moving the model from an older RTX A6000 to a shiny new H100—changes the final pixels. If it does, then our benchmarks, safety audits, and even image-editing tools (which rely on keeping parts of an image "the same") are built on shaky ground.

Methods

The researchers didn't just look at one model; they stress-tested six of them across two major families:

  • Diffusion Models: The classics like SDXL, plus newer ones like FLUX.1 Klein and Qwen-Image-2.1.
  • Autoregressive Models: The rising stars like Emu3.5 and Janus-Pro-7B, which treat images like sequences of text tokens.

They ran these models on three generations of NVIDIA GPUs (Ampere, Ada Lovelace, and Hopper) using various numerical precisions (fp16, bf16, and quantized 8-bit formats like int8 and fp8).

Crucially, they used a "replay control" protocol. They proved that if you run the exact same batch twice on the same hardware, you get bit-identical results. This confirms the variation isn't "random noise"—it's a deterministic consequence of how the batching and hardware change the math.

Datasets

The study used sets of up to 100 prompts designed to "break" the models or highlight differences. These included:

  • High-frequency patterns: Grids, bricks, and herringbone patterns that are sensitive to tiny numerical shifts.
  • Semantic counters: Prompts with digits or scoreboards to see if the meaning of the image changes.
Fig. 1. Batch-1 reference images (arm A, first run) of one run per model for six example prompts (columns: prompt 00 bullseye, prompt 01 colored rings, prompt 04 red brick wall, prompt 07 herringbone bricks, prompt 08 pen crosshatch, prompt 09 fine grid hatch), chosen without metric-based selection. SDXL runs in fp16 at 1024 px, Janus-Pro-7B at 384 px native, and the other models at 512 px. The Janus-Pro-7B prompts are wrapped in ”A detailed image of ...”.

Key Insights and Ideas

  • The "Neighbor" Effect: Floating-point addition is not associative ($ (a+b)+c \neq a+(b+c) $). When you change the batch size, the GPU reshapes the tensors and changes the order in which it sums up numbers. These tiny errors (at the 10th decimal place) eventually "flip" a decision the model makes.
  • Autoregressive Models are Fragile: These models were the most sensitive. Because they generate images token-by-token, a single tiny numerical shift can cause the model to pick a different "next token." That one change then becomes part of the context for the next token, and the error compounds.
  • Diffusion is Robust but Not Immune: Diffusion models (which denoise an image) tend to "average out" small errors, but they still don't produce bit-identical results. In some cases, the changes are subtle; in others, they are structural.
  • Quantization is a Chaos Multiplier: Moving to 8-bit formats (fp8 or int8) to save memory significantly amplifies this non-determinism.

Key Results

The results are eye-opening for anyone relying on bit-level reproducibility:

  • Structural Similarity (SSIM) Crashes: For the autoregressive model Janus-Pro-7B, the SSIM between a single-image run and a batched run fell as low as 0.229. In plain English: the images looked completely different.
  • SDXL Changes Every Time: In bf16 precision on an A6000, zero images were bit-identical when comparing batch-1 to batch-8.
  • Visible Failures: In some "worst-case" scenarios, batching didn't just change the style; it broke the content. For example, a scoreboard that was correct in a single-image run might show corrupted or wrong digits when generated inside a batch.
Figure 4: An example of Qwen-Image-2.1 where batching turns a clean striped pattern into a messy crosshatch.

Limitations and Future Work

The authors are clear: they’ve diagnosed the disease, but they haven't provided the cure. While "batch-invariant kernels" exist for Large Language Models (LLMs), they haven't been widely implemented or tested for the complex pipelines of text-to-image models.

The paper concludes that for now, if you want your results to be truly reproducible, you can't just report the seed. You have to report the batch size, the precision, and the exact GPU model. Until we have "reproducible-by-design" kernels, the magic seed remains a bit of a myth.

Summary updated

BibTeX
@misc{conde2026reproducible,
  author = {Javier Conde and Xiuyuan Qi and Shanshan Liu and Pedro Reviriego},
  title = {{Reproducible by Seed? Not on GPUs: Batch-Dependent Non-Determinism in Text-to-Image Models}},
  year = {2026},
  eprint = {2611.30545},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.30545},
}
Figure