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
56k stars 5.91k forks source link

protobuf package error when starting comfy using auto's venv #417

Closed wyrde closed 1 year ago

wyrde commented 1 year ago

Been receiving this dump the last couple days. venv is auto1111's. No similar error when starting auto1111.

It doesn't seem critical, comfy is running fine with the error. I think.

(base) PS D:\dev\sd.comfy> .\activate.ps1
(venv) (base) PS D:\dev\sd.comfy> python .\main.py
Set vram state to: NORMAL VRAM
Using xformers cross attention
Traceback (most recent call last):
  File "D:\dev\sd.comfy\nodes.py", line 1093, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\dev\sd.comfy\custom_nodes\comfy_controlnet_preprocessors\__init__.py", line 1, in <module>
    from . import canny, hed, midas, mlsd, openpose, uniformer, leres, mp, color, binary, pidinet
  File "D:\dev\sd.comfy\custom_nodes\comfy_controlnet_preprocessors\mp\__init__.py", line 2, in <module>
    import mediapipe as mp
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\__init__.py", line 16, in <module>
    import mediapipe.python.solutions as solutions
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\python\solutions\__init__.py", line 17, in <module>
    import mediapipe.python.solutions.drawing_styles
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\python\solutions\drawing_styles.py", line 20, in <module>
    from mediapipe.python.solutions.drawing_utils import DrawingSpec
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\python\solutions\drawing_utils.py", line 24, in <module>
    from mediapipe.framework.formats import detection_pb2
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\framework\formats\detection_pb2.py", line 16, in <module>
    from mediapipe.framework.formats import location_data_pb2 as mediapipe_dot_framework_dot_formats_dot_location__data__pb2
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\framework\formats\location_data_pb2.py", line 16, in <module>
    from mediapipe.framework.formats.annotation import rasterization_pb2 as mediapipe_dot_framework_dot_formats_dot_annotation_dot_rasterization__pb2
  File "D:\dev\sd.py\venv\lib\site-packages\mediapipe\framework\formats\annotation\rasterization_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "D:\dev\sd.py\venv\lib\site-packages\google\protobuf\descriptor.py", line 561, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Cannot import D:\dev\sd.comfy\custom_nodes\comfy_controlnet_preprocessors module for custom nodes: Descriptors cannot not be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
Traceback (most recent call last):
  File "D:\dev\sd.comfy\nodes.py", line 1093, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1016, in get_code
  File "<frozen importlib._bootstrap_external>", line 1073, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\dev\\sd.comfy\\custom_nodes\\fonts\\__init__.py'

Cannot import D:\dev\sd.comfy\custom_nodes\fonts module for custom nodes: [Errno 2] No such file or directory: 'D:\\dev\\sd.comfy\\custom_nodes\\fonts\\__init__.py'
WAS Node Suite: Running At: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py
WAS Node Suite: Running From: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui
WAS Node Suite: Loaded
Adding extra search path checkpoints d:/dev/models
Adding extra search path vae d:/dev/vae
Adding extra search path vae d:/dev/models/*.vae.*
Adding extra search path loras d:/dev/Lora
Adding extra search path upscale_models d:\dev\upscale
Adding extra search path embeddings d:\dev\embeddings
Starting server

To see the GUI go to: http://127.0.0.1:8188

deactivate venv

(venv) (base) PS D:\dev\sd.comfy> deactivate
(base) PS D:\dev\sd.comfy> python .\main.py
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
    PyTorch 1.13.1+cu117 with CUDA 1107 (you have 1.13.1)
    Python  3.9.13 (you have 3.9.13)
  Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
  Memory-efficient attention, SwiGLU, sparse and more won't be available.
  Set XFORMERS_MORE_DETAILS=1 for more details
Set vram state to: NORMAL VRAM
Using xformers cross attention
No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1'
Traceback (most recent call last):
  File "D:\dev\sd.comfy\nodes.py", line 1093, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 846, in exec_module
  File "<frozen importlib._bootstrap_external>", line 982, in get_code
  File "<frozen importlib._bootstrap_external>", line 1039, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'D:\\dev\\sd.comfy\\custom_nodes\\fonts\\__init__.py'

Cannot import D:\dev\sd.comfy\custom_nodes\fonts module for custom nodes: [Errno 2] No such file or directory: 'D:\\dev\\sd.comfy\\custom_nodes\\fonts\\__init__.py'
WAS Node Suite: Running At: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py
WAS Node Suite: Running From: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui
WAS Node Suite: Loaded
Adding extra search path checkpoints d:/dev/models
Adding extra search path vae d:/dev/vae
Adding extra search path vae d:/dev/models/*.vae.*
Adding extra search path loras d:/dev/Lora
Adding extra search path upscale_models d:\dev\upscale
Adding extra search path embeddings d:\dev\embeddings
Starting server

To see the GUI go to: http://127.0.0.1:8188
wyrde commented 1 year ago

yay!

(venv) (base) PS D:\dev\sd.comfy> python .\main.py
Set vram state to: NORMAL_VRAM
Using xformers cross attention
Failed to auto update `Quality of Life Suit`
QualityOfLifeSuit_Omar92_DIR: D:\dev\sd.comfy\custom_nodes\ComfyUI-QualityOfLifeSuit_Omar92\src\..
WAS Node Suite: Running At: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py
WAS Node Suite: Running From: D:\dev\sd.comfy\custom_nodes\was-node-suite-comfyui
WAS Node Suite: Loaded
Adding extra search path checkpoints d:/dev/models
Adding extra search path vae d:/dev/vae
Adding extra search path vae d:/dev/models/*.vae.*
Adding extra search path loras d:/dev/Lora
Adding extra search path upscale_models d:\dev\upscale
Adding extra search path embeddings d:\dev\embeddings
Starting server

To see the GUI go to: http://127.0.0.1:8188
wyrde commented 1 year ago

oops. looks like this was due to https://github.com/Fannovel16/comfy_controlnet_preprocessors