avatarEdmond Yip

Summary

The web content provides two solutions for MacOS 14 Sonoma users experiencing issues with Stable Diffusion after an OS upgrade.

Abstract

Users of MacOS 14 Sonoma have encountered problems with image generation in Automatic1111's StableDiffusionWebUI following their operating system upgrade. The article outlines two potential fixes for this issue. The first solution involves updating Torch to a specific nightly version and making adjustments to the webui-user.sh script, which should restore proper functionality to the image generation feature. The second solution, presented as an emergency fix, suggests using a command line argument to launch the WebUI with reduced performance but operational capability. The article also encourages readers to follow Generative AI on LinkedIn for the latest AI-related news and insights.

Opinions

  • The author suggests that updating Torch is a preferred solution for resolving the Stable Diffusion issue on MacOS 14 Sonoma.
  • The emergency solution is presented as a temporary workaround that may result in slower performance.
  • The article implies that staying connected with Generative AI on LinkedIn is beneficial for those interested in AI developments and trends.

Stable Diffusion Issue on MacOS 14 Sonoma

Reading this story will provide you with two solutions

Stable Diffusion Issue on MacOS 14 Sonoma

After upgrading to MacOS 14 Sonoma, users have encountered issues with Stable Diffusion. I will provides two solutions to address this problem.

What happen when upgraded to Sonoma

Upon upgrading to the latest MacOS 14 Sonoma, users have experienced difficulties generating images in Automatic1111’s StableDiffusionWebUI. The problem resembles the one discussed in a GitHub issue. Although the WebUI opens successfully but generating images results in numerous error messages.

Python[13813:192227] ANE Evaluation Error = Error Domain=com.apple.appleneuralengine Code=8 "processRequest:model:qos:qIndex:modelStringID:options:error:: ANEProgramProcessRequestDirect() Failed with status=0x16 : statusType=0x9: Program Inference error" UserInfo={NSLocalizedDescription=processRequest:model:qos:qIndex:modelStringID:options:error:: ANEProgramProcessRequestDirect() Failed with status=0x16 : statusType=0x9: Program Inference error}

Solution 1: Update Torch

  1. Update Torch to the latest version using the following command:
pip3 install --upgrade --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu

2. Modify the webui-user.sh as follows:

#!/bin/bash
#########################################################
# Uncomment and change the variables below to your need:#
#########################################################

# Install directory without trailing slash
#install_dir="/home/$(whoami)"

# Name of the subdirectory
#clone_dir="stable-diffusion-webui"

# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate"

# python3 executable
#python_cmd="python3"

# git executable
#export GIT="git"

# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
#venv_dir="venv"

# script to launch to start the app
#export LAUNCH_SCRIPT="launch.py"

# install command for torch
export TORCH_COMMAND="pip install --pre torch==2.2.0.dev20231012 torchvision==0.17.0.dev20231012 --index-url https://download.pytorch.org/whl/nightly/cpu"

# Requirements file to use for stable-diffusion-webui
#export REQS_FILE="requirements_versions.txt"

# Fixed git repos
#export K_DIFFUSION_PACKAGE=""
#export GFPGAN_PACKAGE=""

# Fixed git commits
#export STABLE_DIFFUSION_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""

# Uncomment to enable accelerated launch
#export ACCELERATE="True"

# Uncomment to disable TCMalloc
#export NO_TCMALLOC="True"

###########################################

3. Restart WebUI with this command: ./webui.sh --reinstall-torch

4. It will update your WebUI’s torch version to torch: 2.2.0.dev20231012

After making these changes, the image generation function should work properly.

Solution 2: Emergency Solution

If the above modifications do not work, there is a simple emergency solution. Modify the startup command to: ./webui.sh --half

This allows you to open the UI and generate images, although the speed might be slightly slower than before. It is advisable to use the Torch update method for optimal performance.

This story is published on Generative AI. Connect with us on LinkedIn to get the latest AI stories and insights right in your feed. Let’s shape the future of AI together!

Stable Diffusion
Macos
Torch
Technology
Generative Art
Recommended from ReadMedium