comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
56.56k stars 5.99k forks source link

After Ventura 13.5 update on MacBook I am getting error #1066

Open ealkanat opened 1 year ago

ealkanat commented 1 year ago

MacBook Pro 16GB i9 AMD Radeon Pro 5500M 4 GB

missing {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids'} 0%| | 0/20 [00:00<?, ?it/s]loc("varianceEps"("(mpsFileLoc): /AppleInternal/Library/BuildRoots/d9889869-120b-11ee-b796-7a03568b17ac/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShadersGraph/mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm":228:0)): error: input types 'tensor<1x1024x1xf16>' and 'tensor<1xf32>' are not broadcast compatible LLVM ERROR: Failed to infer result type(s). zsh: abort PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 python3 main.py --force-fp16 /usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '

I haven't tried before but when I used --force-fp32 I didn't get this error. But the image was rendered like this.

image

ealkanat commented 1 year ago

I am using Automatic 1111 and ComfyUI together. I have shared .venv folder than I deactivate it and it started to work again. Why this happened I have no idea yet :)

PYTORCH_MPS_HIGH_WATERMARK_RATIO=0.0 python3 main.py --force-fp16

image
ealkanat commented 1 year ago

Sorry guys, this error not related Ventura update. So it can be closed.

I activate Virtual Environment Folder (venv) under the Automatic 1111 installation directory and uninstalled the Torch 2.0.1 then I installed nightly version of Tourch.

pip3 uninstall torch
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu

(venv) xxxx@xxxx-MBP stable-diffusion-webui % pip3 uninstall torch
Found existing installation: torch 2.0.1 Uninstalling torch-2.0.1: Would remove: /Users/xxx/ai/stable-diffusion-webui/venv/bin/convert-caffe2-to-onnx /Users/xxx/ai/stable-diffusion-webui/venv/bin/convert-onnx-to-caffe2 /Users/xxx/ai/stable-diffusion-webui/venv/bin/torchrun /Users/xxx/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/functorch/ /Users/xxx/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch-2.0.1.dist-info/ /Users/xxx/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/ /Users/xxx/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torchgen/ Proceed (Y/n)? y Successfully uninstalled torch-2.0.1

MartinTale commented 1 year ago

I'm having the same issue, used to use Automatic1111 but want to try ComfyUI. Getting exactly the same error but running those commands to uninstall and reinstall didn't solve the issue. Any more ideas what i can do? :)

MartinTale commented 1 year ago

Nevermind, it works but I had to change pip3 to pip :)

devd-99 commented 1 year ago

This worked, just needed to uninstall the global torch installation in my case, and reinstall the nightly.