stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: Seed saved from a random roll seems to be wrong

Open Revenger opened this issue 2 years ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

I have confirmed on my end that a seed saved to a file that has a random roll is wrong. Updated photos as accidently put a nsfw one up second image that was a totally different girl, hair colour etc. Initially I couldn't regenerate a friends images and dug deeper and found that the seed saved to the image from a random roll are wrong.

Irrelevant test as sample was off I generated this image a few hours ago so no updates in the meantime since. ![03877-615058593-full body photo of one 29 year old woman, cat ears, pale skin, homeless in a fantasy land, upper body, dark hair, detailed skin,](https://user-images.githubusercontent.com/597280/218583581-6ea09783-45bf-49f0-b8f2-7ae15996dbd3.png) ![Screenshot 2023-02-14 055434](https://user-images.githubusercontent.com/597280/218583654-95317b71-f73c-49b3-a0cc-6f4eec6afabd.jpg)

Copied the data meta using Diffusion Toolkit and tried to regenerate the image right now as I type this and got this one below instead. Any attempt using the settings in the above image will just render this bottom one. So it appears the seed that saved from a random roll is bugged.

03891-615058593-full body photo of one 29 year old woman, cat ears, pale skin, homeless in a fantasy land, upper body, dark hair, detailed skin, Screenshot 2023-02-14 060820

I have checked in Diffusion Toolkit and rolled a image from one saved with a static seed its fine.

Steps to reproduce the problem

Render image with a ransom seed Try to recreate same image with the exact same settings prompts and seed

What should have happened?

Same image should have been created but a different one is.

Commit where the problem happens

commit: 3715ece0

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

xformers has no difference
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--reinstall-torch --xformers --reinstall-xformers
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128
git pull

call webui.bat


Other bat I use
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--reinstall-torch
set PYTORCH_CUDA_ALLOC_CONF=garbage_collection_threshold:0.6,max_split_size_mb:128
git pull

call webui.bat

List of extensions

No

Console logs

Not relevant as its image generation

Additional information

Tried between me and another person I couldn't render his images myself from random seed roll that was rendered in the file but his static one worked so I dug deeper and found this bug.

Revenger avatar Feb 13 '23 21:02 Revenger

Well, it doesn't seem to be something that happens all the time at least. I just tried this with a random seed first and then used the seed that was saved in the exif. The image is the same both times. 15735-3269923861-full body photo of one 29 year old woman, cat ears, pale skin, homeless in a fantasy land, upper body, dark hair, detailed skin,

AlUlkesh avatar Feb 13 '23 23:02 AlUlkesh

My sampling method was different whoops. Trying another of a friends images. Still coming up different on that one and nans out for me. Other NFSW without easy negatives were the same. Mby it is just the different GPU's using the exact the same settings.

First image has the meta in it. Its counterfeit 2.5 with their 'easy negative' embed prompt. 00001-549261800 Screenshot 2023-02-14 090415

His first images like above I can't seem to reproduce later ones are fine.

Revenger avatar Feb 14 '23 01:02 Revenger

Well, it doesn't seem to be something that happens all the time at least. I just tried this with a random seed first and then used the seed that was saved in the exif. The image is the same both times. 15735-3269923861-full body photo of one 29 year old woman, cat ears, pale skin, homeless in a fantasy land, upper body, dark hair, detailed skin,

Try same seed as mine and see what you get as it could be different hardware causing it now we ruled out seed stuff as my report is kinda invalid now,

Revenger avatar Feb 14 '23 01:02 Revenger

Found one of his that makes no sense similar but very different same settings, settings the same model crc's the same. Had to censor, bottom is mine top is his, my seed is his bottom right rendered seed. Both images done only a few hours apart. Tell me what version you get.

image Screenshot 2023-02-14 094843

Revenger avatar Feb 14 '23 02:02 Revenger

you're running the web-ui in two different browsers are you perhaps using two different computers different GPUs are known to produce different results

w-e-w avatar Feb 14 '23 02:02 w-e-w

you're running the web-ui in two different browsers are you perhaps using two different computers different GPUs are known to produce different results

Two people I was helping someone on discord set it up when I tested what they did and some stuff came out the same a few others were different.

Revenger avatar Feb 14 '23 02:02 Revenger

https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/7809

w-e-w avatar Feb 14 '23 03:02 w-e-w

image we probably got the solution

MikosDrafle avatar Feb 14 '23 07:02 MikosDrafle

Have you checked other settings like batch size? I tried, it seems that even with the same seed, different batch size will result in different image, even the first image of the batch will be different.

ivangift avatar Feb 18 '23 01:02 ivangift