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

macOS couldn't get it to work.

Open tytanpng opened this issue 2 years ago • 6 comments

Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled WARNING:root:Pytorch pre-release version 1.13.0.dev20220922 - assuming intent to test it 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 Loading weights [e3b0c442] from /Users/kelvintan/Documents/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt Error verifying pickled file from /Users/kelvintan/Documents/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt: Traceback (most recent call last): File "/Users/kelvintan/Documents/stable-diffusion-webui/modules/safe.py", line 76, in check_pt with zipfile.ZipFile(filename) as z: File "/Users/kelvintan/opt/anaconda3/envs/web-ui/lib/python3.10/zipfile.py", line 1267, in init self._RealGetContents() File "/Users/kelvintan/opt/anaconda3/envs/web-ui/lib/python3.10/zipfile.py", line 1334, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/kelvintan/Documents/stable-diffusion-webui/modules/safe.py", line 97, in load check_pt(filename) File "/Users/kelvintan/Documents/stable-diffusion-webui/modules/safe.py", line 89, in check_pt unpickler.load() _pickle.UnpicklingError: invalid load key, 'A'.

-----> !!!! The file is most likely corrupted !!!! <----- You can skip this check with --disable-safe-unpickle commandline argument, but that is not going to help you.

Traceback (most recent call last): File "/Users/kelvintan/Documents/stable-diffusion-webui/webui.py", line 137, in webui() File "/Users/kelvintan/Documents/stable-diffusion-webui/webui.py", line 92, in webui initialize() File "/Users/kelvintan/Documents/stable-diffusion-webui/webui.py", line 85, in initialize shared.sd_model = modules.sd_models.load_model() File "/Users/kelvintan/Documents/stable-diffusion-webui/modules/sd_models.py", line 190, in load_model load_model_weights(sd_model, checkpoint_info) File "/Users/kelvintan/Documents/stable-diffusion-webui/modules/sd_models.py", line 140, in load_model_weights if "global_step" in pl_sd: TypeError: argument of type 'NoneType' is not iterable

Desktop (please complete the following information):

  • OS: macOS Monterey 12.6

tytanpng avatar Oct 15 '22 19:10 tytanpng

I have the same problem OS: macOS Monterey 12.5 MacBook Air (M1, 2020)

kaminion avatar Oct 16 '22 09:10 kaminion

same issue

BaptisteGarcin avatar Oct 16 '22 18:10 BaptisteGarcin

I've added this to run_webui_mac.sh (for one run and commented out afterward)

#pip3 install -r requirements_versions.txt
#pip3 install jsonmerge einops clean-fid resize_right torchdiffeq lark gradio fastapi omegaconf piexif fonts font-roboto pytorch_lightning transformers kornia realesrgan scunet timm
#pip3 install --upgrade git+https://github.com/pytorch/[email protected]

Replace the python web.ui line with this: python webui.py --precision full --no-half --disable-safe-unpickle --use-cpu GFPGAN CodeFormer BSRGAN ESRGAN SCUNet $@

Only issue so far is training is terribly slow.

StableInquest avatar Oct 17 '22 07:10 StableInquest

i'll try that stableinquest. thanks

tytanpng avatar Oct 17 '22 11:10 tytanpng

"BadZipFile" exception comes with the error message "Error verifying pickled file from ~/Documents/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt:", I realized that it's because the weights file is corrupt. I downloaded it on web from Hugging Face, and was asked to accept terms before I can download it. That's probably why the downloading with the script failed. The script and instructions should be updated.

Linked the downloaded file from "~/Documents/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt", and then the web service can be visited fine.

tianbai avatar Oct 19 '22 04:10 tianbai

I tried the fix and it did not work

Ihateyoudattebayo avatar Oct 25 '22 20:10 Ihateyoudattebayo

this is an old issue which is fixed and no longer seems relevant, if this issue is related to future issues, please refer to this previous one.

ClashSAN avatar May 02 '23 17:05 ClashSAN