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

Web UI container exits with code 137 #64

Closed
Pyroglyph opened this issue Sep 15, 2022 · 10 comments
Closed

Web UI container exits with code 137 #64

Pyroglyph opened this issue Sep 15, 2022 · 10 comments
Labels
awaiting-response Waiting for the issuer to respond bug Something isn't working Stale

Comments

@Pyroglyph
Copy link

Describe the bug
Running the web UI does not work. It hangs on making attention of type 'vanilla' with 512 in_channels for a while and then exits with code 137.

Console output:

[+] Running 1/0
 - Container webui-docker-automatic1111-1  Created                                                                 0.0s
Attaching to webui-docker-automatic1111-1
webui-docker-automatic1111-1  | + /docker/mount.sh
webui-docker-automatic1111-1  | Mounted model.ckpt
webui-docker-automatic1111-1  | Mounted GFPGANv1.3.pth
webui-docker-automatic1111-1  | + python3 -u ../../webui.py --listen --port 7860 --hide-ui-dir-config --medvram --opt-split-attention
webui-docker-automatic1111-1  | Loading model [7460a6fa] from /stable-diffusion-webui/repositories/stable-diffusion/models/ldm/stable-diffusion-v1/model.ckpt
webui-docker-automatic1111-1  | Global Step: 470000
webui-docker-automatic1111-1  | LatentDiffusion: Running in eps-prediction mode
webui-docker-automatic1111-1  | DiffusionWrapper has 859.52 M params.
webui-docker-automatic1111-1  | making attention of type 'vanilla' with 512 in_channels
webui-docker-automatic1111-1  | Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
webui-docker-automatic1111-1  | making attention of type 'vanilla' with 512 in_channels
webui-docker-automatic1111-1 exited with code 137

Steps to Reproduce

  1. Run docker compose --profile download up --build
  2. Run docker compose --profile auto up --build
  3. 2nd command builds container but exits with code 137 after attempting to run

Hardware / Software:

  • OS: Windows 11 Pro (Build 22000)
  • Docker version 20.10.17
  • Docker Desktop version 4.12.0
  • GPU: NVIDIA RTX 3090
@Pyroglyph Pyroglyph added the bug Something isn't working label Sep 15, 2022
@Pyroglyph
Copy link
Author

This also happens when running docker compose --profile hlky up --build

[+] Running 1/1
 - Container webui-docker-hlky-1  Created                                                                          0.1s
Attaching to webui-docker-hlky-1
webui-docker-hlky-1  | + /docker/mount.sh
webui-docker-hlky-1  | Mounted RealESRGAN_x4plus_anime_6B.pth
webui-docker-hlky-1  | Mounted RealESRGAN_x4plus.pth
webui-docker-hlky-1  | Mounted LDSR.ckpt
webui-docker-hlky-1  | Mounted GFPGANv1.3.pth
webui-docker-hlky-1  | + python3 -u scripts/webui.py --outdir /output --ckpt /cache/models/model.ckpt --ldsr-dir /latent-diffusion --inbrowser --optimized-turbo
webui-docker-hlky-1  | Found GFPGAN
webui-docker-hlky-1  | Found RealESRGAN
webui-docker-hlky-1  | Found LDSR
webui-docker-hlky-1  | Loading model from /cache/models/model.ckpt
webui-docker-hlky-1  | Global Step: 470000
webui-docker-hlky-1  | UNet: Running in eps-prediction mode
webui-docker-hlky-1 exited with code 137

@AbdBarho
Copy link
Owner

@Pyroglyph How much ram do you have? 16 with WSL is known to cause problems. can you try the points mentioned at the end?

https://github.com/AbdBarho/stable-diffusion-webui-docker/wiki/FAQ#other-build-errors-on-windows-thanks-to-suddendevelopment-for-reporting

try them one by one see if it works.

@Arvoreen
Copy link

I'm seeing this same issue -- I configured my .wslconfig file to give it 8G

@Pyroglyph
Copy link
Author

Pyroglyph commented Sep 15, 2022

How much ram do you have?

I've got 16GB (was going to upgrade to 32 soon anyway)

can you try the points mentioned at the end?

I've tried most of them and I don't think the others apply.

  • I'm already past that build of Windows
  • I'm already on WSL2
  • I have updated Docker Desktop (and I assume that updates Docker too?)
  • I created a .wslconfig and set the memory to 16GB (although I've never seen it pass 8GB in Task Manager)

It's most likely a memory issue, which I find strange because I can run a local copy of stability-ai/stable-diffusion perfectly fine.

Why would a web UI need to use so much memory?

@AbdBarho
Copy link
Owner

I have seen it take up to 14GB on my machine. You can try the --lowvram cli arg for auto in docker-compose.yaml, maybe it helps. Also increase wsl memory to all available memory and try again.

@JoeMojoJones
Copy link

I've experienced exit error 137 using AUTOMATIC1111-cpu when trying to generate images that are too large.

It appears to be an out-of-memory type error and I've seen it occur as it fills up physical RAM then eats the swap space

@Arvoreen
Copy link

So I tried switching to the full 16G I have in my machine, then it locked up (the entire PC) trying to start the auto UI

@Arvoreen
Copy link

UPDATE: I switched the allocation to 12G -- and it started (and no lock up)

@AbdBarho AbdBarho added the awaiting-response Waiting for the issuer to respond label Sep 16, 2022
@github-actions
Copy link

github-actions bot commented Oct 1, 2022

This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Oct 1, 2022
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as completed Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response Waiting for the issuer to respond bug Something isn't working Stale
Projects
None yet
Development

No branches or pull requests

4 participants