Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.
https://www.interstice.cloud
GNU General Public License v3.0
6.32k stars 301 forks source link

Connection error on a "Local managed server" running on macbook pro M1 Sonoma 14.4.1. -> the server is missing one or more custom node #1008

Closed brisfan closed 1 month ago

brisfan commented 1 month ago

Hi, I installed krita-ai-diffusion following the readme (Plugin version: 1.21.0) on a mac M1 running on Sonoma 14.4.1. I have a connection error :

Server running - Connection error: Connection established, but the server is missing one or more custom node

Can someone explain to me how to fix it? Excuse me in advance, I need a simple explanation. I don't have a very high level in this field of computing.

On the client log : 2024-07-30 08:11:29,307 INFO Loaded 10 sampler presets from /Users/brisfan/Library/Application Support/krita/pykrita/ai_diffusion/presets/samplers.json 2024-07-30 08:11:29,319 INFO Extension initialized, Version: 1.21.0, Python: 3.10.7 (main, Dec 7 2023, 11:44:20) [Clang 13.0.0 (clang-1300.0.29.30)] 2024-07-30 08:11:29,319 INFO Loading settings from /Users/brisfan/Library/Application Support/krita/ai_diffusion/settings.json 2024-07-30 08:11:29,319 INFO Found server installation v1.21.0 at /Users/brisfan/Library/Application Support/krita/ai_diffusion/server 2024-07-30 08:11:30,496 INFO Starting server with python -su -Xutf8 main.py 2024-07-30 08:11:34,243 INFO Connecting to http://127.0.0.1:8188

On the server log : 2024-07-30 08:11:32,000 INFO Total VRAM 8192 MB, total RAM 8192 MB 2024-07-30 08:11:32,000 INFO pytorch version: 2.3.1 2024-07-30 08:11:32,001 INFO Set vram state to: SHARED 2024-07-30 08:11:32,001 INFO Device: mps 2024-07-30 08:11:32,680 INFO Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --use-split-cross-attention 2024-07-30 08:11:32,700 INFO /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/venv/lib/python3.9/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020 2024-07-30 08:11:32,700 INFO warnings.warn( 2024-07-30 08:11:33,444 INFO [Prompt Server] web root: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/web 2024-07-30 08:11:34,036 INFO [comfyui_controlnet_aux] | INFO -> Using ckpts path: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts 2024-07-30 08:11:34,037 INFO [comfyui_controlnet_aux] | INFO -> Using symlinks: False 2024-07-30 08:11:34,037 INFO [comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider'] 2024-07-30 08:11:34,117 INFO DWPose: Onnxruntime with acceleration providers detected 2024-07-30 08:11:34,197 INFO Traceback (most recent call last): 2024-07-30 08:11:34,197 INFO File "/Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/nodes.py", line 1931, in load_custom_node 2024-07-30 08:11:34,197 INFO module_spec.loader.exec_module(module) 2024-07-30 08:11:34,197 INFO File "", line 850, in exec_module 2024-07-30 08:11:34,197 INFO File "", line 228, in _call_with_frames_removed 2024-07-30 08:11:34,197 INFO File "/Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes/init.py", line 1, in 2024-07-30 08:11:34,197 INFO from . import api, nodes, tile, region, nsfw, translation 2024-07-30 08:11:34,197 INFO File "/Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes/nsfw.py", line 77, in 2024-07-30 08:11:34,197 INFO class CachedModels: 2024-07-30 08:11:34,197 INFO File "/Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes/nsfw.py", line 78, in CachedModels 2024-07-30 08:11:34,197 INFO _instance: WeakRef | None = None 2024-07-30 08:11:34,197 INFO TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' 2024-07-30 08:11:34,197 INFO 2024-07-30 08:11:34,197 INFO Cannot import /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes module for custom nodes: unsupported operand type(s) for |: 'type' and 'NoneType' 2024-07-30 08:11:34,217 INFO 2024-07-30 08:11:34,217 INFO Import times for custom nodes: 2024-07-30 08:11:34,217 INFO 0.0 seconds: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/websocket_image_save.py 2024-07-30 08:11:34,217 INFO 0.0 seconds: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-inpaint-nodes 2024-07-30 08:11:34,217 INFO 0.0 seconds: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus 2024-07-30 08:11:34,217 INFO 0.1 seconds (IMPORT FAILED): /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes 2024-07-30 08:11:34,218 INFO 0.5 seconds: /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui_controlnet_aux 2024-07-30 08:11:34,218 INFO 2024-07-30 08:11:34,236 INFO Starting server 2024-07-30 08:11:34,236 INFO 2024-07-30 08:11:34,236 INFO To see the GUI go to: http://127.0.0.1:8188

Acly commented 1 month ago

This is an issue with Python 3.9, so one way to solve it is to use newer version (like 3.10 or 3.11). I don't know how to do that on Mac though (it needs to be the default so the plugin will pick it up).

Alternatively, try to download latest version of the node: https://github.com/Acly/comfyui-tooling-nodes/archive/refs/heads/main.zip

Extract the contents of the folder into /Users/brisfan/Library/Application Support/krita/ai_diffusion/server/ComfyUI/custom_nodes/comfyui-tooling-nodes

It should overwrite the older version.

brisfan commented 1 month ago

Thank you it works! :-)