Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Torch Versions in comfy standalone newer than 1.9 maybe causing an install error #10

Open
EricRollei opened this issue Nov 1, 2023 · 4 comments

Comments

@EricRollei
Copy link

In the face_detector.py
line 22

IS_HIGH_VERSION = torch_version.version >= "1.9.0"

gives me the following install error:

File "A:\Comfy_Aug/ComfyUI\custom_nodes\facerestore\facelib\detection\yolov5face\face_detector.py", line 20, in
IS_HIGH_VERSION = tuple(map(int, torch.version.split('+')[0].split('.'))) >= (1, 9, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'dev20230731'

Cannot import A:\Comfy_Aug\ComfyUI\custom_nodes\facerestore module for custom nodes: invalid literal for int() with base 10: 'dev20230731'

@mav-rik
Copy link
Owner

mav-rik commented Nov 1, 2023

@EricRollei #9 must fix it

@EricRollei
Copy link
Author

I'm not on a Mac though? Windows 11, python 3.11.4
Torch 2.1

Can I just comment out the line 22?

@mav-rik
Copy link
Owner

mav-rik commented Nov 1, 2023

@EricRollei that's weird, it works for me. But I am running from WSL2 under Windows 11 (python version 3.8.10). Did you try the latest version with this code?

try:
    version_str = torch.__version__.split('+')[0]
    major, minor, patch = map(int, version_str.split('.'))
    IS_HIGH_VERSION = (major, minor, patch) >= (1, 9, 0)
except ValueError:
    # Handle the case of a development version here
    IS_HIGH_VERSION = False

@EricRollei
Copy link
Author

I saw that there was an update in the Comfy Manager and updated. Somehow things went wrong and my ComfyUI got bricked because of some Tokenizer issue. I had 0.13.3 but it wanted 0.14 or higher and it couldn't be installed. Nothing worked, and I had to restore my ComfyUI from backup. For now I've got the facerestore_cf nodes disabled. I don't know what is different about my install that it won't work but I don't want to break things again trying. The dependency issues are problematic with ComfyUI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants