AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.53k stars 26.45k forks source link

[Bug]: Can't reproduce existing seeds #7773

Closed MikosDrafle closed 1 year ago

MikosDrafle commented 1 year ago

Is there an existing issue for this?

What happened?

A seed I'm trying to reproduce is giving me different results, with the same model, same settings and everything.

Steps to reproduce the problem

  1. Get any model that an image used
  2. Use existing settings for the image
  3. Generate the image
  4. Get a completely different result

What should have happened?

Image should have been reproduced exactly, or at least closely to what it has been before.

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/ea9bd9fc7409109adcd61b897abc2c8881161256

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

No response

Command Line Arguments

--xformers

List of extensions

No

Console logs

venv "C:\Users\Admin\Desktop\stable-diffusion-webui-master\venv\Scripts\Python.exe"
Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
Commit hash: ea9bd9fc7409109adcd61b897abc2c8881161256
Installing requirements for Web UI
[auto-sd-paint-ext] Commit hash: 516f70cbc61aa5085ed9fe5e7818fa2976e01fd8
[auto-sd-paint-ext] Auto-update disabled.

Installing requirements for scikit_learn

Launching Web UI with arguments: --xformers
Error loading script: patch_fixer.py
Traceback (most recent call last):
  File "C:\Users\Admin\Desktop\stable-diffusion-webui-master\modules\scripts.py", line 229, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\Admin\Desktop\stable-diffusion-webui-master\modules\script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Admin\Desktop\stable-diffusion-webui-master\extensions\sd_auto_fix\scripts\patch_fixer.py", line 16, in <module>
    from modules.sd_hijack_inpainting import do_inpainting_hijack, should_hijack_inpainting
ImportError: cannot import name 'should_hijack_inpainting' from 'modules.sd_hijack_inpainting' (C:\Users\Admin\Desktop\stable-diffusion-webui-master\modules\sd_hijack_inpainting.py)

Loading weights [ad2a33c361] from C:\Users\Admin\Desktop\stable-diffusion-webui-master\models\Stable-diffusion\v2-1_768-ema-pruned.ckpt
Creating model from config: C:\Users\Admin\Desktop\stable-diffusion-webui-master\repositories\stable-diffusion-stability-ai\configs\stable-diffusion\v2-inference-v.yaml
LatentDiffusion: Running in v-prediction mode
DiffusionWrapper has 865.91 M params.
Applying xformers cross attention optimization.
Textual inversion embeddings loaded(29): DrD_PNTE768, nartfixer, NegLowRes-2400, NegMutation-100, NegMutation-1000, NegMutation-1100, NegMutation-1200, NegMutation-1300, NegMutation-1400, NegMutation-1500, NegMutation-1600, NegMutation-1700, NegMutation-1800, NegMutation-1900, NegMutation-200, NegMutation-2000, NegMutation-2100, NegMutation-2200, NegMutation-2300, NegMutation-2400, NegMutation-300, NegMutation-400, NegMutation-500, NegMutation-600, NegMutation-700, NegMutation-800, NegMutation-900, nfixer, rzminjourney
Textual inversion embeddings skipped(45): 8bit, amogus, anders-zorn, angus-mcbride-style, animalve3-1500seq, anime-background-style-v2, anime-background-style, anime-boy, anime-girl, ann-1-4-framed, ann-5-8-oldHK, ann-9-12-imaginaries, anya-forger, apex-wingman, apulian-rooster-v0-1, arcane-cyberpunk-random-new, arcane-cyberpunk-random, arcane-face, arcane-style-jv, arcimboldo-style, armando-reveron-style, arq-render, backrooms, bad_prompt, bad_prompt_version2, baldi, beetlejuice-cartoon-style, bonzi-monkey, boris-anderson, cubex, disquieting-muses, dog, doose-realistic, doose-s-realistic-art-style, dr-strange, dtv-pkmn, durer-style, EasyNegative, erwin-olaf-style, fnf-boyfriend, midjourney-style, poolrooms, retropixelart-pinguin, roblox-avatar, scratch-project
Model loaded in 15.0s (load weights from disk: 6.7s, find config: 2.4s, create model: 0.3s, apply weights to model: 1.5s, apply half(): 1.6s, move model to device: 0.9s, load textual inversion embeddings: 1.7s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
auto-sd-paint-ext:WARNING: COMMANDLINE_ARGS does not contain --api, API won't be mounted.
WARNING:auto-sd-paint-ext:COMMANDLINE_ARGS does not contain --api, API won't be mounted.
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:10<00:00,  1.92it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:11<00:00,  1.80it/s]

Additional information

Browser not included in browser list: Opera GX, that's what I'm using.

Image that I tried to reproduce: image portrait of anime girl with blue eyes, macro photo of isometric closeup (crystal:1.3) standing in front of candy gems rainbows candyfloss sky scraper city landscape, brush, expressive, glowing, retro,shiny, rtx, reflections, global illumination, unreal, octane, disco diffusion, bokeh, foggy, atmospheric Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 1919484475, Size: 768x768, Model hash: ad2a33c361, ENSD: 3

What I got: image

