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.