CompVis / stable-diffusion

A latent text-to-image diffusion model
https://ommer-lab.com/research/latent-diffusion-models/
Other
68.33k stars 10.16k forks source link

Is the seed universal? #112

Open vibrantrida opened 2 years ago

vibrantrida commented 2 years ago

Hello, I have an old graphics card (see below) and I am using the exact same 1,4 model from huggingface but for some reason I am getting a different results for the same configuration.

image

prompt: alien monolith on the moon
sampler: k-diffusion
steps: 50
scale: 7
seed: 1344113883

Google Colab (same output on dreamstudio beta) image

Jupyter Lab image

I reported this issue to the author of the notebook I'm using and they said it is a known issue that seed is non-reproducible/not universal because of the way it is currently being generated. https://github.com/FuouM/HidamariDiffusionColab/issues/1

I am hoping that you have any idea how to deal with this as it stands right now any changes to this is guaranteed to make AND break everyone's seed.

patrickvonplaten commented 2 years ago

Note that PyTorch's seed depend on:

vibrantrida commented 2 years ago

Note that PyTorch's seed depend on:

  • PyTorch version
  • CUDA/CuDNN version
  • Whether it's CPU or GPU

Thank you for this information, I made sure to use the exact same PyTorch and CUDA version this time and my local installation of stable diffusion produced an output that is close enough but not exactly the same output as the google colab.


PyTorch: 1.12.1+cu113 CUDA: 11.3

Prompt: kyoto animation beautiful detailed portrait cell shaded 4 k concept art by wlop ilya kuv kuvshinov greg rutkowski pixiv cinematic dramatic atmosphere sharp focus volumetric lighting cinematic lighting studio quality Sampler: k_lms Scale: 7 Steps: 30 Seed: 2494989938

Google Colab/DreamStudio Beta

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+

image

Jupyter Lab

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 516.59       Driver Version: 516.59       CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+

image

breadbrowser commented 2 years ago

try keggle

breadbrowser commented 2 years ago

try anyone of these https://datasciencenotebook.org/

vibrantrida commented 2 years ago

try anyone of these https://datasciencenotebook.org/

I don't know what this have to do with the issue.