Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dream.py process unexpectedly killed while initializing #342

Closed
adriandersen opened this issue Sep 3, 2022 · 7 comments
Closed

Dream.py process unexpectedly killed while initializing #342

adriandersen opened this issue Sep 3, 2022 · 7 comments

Comments

@adriandersen
Copy link

Describe your environment

  • GPU: cuda
  • VRAM: 8
  • CPU arch: x86
  • OS: Linux (WSL)
  • Python: Anaconda

Describe the bug

* Initializing, be patient...

>> Loading model from models/ldm/stable-diffusion-v1/model.ckpt
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
[1]    9301 killed     python3 scripts/dream.py 
@lstein
Copy link
Collaborator

lstein commented Sep 3, 2022

Is it possible that you are running out of main memory (RAM, not VRAM)? During model loading, the underlying AI library will transiently use up to 9G of RAM before settling down into the 4-5G range.

If you do have sufficient RAM, then try running "ulimit -a" and looking at the "max memory size" setting to see if perhaps it is set to a limited amount.

@adriandersen
Copy link
Author

The VmmemWSL-process seems to use about 6-7 GB of ram before the process is shut down. According to Task Manager in Windows i reach about 85% memory usage, not sure if that is accurate, but if it is it doesnt seem like i run out of memory.

ulimit -a outputs the following information;

-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-m: resident set size (kbytes)      unlimited
-u: processes                       31678
-n: file descriptors                1024
-l: locked-in-memory size (kbytes)  64
-v: address space (kbytes)          unlimited
-x: file locks                      unlimited
-i: pending signals                 31678
-q: bytes in POSIX msg queues       819200
-e: max nice                        0
-r: max rt priority                 0
-N 15:                              unlimited

@tildebyte
Copy link
Contributor

Could be Windows doesn't like WSL using that much RAM that quickly... 🤔

I'm not familiar with how Windows manages WSL RAM usage - it's possible that it's like a "standard" virtual machine, i.e. it has a hard limit on RAM when the environment is created.

@EvanMath
Copy link

EvanMath commented Sep 5, 2022

I have the same issue. Did you solve it?

@gmthedoc
Copy link

gmthedoc commented Sep 6, 2022

I have the usual problem if I try to run the current version on Colab Free and it is the OS killing the process.
I haven't had a chance to try, but in this case increasing the ram reserved for WSL might solve the problem. Here is a guide on how to do it.
I hope it can be useful.

@EvanMath
Copy link

EvanMath commented Sep 6, 2022

I tried it but it didn't work. Ultimately, I installed it on Windows, and ran perfectly!

@artmen1516
Copy link
Contributor

artmen1516 commented Sep 7, 2022

I have the usual problem if I try to run the current version on Colab Free and it is the OS killing the process.

@gmthedoc
My PR with colab improvements and fixes #422 was just merged to development branch,
until development is merged to main, colab shortcut will redirect to previous version, please use this link in the meantime.

https://colab.research.google.com/github/lstein/stable-diffusion/blob/development/Stable_Diffusion_AI_Notebook.ipynb

@lstein lstein closed this as completed Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants