ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

cannot launch main.py on Mac

Open pandora523 opened this issue 2 years ago • 3 comments

and got this error when trying to run main.py

./main.py ./main.py: line 1: import: command not found ./main.py: line 2: import: command not found ./main.py: line 3: import: command not found ./main.py: line 4: import: command not found ./main.py: line 5: import: command not found ./main.py: line 6: import: command not found ./main.py: line 7: import: command not found : command not found ./main.py: line 9: from: command not found ./main.py: line 10: import: command not found : command not found ./main.py: line 14: syntax error near unexpected token "xformers"' '/main.py: line 14: logging.getLogger("xformers").addFilter(lambda record: 'A matching Triton is not available' not in record.getMessage())

pandora523 avatar Jul 09 '23 08:07 pandora523

...same here, cannot launch on Mac Silicon M1

ilustracie avatar Jul 10 '23 07:07 ilustracie

Have you tried python main.py? It seems you just executed without python.

ltdrdata avatar Jul 10 '23 07:07 ltdrdata

I'm on an M2 macbook and had to run the conda instructions, then I did a pip install -f requirements.txt. Finally, I have to run python3 ./main.py to get it to run. Hopefully that helps. Installation on Mac could be a lot easier I think.

pmacom avatar Jul 10 '23 15:07 pmacom

My Mac M1, the same, i fix by :

The First : Uninstall Torch pip uninstall torch

Dependencies Install the dependencies by opening your terminal inside the ComfyUI folder and:

pip install -r requirements.txt

After this you should have everything installed and can proceed to running ComfyUI.

Then, run this command : python main.py --force-fp16

This is picture

image

mmoktl2k8 avatar Aug 03 '23 13:08 mmoktl2k8

If you need one click solution use this script, it will automaticly install all dependencies (Python, Homebrow...etc.) and run ComfyUI

rugovit avatar Mar 26 '24 18:03 rugovit

Try our cli tool for mac installation. pip install comfy-cli comfy install

https://github.com/Comfy-Org/comfy-cli

robinjhuang avatar Jul 03 '24 22:07 robinjhuang