ltdrdata / ComfyUI-Impact-Pack

Custom nodes pack for ComfyUI This custom node helps to conveniently enhance images through Detector, Detailer, Upscaler, Pipe, and more.
GNU General Public License v3.0
1.78k stars 165 forks source link

Issue with module `Spandrel` in `Install.py` #638

Closed HaydenReeve closed 3 months ago

HaydenReeve commented 3 months ago

Updating from a previous version of ImpactPack the install.py file fails to execute because of a missing module, spandrel

Dependencies installed via install -r ComfyUI installed to latest commit (https://github.com/comfyanonymous/ComfyUI/tree/605e64f6d3da44235498bf9103d7aab1c95ef211)

Here is the log

[Impact Pack] EXECUTE: [\.\\AppData\\Local\\Programs\\Python\\Python311\\python.exe', 'install.py'] in '.\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\impact_subpack'
req_path: .\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\impact_subpack\requirements.txt
req_path: .\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\impact_subpack\requirements.txt
req_path: .\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\requirements.txt
### ComfyUI-Impact-Pack: Check basic models
Traceback (most recent call last):
  File ".\ComfyUI\nodes.py", line 1890, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File ".\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\__init__.py", line 73, in <module>
    import impact.impact_server  # to load server api
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File ".\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\impact_server.py", line 12, in <module>
    import impact.core as core
  File ".\ComfyUI\custom_nodes\ComfyUI-Impact-Pack\modules\impact\core.py", line 15, in <module>
    import comfy_extras.nodes_upscale_model as model_upscale
  File ".\ComfyUI\comfy_extras\nodes_upscale_model.py", line 3, in <module>
    from spandrel import ModelLoader, ImageModelDescriptor
ModuleNotFoundError: No module named 'spandrel'
HaydenReeve commented 3 months ago

Simple issue it seems, the module used is simply not in the requirements.txt file. I've submitted a PR with the update.

Upon amending the requirements file with the module and running ComfyUI again it launched without issue.

ltdrdata commented 3 months ago

spandrel is a requirement of ComfyUI itself. Therefore, it was omitted from the requirements.txt file for the custom node.

HaydenReeve commented 3 months ago

Oh, I see. I must have made a mistake somewhere along the way, thanks for pointing me in the right direction, I appreciate it. I wonder why it didn't install properly...

Anyway, thank you again.