AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: m1 max macbook generate image exception #9214

Open imtiger opened 1 year ago

imtiger commented 1 year ago

Is there an existing issue for this?

What happened?

i use macbook m1 max pro 32g ram .

when i generate the image, the image exception.

WX20230331-144258@2x

WX20230331-144346@2x

Steps to reproduce the problem

1、click generate button

What should have happened?

the generated image should look normal.

Commit where the problem happens

python: 3.10.10  •  torch: 2.1.0.dev20230330  •  xformers: N/A  •  gradio: 3.23.0  •  commit: 955df775  •  checkpoint: a074b8864e

What platforms do you use to access the UI ?

MacOS

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--no-half --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate

List of extensions

ebsynth_utility https://github.com/s9roll7/ebsynth_utility.git 1e91627c (Sun Mar 19 05:20:43 2023) unknown sd-3dmodel-loader https://github.com/jtydhr88/sd-3dmodel-loader.git 6c1afcea (Mon Mar 27 01:27:48 2023) unknown sd-webui-additional-networks https://github.com/kohya-ss/sd-webui-additional-networks.git d2758b6c (Sun Mar 12 10:58:50 2023) unknown sd-webui-controlnet https://github.com/Mikubill/sd-webui-controlnet.git 241c05f8 (Thu Mar 23 15:18:35 2023) unknown sd-webui-llul https://github.com/hnmr293/sd-webui-llul b20337ae (Wed Mar 22 15:56:08 2023) unknown sd-webui-model-converter https://github.com/Akegarasu/sd-webui-model-converter d19e2816 (Sun Mar 26 06:36:49 2023) unknown stable-diffusion-webui-Prompt_Generator https://github.com/imrayya/stable-diffusion-webui-Prompt_Generator 0d4de20f (Fri Mar 17 11:22:15 2023) unknown stable-diffusion-webui-aesthetic-gradients https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients.git 2624e5dd (Fri Jan 6 10:59:30 2023) unknown ultimate-upscale-for-automatic1111 https://github.com/Coyote-A/ultimate-upscale-for-automatic1111 0a3d03a4 (Tue Feb 7 06:07:23 2023) unknown LDSR built-in
Lora built-in
ScuNET built-in
SwinIR built-in
prompt-bracket-checker built-in

Console logs

TigerMAP16:stable-diffusion-webui tiger$ ./webui.sh --no-half

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

################################################################
Running on tiger user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

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

################################################################
Launching launch.py...
################################################################
Python 3.10.10 (main, Feb 16 2023, 02:55:02) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: 955df7751eef11bb7697e2d77f6b8a6226b21e13
Installing requirements for Web UI
current transparent-background 1.2.3

Launching Web UI with arguments: --no-half --skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
No module 'xformers'. Proceeding without it.
/usr/local/lib/python3.10/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
  warnings.warn(
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
[AddNet] Updating model hashes...
0it [00:00, ?it/s]
Loading weights [d01a68ae76] from /Users/tiger/Develop/stable-diffusion/stable-diffusion-webui/models/Stable-diffusion/pastelMixStylizedAnime_pastelMixPrunedFP16.safetensors
Creating model from config: /Users/tiger/Develop/stable-diffusion/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (InvokeAI).
Textual inversion embeddings loaded(0): 
Model loaded in 6.4s (load weights from disk: 0.2s, create model: 0.9s, apply weights to model: 4.7s, move model to device: 0.6s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 11.6s (import torch: 0.6s, import gradio: 0.8s, import ldm: 0.2s, other imports: 0.7s, load scripts: 0.9s, load SD checkpoint: 6.5s, create ui: 1.6s).

Additional information

No response

wangyi12358 commented 1 year ago

Try bash ./webui.sh

ClashSAN commented 1 year ago

also, have a look at this https://github.com/brkirch/stable-diffusion-webui/releases/tag/20230330

imtiger commented 1 year ago

thanks ,老铁, i will try.

imtiger commented 1 year ago

i have solved this issue. webui-macos-env.sh change TORCH_COMMAND to below: export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1"

the reason is the torch2.0 version not supported ,i change version to 1.12.1 ,it works.

katsuhiko34 commented 1 year ago

i have solved this issue. webui-macos-env.sh change TORCH_COMMAND to below: export TORCH_COMMAND="pip install torch==1.12.1 torchvision==0.13.1"

the reason is the torch2.0 version not supported ,i change version to 1.12.1 ,it works.

Hi I am having trouble with the same issue. I didn't get any improvement by doing this, can you suggest some good ideas?