ComfyUI
ComfyUI copied to clipboard
cannot launch main.py on Mac
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())
...same here, cannot launch on Mac Silicon M1
Have you tried python main.py?
It seems you just executed without python.
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.
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
If you need one click solution use this script, it will automaticly install all dependencies (Python, Homebrow...etc.) and run ComfyUI
Try our cli tool for mac installation.
pip install comfy-cli
comfy install
https://github.com/Comfy-Org/comfy-cli