Reproducible by Seed? Not on GPUs: Batch-Dependent Non-Determinism in Text-to-Image Models
Authors: Javier Conde, Xiuyuan Qi, Shanshan Liu, Pedro Reviriego
Organizations: Information Processing and Telecommunications Center, ETSI de Telecomunicación, Universidad Politécnica de Madrid, Madrid, Spain · University of Electronic Science and Technology of China, Chengdu, China
In text to image AI models, fixing the prompt and the random seed is widely assumed to fix the image. We show that it does not on GPUs. We evaluate six text-to-image models (diffusion and autoregressive) under four numerical precisions and quantizations on three GPU types (RTX A6000, RTX 6000 Ada, and H100 NVL), across up to 100 prompts per set for all six models. For each configuration we compare, with the prompt and seed fixed, the image generated alone with the image generated inside a batch, and we also compare across GPUs. Every replay control reported here is bit-exact, so the variation is not random noise: the execution setting, mainly the batch composition and the GPU, decides the output. The effect is large and model dependent. Structural similarity between the single-image and the batched output falls to 0.580 for an autoregressive model in bf16 and to 0.551 with int8. For a second autoregressive model in bf16 it falls to 0.261 with sampled decoding and to 0.229 with greedy decoding, and for an fp8 diffusion model to 0.68. A diffusion model in bf16 stays close to the batch-1 output (0.96-0.98) but changes every image. In most cases the batched image is a different but equally valid image; in some, such as prompts with digits and counters, it is visibly worse. Cross-GPU differences are of the same order as the batch effect: for one autoregressive model in bf16 compared across two GPU architectures (RTX 6000 Ada versus RTX A6000), no image is bit-identical and the cross-GPU LPIPS (0.355 to 0.383) matches the batch effect within one GPU (0.347 to 0.381). The consequences are direct: seeds do not make results reproducible, benchmarks and image-quality comparisons that mix batch sizes or hardware can be biased, and safety audits and A/B tests on generated images need the serving setup reported.
Figures & tables
Model
Family
Parameters
Precisions
Resolution
Steps
Guidance
SDXL base 1.0
Diffusion (U-Net)
∼ 3.5B
fp16, bf16
1024 × 1024
30
7.5
Qwen-Image-2.1
Diffusion (MMDiT)
7B
bf16, fp8
512 × 512 768 × 768
40
1.0 (off)
FLUX 3 Klein
Diffusion (rectified flow)
5.6B
bf16, int8, fp8
512 × 512
50
3.5
HiDream-O1
Diffusion
8B
bf16, int8, fp8
512 × 512
50
5.0
Emu3.5
Autoregressive
34B
bf16, int8
512 × 512 (32 × 32 tokens)
–
greedy
Janus-Pro-7B
Autoregressive
7B
bf16
384 × 384 (576 tokens)
–
greedy, sampled
TABLE I: Models and decoding configurations.
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 …”.
Model
Run
P
S
A0/A1
B
C/R
SDXL
s10/s25
10/25
3
10/10, 25/25
256/632
16
SDXL (bf16)
s100
100
1
100/100
2504
16
Qwen-Image-2.1
s10
10
2
10/10
64
8
Qwen-Image-2.1
s25
25
2
25/25
64
8
Qwen-Image-2.1
s100
100
2
100/100
64
8
Qwen-Image-2.1
s100, B24
100
2
100/100
192
24
TABLE II: Protocol sizes per model and stage: prompts per set ( P ), sets ( S ), and images per arm. A0/A1: the two solo arms; B: batched; C or R: the replay (C for SDXL, Qwen-Image-2.1, and HiDream-O1, R for FLUX 3 Klein, Emu3.5, and Janus-Pro-7B). Qwen-Image-2.1’s arm B is 64 at every stage (8 rounds of 8). Janus-Pro-7B sizes are per decoding mode. Totals per run (generated PNGs) are in Appendix .
Metric
What it measures
Bit-identity
Fraction of bit-identical images, where bit-identical means the decoded pixel arrays are exactly equal
MAE
Mean absolute error over pixels, on a 0 to 255 scale
SSIM
Structural similarity index [ 13 ] , computed with scikit-image 0.26.0 on RGB images at native resolution with data range 255, averaged over channels
LPIPS
Perceptual distance [ 14 ] with the AlexNet backbone, using lpips 0.1.4 with inputs scaled to [−1,1]
TABLE III: The four metrics between each batched image and its batch-1 reference.
Model
Precision
Batch-1 rerun
Batch replay
SDXL
fp16, bf16 3 3 3 SDXL fp16 and bf16 are from the dtype probe: 8 prompts, batch 8 versus batch 1.
yes
yes
Qwen-Image-2.1
bf16, fp8
yes
yes
FLUX 3 Klein
bf16, int8, fp8
yes
yes
HiDream-O1
bf16, int8
yes
yes
HiDream-O1
fp8
yes (3 runs)
yes
Emu3.5
bf16, int8
yes
yes
TABLE IV: Replay control: identical reruns of the same run. Green: the rerun reproduces the original run bit-exactly. Light gray model cells mark the autoregressive models (Emu3.5, Janus-Pro-7B).
Model
Prec.
GPU
Bit-id.
MAE
SSIM
LPIPS
SDXL
fp16
A6000
0.0
3.308
0.951
0.026
SDXL
bf16
A6000
0.0
8.230
0.878
0.072
SDXL (s10)
fp16
A6000
0.0
1.85
0.970
0.013
SDXL (s25)
fp16
A6000
0.0
2.164
0.973
0.013
Qwen-Image-2.1
fp16
H100 NVL
0.000
6.789
0.878
0.063
Qwen-Image-2.1
bf16
H100
0.0
7.476
0.873
0.068
TABLE V: Batch versus single-image generation with the same prompt and seed. SSIM against the batch-1 reference (1.0 is identical). Shading: green = identical or near-identical, yellow = sub-visible or small visible, orange = visible structural change, red = large structural change, dark gray = not measured. Light gray non-result cells mark the autoregressive models (Emu3.5, Janus-Pro-7B). The SDXL MAE is logged by the runner.
Fig. 2: Effect of the precision at stage 10, the only stage all six models share: mean SSIM (a) and mean LPIPS (b) of the batched images against the batch-1 reference. Circles: diffusion models; squares: autoregressive models. LPIPS is shown for all six models.
TABLE VI: Worst cases measured. Shading as in Table V .
Model
Prec.
Metric
B8
B16
B24
B32
FLUX 3 Klein
bf16
SSIM
≥ 0.989
pooled in B8 and B32
≥ 0.989
FLUX 3 Klein
bf16
LPIPS
≤ 0.002
pooled in B8 and B32
≤ 0.002
SDXL
fp16
SSIM
0.977
OOM
OOM
OOM
Qwen-Image-2.1
bf16
SSIM
0.875
0.864
0.857
0.853
Qwen-Image-2.1
fp8
SSIM
0.863
0.837
0.833
0.827
Qwen-Image-2.1
bf16
LPIPS
0.088
0.093
0.091
0.089
TABLE VII: Batch-size dose-response. Shading as in Table V . FLUX 3 Klein’s batched arm pools batches 8, 16, and 32, so there are no separate B16 and B24 measurements; the effect shows no batch trend. Not attempted means no stage result exists. SDXL B16 and separate batch-24 and batch-32 calls OOM under the 46 GB decimal allocator cap.
TABLE VIII: Factor attribution per model. Shading as in Table V . The Qwen-Image-2.1 cross-setting comparison is reported in the text.
Prompt family
Finding
High-frequency patterns
lowest-SSIM cases
Digits, text, counters
visibly worse, wrong digits
Cross-model transfer
model-dependent ranking
TABLE IX: Prompt-type breakdown. Shading as in Table V .
Factor
Impact
Batch presence (batched versus solo)
largest
Model family (autoregressive versus diffusion)
largest
Precision (8-bit formats versus 16-bit)
large
GPU (RTX 6000 Ada versus RTX A6000, Janus bf16)
large
Prompt type (high-frequency patterns)
large
Batch size beyond 8
small
TABLE X: Impact of the factors studied, with the prompt and seed fixed. Shading as in Table V : green none, yellow small, orange large, red largest.
Javier Conde received his Ph.D. in Telematics at Universidad Politécnica de Madrid, Madrid, Spain. Now is an associate professor at the same university. His research interests include Digital Twins, Big Data, Semantic Web, and Artificial Intelligence.
Table 19
Xiuyuan Qi received the B.S. degree in electronic information engineering from Harbin Engineering University, Harbin, China, in 2022. He is currently pursuing the Ph.D. degree with University of Electronic Science and Technology of China, Chengdu, China. His current research interests include fault-tolerant design of low-power AI processors and computer architecture design.
Table 20
Shanshan Liu received the Ph.D. degree in Microelectronics and Solid-State Electronics from Harbin Institute of Technology, China, in 2018. She was a post-doctoral researcher at Northeastern University, Boston, USA, from 2018 to 2021, and an assistant professor at New Mexico State University, Las Cruces, USA from 2021 to 2023. She is currently a professor with the School of Information and Communication Engineering, University of Electronic Science and Technology of China.
Table 21
Pedro Reviriego received the M.Sc. and Ph.D. degrees in Telecommunications engineering from the Technical University of Madrid, Madrid, Spain, in 1994 and 1997, respectively. From 1997 to 2000, he was an R&D Engineer with Teldat, Madrid. In 2000, he joined Massana and from 2004 to 2007, he was a Distinguished Member of Technical Staff with the LSI Corporation. From 2007 to 2018 he was with Universidad Antonio de Nebrija, and from 2018 to 2022 with Universidad Carlos III de Madrid. He is currently with Universidad Politécnica de Madrid.
Text-to-image generation creates images from natural-language prompts using generative models, with research focused on fidelity, control, efficiency, and safety.
Diffusion models have consistently driven progress in text-to-image generation. However, it is challenging to attribute recent progress to specific modeling and data choices: state-of-the-art open-weight models provide limited ablations, and do not disclose their training data and full training details. The research community needs fully open (weights, data, and code) models as a foundation for further research; yet existing fully open models still fall significantly short of leading models in performance. In this project, we conduct a systematic investigation of the modeling and data design choices in text-to-image diffusion training and inference with 300+ controlled experiments totaling 700K+ TPU v6e hours. Our experiments highlight several empirical findings (e.g., equal weighting is a strong default for mixing curated datasets) and simple design decisions (e.g., larger text encoder adapters improve performance with minimal added parameters) for training strong models. Guided by these insights, we train i1, a 3B-parameter text-to-image diffusion model using only publicly available datasets. i1 is competitive with leading models on five representative benchmarks (GenEval, DPG, PRISM, CVTG-2K, and LongText), and outperforms the best existing fully open model by 29.5 absolute percentage points on average. We provide the i1 checkpoints, training and inference code, and the data processing pipeline. Together, our findings and the i1 recipe establish a practical foundation for future open research in text-to-image diffusion models. Our code is available at https://github.com/zlab-princeton/i1.
Text-to-image diffusion models can synthesize high-quality images, yet the outcome is notoriously sensitive to the random seed: different initial seeds often yield large variations in image quality and prompt-image alignment. We revisit this "seed effect" and show that attention dynamics over prompt core tokens, the content-bearing words, measured during the first few denoising steps, strongly predict final generation quality. Building on this observation, we introduce Attention-Based Seed Selection (ABSS), a training-free, plug-and-play method that ranks seeds for a given prompt by leveraging cross-attention to core tokens during the denoising process. ABSS requires no finetuning and does not alter the initial noise; it scores and ranks all candidate seeds, keeps only the top-k for full generation, and discards the rest, without relying on a fixed accept/reject threshold. Operating purely at inference time, ABSS can serve as a lightweight pre-selection add-on for existing seed-optimization pipelines, enabling additional gains. Across three benchmarks, extensive experiments show that ABSS enables consistent improvements in text-image alignment and visual quality for Stable Diffusion variants, as corroborated by human preference and alignment metrics.
Text-to-image models are typically reported on average-case prompts, which understates the gap between systems on compositionally demanding requests involving precise object counts, multi-object attribute binding, legible embedded text, and explicit spatial constraints. We evaluate four production text-to-image systems: Hunyuan 3.0, Gemini 3 Pro Image ("Nano Banana Pro"), Black Forest Labs FLUX.2, and Ideogram 3.0. The evaluation uses the 48 hardest prompts drawn from the DataSeeds.AI Sample Dataset (DSD), selected through an automated complexity-scoring pass over the full corpus. Every generated image is graded using an independent-judge rubric. GPT-5.4-Pro authors an atomic, weighted, mutually exclusive and collectively exhaustive (MECE) evaluation rubric, while Gemini 3.1 Pro Preview independently determines whether each criterion is satisfied. Gemini 3 Pro Image ranks first with a score of 84.8/100, narrowly ahead of FLUX.2 at 82.3/100. Ideogram 3.0 and Hunyuan 3.0 score 65.7/100 and 63.3/100, respectively. Failure analysis shows that the leading systems primarily lose points through object miscounting and geometric artifacts, whereas the trailing systems more frequently produce garbled text. Ideogram 3.0 also frequently omits requested elements. Full per-sample rubrics, scores, and failure annotations are available from the authors upon request.