MikosDrafle commented 1 year ago

I've been going crazy over trying to reproduce this, any idea why this happens?

AlUlkesh commented 1 year ago

Which model is this? There's no negative prompt?

2u843yt385592yjh commented 1 year ago

Did you change your GPU recently?

MikosDrafle commented 1 year ago
  1. Model: 2.1 768x768
  2. GPU: RTX 2060, unchanged. Should produce the same result? The user who made this has a RTX 3090ti

There's no negative prompt.

AlUlkesh commented 1 year ago

Do you have pngs with the pnginfo included of these? That would make it a lot easier, to see what the difference might be.

MikosDrafle commented 1 year ago

For some reason the original image's PNG info doesn't give the model name.... Odd. We're sure it's the same model.

My PNG info: portrait of anime girl with blue eyes, macro photo of isometric closeup (crystal:1.3) standing in front of candy gems rainbows candyfloss sky scraper city landscape, brush, expressive, glowing, retro,shiny, rtx, reflections, global illumination, unreal, octane, disco diffusion, bokeh, foggy, atmospheric Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 1919484475, Size: 768x768, Model hash: ad2a33c361, Model: v2-1_768-ema-pruned, ENSD: 3

Their PNG info: portrait of anime girl with blue eyes, macro photo of isometric closeup (crystal:1.3) standing in front of candy gems rainbows candyfloss sky scraper city landscape, brush, expressive, glowing, retro,shiny, rtx, reflections, global illumination, unreal, octane, disco diffusion, bokeh, foggy, atmospheric Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 1919484475, Size: 768x768, Model hash: ad2a33c361, ENSD: 3

AlUlkesh commented 1 year ago

Is your ENSD really 3? It's usually either not there or 31337.

MikosDrafle commented 1 year ago

It is. 31337 is usually used to replicate NovelAI generations.

AlUlkesh commented 1 year ago

Ok. I also have a RTX 2060. Let me run some tries...

MikosDrafle commented 1 year ago

I'm thinking about reinstalling the WebUI, but there appears to be a problem at the moment.

AlUlkesh commented 1 year ago

I get the same result as you:

image

MikosDrafle commented 1 year ago

Guess it's a real issue then. Got the same thing after a reinstall.

2u843yt385592yjh commented 1 year ago

LMAO! this is what I get @AlUlkesh You might remember me from this post https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/7686 00254-20230212180822,1919484475

2u843yt385592yjh commented 1 year ago

There is some fucked up shit going on with different graphics cards... I have a 30x series

AlUlkesh commented 1 year ago

Oh man, yes. This is crazy-making.

MikosDrafle commented 1 year ago

The only thing that I'm concerned about this is that the issue severely impacts my image generations.

2u843yt385592yjh commented 1 year ago

@MikosDrafle In my case, I would rather have your results... in fact, we have no way to tell which one is right by just our personal opinion

2u843yt385592yjh commented 1 year ago

The bug seems to function like an ON/OFF switch, something which can only take two values How about its related to fp16 vs fp32? Obviously I have zero knowledge on those

MikosDrafle commented 1 year ago

Probably happens on new installs.

AlUlkesh commented 1 year ago

I tried --no-half and no xformers. Didn't help.

So it really seems to be a RTX 20 vs RTX 30 thing?

2u843yt385592yjh commented 1 year ago

@MikosDrafle No, no, forget about reinstalling. I tried EVERYTHING, reinstalling like 20 times. Also older versions. Plus all settings you can think of, even launch options.

This issue is related to code or GPUs

Again, note that I want to get YOUR results, because from my perspective yours are the better ones.

MikosDrafle commented 1 year ago

@MikosDrafle No, no, forget about reinstalling. I tried EVERYTHING, reinstalling like 20 times. Also older versions. Plus all settings you can think of, even launch options.

This issue is related to code or GPUs

Again, note that I want to get YOUR results, because from my perspective yours are the better ones.

nah mine is fucked image

2u843yt385592yjh commented 1 year ago

I don't think this example prompt we are comparing is a good one. Using this model https://civitai.com/models/4823/deliberate

This is what you would get

Deliberate (4)

VS what I get

image

Again, it's all personal opinion... we cant tell

MikosDrafle commented 1 year ago

Is there any way to fix this or something?

GBaige commented 1 year ago

@MikosDrafle There is no fix other than use the same graphics card and graphics configuration as the user who originally generated the image.

It is already well known that different GPUs may produce different results.

2u843yt385592yjh commented 1 year ago

@MikosDrafle are you using W11? I am, what about you? Maybe W10 has to do with this?

2u843yt385592yjh commented 1 year ago

I don't know what to say... even if a fix hasnt been found yet doesn't mean there isn't one

MikosDrafle commented 1 year ago

i am using W11 actually

MikosDrafle commented 1 year ago

nope not windows, cacoe said he's using that

MikosDrafle commented 1 year ago

Issue will be reopened under a different name.

2u843yt385592yjh commented 1 year ago

Checkout my new post here, found something could be interesting [Bug]: Theory: Hidden special characters are being added to prompts, causing different results for each GPU #7799