aszc-dev / ComfyUI-CoreMLSuite

A set of custom nodes for ComfyUI that allow you to use Core ML models in your ComfyUI workflows.
GNU General Public License v3.0
131 stars 12 forks source link

Chip M3max #41

Open DPWillenborg opened 6 months ago

DPWillenborg commented 6 months ago

Hi, want to ask if any issues are known about working with Apples M3max. My Manager always shows „Import failed“ after installing about ComfyUI Manager. Thanks!

a29paul commented 5 months ago

I'm using an M3 Max aswell. I just downgraded to 3.11 instead of 3.12 for python and it works. Could walk you through the debugging, but I'm just lazy right now.

aszc-dev commented 4 months ago

Hello @DPWillenborg,

Could you confirm if you are still experiencing this issue? If it was related to the Python version, I have lowered the minimum Python version requirement, so most versions should now work. If the issue persists, could you please share the error message from the ComfyUI logs?

Cheers, Adrian

RaHiMu commented 3 months ago

I have similar problem. I can not load it on Python 3.12.4. Must I downgrade to Python 3.11 That is my terminal


Loading Comfy server:

- Added LoRa extension format: .results scikit-learn version 1.5.1 is not supported. Minimum required version: 0.17. Maximum required version: 1.1.2. Disabling scikit-learn conversion API. Torch version 2.5.0.dev20240717 has not been tested with coremltools. You may run into unexpected errors. Torch 2.2.0 is the most recent version that has been tested. Failed to load _MLModelProxy: No module named 'coremltools.libcoremlpython' Fail to import BlobReader from libmilstoragepython. No module named 'coremltools.libmilstoragepython' Fail to import BlobWriter from libmilstoragepython. No module named 'coremltools.libmilstoragepython' Traceback (most recent call last): File "/Users/rafaelhidalgomugica/Applications/ComfyUI/nodes.py", line 1931, in load_custom_node module_spec.loader.exec_module(module) File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/init.py", line 6, in from coreml_suite.nodes import ( File "/Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-CoreMLSuite/coreml_suite/nodes.py", line 4, in from python_coreml_stable_diffusion.coreml_model import CoreMLModel ModuleNotFoundError: No module named 'python_coreml_stable_diffusion'

Cannot import /Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-CoreMLSuite module for custom nodes: No module named 'python_coreml_stable_diffusion'


Trying to fix it on ComfyUI Manager:

FETCH DATA from: /Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-Manager/extension-node-map.json [DONE] FETCH DATA from: /Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/1742899825_extension-node-map.json [DONE] FETCH DATA from: /Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/1514988643_custom-node-list.json [DONE] FETCH DATA from: /Users/rafaelhidalgomugica/Applications/ComfyUI/custom_nodes/ComfyUI-Manager/.cache/746607195_github-stats.json [DONE] Install custom node 'Core ML Suite for ComfyUI' Try fixing: ['https://github.com/aszc-dev/ComfyUI-CoreMLSuite'] Install: pip packages

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'git+https://github.com/apple/ml-stable-diffusion.git']

Collecting git+https://github.com/apple/ml-stable-diffusion.git Cloning https://github.com/apple/ml-stable-diffusion.git to /private/var/folders/9d/49n4_73537x4c0x02_63q_rr0000gn/T/pip-req-build-hv4p9d9o [!] Running command git clone --filter=blob:none --quiet https://github.com/apple/ml-stable-diffusion.git /private/var/folders/9d/49n4_73537x4c0x02_63q_rr0000gn/T/pip-req-build-hv4p9d9o Resolved https://github.com/apple/ml-stable-diffusion.git to commit c891f4357b2269853152d774d97327faab746e7c Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting numpy<1.24 (from python_coreml_stable_diffusion==1.1.0) Using cached numpy-1.23.5.tar.gz (10.7 MB) Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' [!] error: subprocess-exited-with-error [!]
[!] × Getting requirements to build wheel did not run successfully. [!] │ exit code: 1 [!] ╰─> [33 lines of output] [!] Traceback (most recent call last): [!] File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in [!] main() [!] File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main [!] json_out['return_val'] = hook(**hook_input['kwargs']) [!] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [!] File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 112, in get_requires_for_build_wheel [!] backend = _build_backend() [!] ^^^^^^^^^^^^^^^^ [!] File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend [!] obj = import_module(mod_path) [!] ^^^^^^^^^^^^^^^^^^^^^^^ [!] File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module [!] return _bootstrap._gcd_import(name[level:], package, level) [!] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [!] File "", line 1387, in _gcd_import [!] File "", line 1360, in _find_and_load [!] File "", line 1310, in _find_and_load_unlocked [!] File "", line 488, in _call_with_frames_removed [!] File "", line 1387, in _gcd_import [!] File "", line 1360, in _find_and_load [!] File "", line 1331, in _find_and_load_unlocked [!] File "", line 935, in _load_unlocked [!] File "", line 995, in exec_module [!] File "", line 488, in _call_with_frames_removed [!] File "/private/var/folders/9d/49n4_73537x4c0x02_63q_rr0000gn/T/pip-build-env-burdswy3/overlay/lib/python3.12/site-packages/setuptools/init.py", line 16, in [!] import setuptools.version [!] File "/private/var/folders/9d/49n4_73537x4c0x02_63q_rr0000gn/T/pip-build-env-burdswy3/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in [!] import pkg_resources [!] File "/private/var/folders/9d/49n4_73537x4c0x02_63q_rr0000gn/T/pip-build-env-burdswy3/overlay/lib/python3.12/site-packages/pkg_resources/init.py", line 2172, in [!] register_finder(pkgutil.ImpImporter, find_on_path) [!] ^^^^^^^^^^^^^^^^^^^ [!] AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? [!] [end of output] [!]
[!] note: This error originates from a subprocess, and is likely not a problem with pip. [!] error: subprocess-exited-with-error [!] [!] × Getting requirements to build wheel did not run successfully. [!] │ exit code: 1 [!] ╰─> See above for output. [!] [!] note: This error originates from a subprocess, and is likely not a problem with pip. install script failed: https://github.com/aszc-dev/ComfyUI-CoreMLSuite

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'coremltools>=7.1']

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'overrides>=7.1']

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'diffusers>=0.22']

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'peft>=0.6.2']

ComfyUI-Manager: EXECUTE => ['/usr/local/bin/python3', '-m', 'pip', 'install', 'omegaconf>=2.3']

Attempt to fixing '['https://github.com/aszc-dev/ComfyUI-CoreMLSuite']' is done. After restarting ComfyUI, please refresh the browser.