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

[Bug]: Python has quit unexpectedly (M1 Pro 16gb)

Open dev-sda1 opened this issue 3 years ago • 4 comments

Is there an existing issue for this?

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

What happened?

Recently downloaded and have been trying to experiment with the model it automatically downloads (v1-5-pruned-emaonly.safetensors), however Python will crash whenever it's about halfway through any iterations specified on the webui.

Steps to reproduce the problem

  1. Run ./webui.sh
  2. Select default model downloaded during install process
  3. Enter prompts
  4. Keep rest of options at default (sampling rate 20, etc)
  5. Click Generate

What should have happened?

Python should not have crashed and images should've generated

Version or Commit where the problem happens

v1.5.1

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

MacOS

What device are you running WebUI on?

CPU

Cross attention optimization

Automatic

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No

List of extensions

No

Console logs

james@fluffbook-pro stable-diffusion-webui-master % ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on james user
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.12 (main, Jul 28 2023, 18:34:01) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Launching Web UI with arguments: --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Loading weights [2720c7a169] from /Users/james/stable-diffusion-webui/models/Stable-diffusion/sonicdiffusion_v3Beta4.safetensors
Creating model from config: /Users/james/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 4.1s (launcher: 0.2s, import torch: 1.6s, import gradio: 0.5s, setup paths: 0.6s, other imports: 0.4s, load scripts: 0.3s, create ui: 0.4s, gradio launch: 0.1s).
DiffusionWrapper has 859.52 M params.
Applying attention optimization: InvokeAI... done.
Model loaded in 5.3s (load weights from disk: 0.4s, create model: 0.5s, apply weights to model: 2.1s, apply half(): 1.5s, move model to device: 0.6s, calculate empty prompt: 0.2s).
Loading weights [6ce0161689] from /Users/james/stable-diffusion-webui/models/Stable-diffusion/v1-5-pruned-emaonly.safetensors
Applying attention optimization: InvokeAI... done.
Weights loaded in 6.4s (load weights from disk: 0.3s, apply weights to model: 4.5s, move model to device: 1.6s).
 55%|██████████████████████████████████████████████████████▍                                            | 11/20 [00:09<00:06,  1.36it/s]/AppleInternal/Library/BuildRoots/d8ee83b8-11b4-11ee-a66d-46d450270006/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Runtimes/MPSRuntime/Operations/GPURegionOps.mm:356: failed assertion `ANE Evaluation Error = Error Domain=com.apple.appleneuralengine Code=3 "processRequest:model:qos:qIndex:modelStringID:options:error:: ANEProgramProcessRequestDirect() Failed with status=0xf : statusType=0x11: Program Inference timeout: timed out" UserInfo={NSLocalizedDescription=processRequest:model:qos:qIndex:modelStringID:options:error:: ANEProgramProcessRequestDirect() Failed with status=0xf : statusType=0x11: Program Inference timeout: timed out}'
./webui.sh: line 254: 39471 Abort trap: 6           "${python_cmd}" "${LAUNCH_SCRIPT}" "$@"
/opt/homebrew/Cellar/[email protected]/3.10.12_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
james@fluffbook-pro stable-diffusion-webui-master % 


### Additional information

_No response_

dev-sda1 avatar Aug 08 '23 20:08 dev-sda1

same error in version: 1.6.0, I'm using safari Version 16.5.2

hoangbossemo avatar Sep 13 '23 00:09 hoangbossemo

Hi, I having the same issue. Did you find a solution for this ? Thanks Sam

smamulasa avatar Sep 30 '23 06:09 smamulasa

Same here. Any news?

RongWroom avatar Oct 11 '23 11:10 RongWroom

Same here. Started happening after I updated to macOS 14. M1 8GB.

What didn't work: Updating XCode to 15.0 Updating Python

What worked (albeit with extremely poor performance compared to before the bug): Launching with --no-half and --lowvram or --medvram or --use-cpu all. Minimal command line setting that works (slowly): --skip-torch-cuda-test --no-half --use-cpu all

UPD: It seems to be unreliable without --no-half. Used to work a few tries ago, now I can't replicate it working. So I'm adding it just in case.

UPD2: Forgot to mention that when I didn't use --no-half, it sometimes threw errors similar to the ones in #11120

Osato28 avatar Oct 23 '23 20:10 Osato28