New Tool Radar

Local AI

Reproduce the Same Local Image with a Fixed Seed in Automatic1111

Fix the seed in Automatic1111 to reproduce an image exactly, then change one setting at a time to compare fairly.

Schematic with three steps: Find the seed of an image you; Reuse the seed; Change one thing at a time.

In Automatic1111, a seed of -1 means a random seed for every image, so the same prompt gives a different picture each time. Writing down the seed of an image you like and reusing it reproduces that image, as long as the prompt and settings stay the same.

What you need

  • Automatic1111 WebUI installed with a checkpoint loaded
  • An image already generated, with its seed visible
  • A prompt and settings you want to keep fixed

Step 1: Find the seed of an image you like

Generate an image with the seed left at -1, then read the seed value shown with the generated image. That number is the seed that produced exactly this picture.

Step 2: Reuse the seed

Type the same seed number into the Seed field, keep the prompt, checkpoint, steps, CFG scale, and size unchanged, and click Generate again. The result should match the earlier image.

Step 3: Change one thing at a time

With the seed fixed, change a single setting, such as the CFG scale or one prompt word, and generate again. Any difference you see comes from the setting you touched, not from a new roll of the dice.

Worked example: reproduce a portrait with seed 1234

The table below is a synthetic example. The seed behaviour comes from the cited WebUI guides; the seed number and prompt are illustrative.

Run Seed Expected result
First -1 (random) New image, seed shown as 1234
Repeat 1234 Same image as the first run
Changed CFG 1234 Same composition, different adherence

Expected result (UNTESTED). the repeated run with seed 1234 matches the first image, and a run with a changed setting differs only in the effect of that setting. This check was not run live; the seed behaviour comes from the cited WebUI guides.

Limits

  • The seed must be reused with the same model, prompt, size, steps, and sampler.
  • Changing the model version or sampler can change the result even with the same seed.
  • A seed of -1 always rolls a new random seed.
  • Batch count and batch size generate several images; the seed shown belongs to one of them.

Sources

See all