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

can't run on macOS #2503

Open
danispringer opened this issue Dec 27, 2024 · 8 comments
Open

can't run on macOS #2503

danispringer opened this issue Dec 27, 2024 · 8 comments

Comments

@danispringer
Copy link

I downloaded the main download link listed in the README, opened terminal, navigated to where run.bat is located, typed ./run.bat, pressed enter, and I get:

./run.bat: line 1: @echo: command not found
./run.bat: line 3: call: command not found
./run.bat: line 5: cd: %~dp0webui: No such file or directory
./run.bat: line 6: call: command not found

What am I missing?

thanks

@SvenErik1968
Copy link

Not a Mac user, but maybe try the webui-user.sh file instead, the webui-user.bat is for Windows.

@danispringer
Copy link
Author

I tried a bunch of the files (tried converting some bat files to sh files too) and kept getting errors.

thanks

@danispringer
Copy link
Author

https://github.com/lllyasviel/stable-diffusion-webui-forge/blob/main/webui-user.sh

yes I tried that one too, still get lots of errors, thank you

I'm not sure this repo is compatible with macos altogether

@SvenErik1968
Copy link

I found this thread under Discussion where they are talking about running it on Mac, check out the steps they are talking about there...

@SvenErik1968
Copy link

#849 (comment)

@danispringer
Copy link
Author

@SvenErik1968 thank you, unfortunately it still outputs tons of errors after running all the commands listed in that comment. I would love to hear from a repo owner whether, as far as they know, this project is still expected to work on mac - before trying to troubleshoot.

thank you!

@germyparker
Copy link

Mac user here. I've been using Forge for months, it works ok, but you definitely can't use the windows installation instructions.

I'll give you instructions, but you're entering the world of the command line, which is awesome, but it's easy to get confused, frustrated, and it's very easy to annoy others with repeated simple questions that could be answered with a google search. But we got ChatGPT now, and 99% of problems you run into doing this, ChatGPT can help you solve.

  1. install python, preferably via asdf. Here's a full guide with an explanation for why asdf is important.. You can install asdf via homebrew, alongside git, which you will also need.
# if you don't have homebrew installed already
eval "$(homebrew/bin/brew shellenv)"
brew update --force --quiet
chmod -R go-w "$(brew --prefix)/share/zsh"

# once homebrew is installed, you can install asdf and git
brew install asdf openssl readline sqlite3 xz zlib git
. $(brew --prefix asdf)/asdf.sh

# the following lines make asdf easier to use by adding ito to your "path"
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.zshrc
source ~/.zshrc

# install the python you will need for Forge
asdf plugin add python
asdf install python 3.10.14

  1. In the terminal, navigate to the directory where you want to install Forge:
mkdir -p ~/Documents/sd/forge && cd ~/Documents/sd/forge
  1. Clone the forge repository
git clone https://github.com/lllyasviel/stable-diffusion-webui-forge
  1. set up the python environment so it's tailored to Forge specifically, but doesn't mess with python everywhere else:
export PYTHON=$(which python3.10)
python -m venv venv
source venv/bin/activate
which python 

# "which python" willl show you where the python is located that you're currently using; it should show you the python located in the Forge venv directory.  If it doesn't, you may have to start googling.  This is a very very common process, but there are plenty of spots where things can go wrong.  My advice is, if you're having trouble, use ChatGPT -- explain that you're trying to install a python virtual environment for Stable Diffusion Forge, and then go into detail about what error messages you're seeing, or what isn't happening that you think should be happening. 

# If you're running a M1, M2, M3, or M4 mac, then you may want to add the following to the file "webui-user.sh" in the forge directory:

export COMMANDLINE_ARGS="--skip-torch-cuda-test --upcast-sampling --no-half-vae --use-cpu interrogate --no-half"
  1. run forge and let it install other stuff.
./webui.sh 

This could take a while, since there are a lot of large libraries it requires. In the meantime, go to civitiai and download a model or two that you like. Forge will (I think?) download the default SD model, but it's garbage.

I like fast models, but if you don't care about speed, there are other choices.

I don't really mess with Flux yet. Every time I've tried there were loads of errors due to "Apple Silicon" being pretty different. I'm giving it a few more months for the smartypants to figure out all the issues with running it on a mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants