Skip to content

comfy install failed under Python 3.14 #328

Description

@fengsi
$ comfy install
╭────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────╮
│ /Users/si/Projects/ComfyUI/.venv/bin/comfy:10 in <module>                                                                                                                             │
│                                                                                                                                                                                       │
│    7 │   │   sys.argv[0] = sys.argv[0][:-11]                                                  ╭──────────── locals ─────────────╮                                                     │
│    8elif sys.argv[0].endswith(".exe"):                                                   │ sys = <module 'sys' (built-in)> │                                                     │
│    9 │   │   sys.argv[0] = sys.argv[0][:-4]                                                   ╰─────────────────────────────────╯                                                     │
│ ❱ 10sys.exit(main())                                                                                                                                                             │
│   11                                                                                                                                                                                  │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/comfy_cli/cmdline.py:35 in main                                                                                         │
│                                                                                                                                                                                       │
│    32                                                                                                                                                                                 │
│    33                                                                                                                                                                                 │
│    34 def main():                                                                                                                                                                     │
│ ❱  35app()                                                                                                                                                                       │
│    36                                                                                                                                                                                 │
│    37                                                                                                                                                                                 │
│    38 class MutuallyExclusiveValidator:                                                                                                                                               │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:325 in __call__                                                                                           │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:308 in __call__                                                                                           │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:347 in get_command                                                                                        │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:329 in get_group                                                                                          │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:474 in get_group_from_info                                                                                │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:466 in get_group_from_info                                                                                │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:570 in get_command_from_info                                                                              │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/main.py:541 in get_params_convertors_ctx_param_name_from_function                                                 │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/typer/utils.py:109 in get_params_from_function                                                                          │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/inspect.py:3312 in signature                                                                        │
│                                                                                                                                                                                       │
│   3309 def signature(obj, *, follow_wrapped=True, globals=None, locals=None, eval_str=False,    ╭─────────────── locals ────────────────╮                                             │
│   3310 │   │   │     annotation_format=Format.VALUE):                                           │ annotation_format = <Format.VALUE: 1> │                                             │
│   3311"""Get a signature object for the passed callable."""eval_str = True              │                                             │
│ ❱ 3312return Signature.from_callable(obj, follow_wrapped=follow_wrapped,                   │    follow_wrapped = True              │                                             │
│   3313 │   │   │   │   │   │   │   │      globals=globals, locals=locals, eval_str=eval_str,    │           globals = None              │                                             │
│   3314 │   │   │   │   │   │   │   │      annotation_format=annotation_format)                  │            locals = None              │                                             │
│   3315                                                                                          ╰───────────────────────────────────────╯                                             │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/inspect.py:3027 in from_callable                                                                    │
│                                                                                                                                                                                       │
│   3024 │   │   │   │   │     follow_wrapped=True, globals=None, locals=None, eval_str=False,    ╭─────────────── locals ────────────────╮                                             │
│   3025 │   │   │   │   │     annotation_format=Format.VALUE):                                   │ annotation_format = <Format.VALUE: 1> │                                             │
│   3026 │   │   """Constructs Signature for the given callable object."""eval_str = True              │                                             │
│ ❱ 3027 │   │   return _signature_from_callable(obj, sigcls=cls,                                 │    follow_wrapped = True              │                                             │
│   3028 │   │   │   │   │   │   │   │   │   │   follow_wrapper_chains=follow_wrapped,            │           globals = None              │                                             │
│   3029 │   │   │   │   │   │   │   │   │   │   globals=globals, locals=locals, eval_str=eval_stlocals = None              │                                             │
│   3030 │   │   │   │   │   │   │   │   │   │   annotation_format=annotation_format)             ╰───────────────────────────────────────╯                                             │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/inspect.py:2502 in _signature_from_callable                                                         │
│                                                                                                                                                                                       │
│   2499if isfunction(obj) or _signature_is_functionlike(obj):                                                                                                                     │
│   2500 │   │   # If it's a pure Python function, or an object that is duck type                                                                                                       │2501 │   │   # of a Python function (Cython functions, for instance), then:                                                                                                         │
│ ❱ 2502 │   │   return _signature_from_function(sigcls, obj,                                                                                                                           │
│   2503 │   │   │   │   │   │   │   │   │   │   skip_bound_arg=skip_bound_arg,                                                                                                         │
│   2504 │   │   │   │   │   │   │   │   │   │   globals=globals, locals=locals, eval_str=eval_st                                                                                       │
│   2505 │   │   │   │   │   │   │   │   │   │   annotation_format=annotation_format)                                                                                                   │
│                                                                                                                                                                                       │
│ ╭───────────────────────────────────────────────────────────────────────────────────── locals ──────────────────────────────────────────────────────────────────────────────────────╮ │
│ │     _get_signature_of = functools.partial(<function _signature_from_callable at 0x101d35b10>, follow_wrapper_chains=True, skip_bound_arg=True, globals=None, locals=None,         │ │
│ │                         sigcls=<class 'inspect.Signature'>, eval_str=True, annotation_format=<Format.VALUE: 1>)                                                                   │ │
│ │     annotation_format = <Format.VALUE: 1>                                                                                                                                         │ │
│ │              eval_str = True                                                                                                                                                      │ │
│ │ follow_wrapper_chains = True                                                                                                                                                      │ │
│ │               globals = None                                                                                                                                                      │ │
│ │                locals = None                                                                                                                                                      │ │
│ │        skip_bound_arg = True                                                                                                                                                      │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/inspect.py:2325 in _signature_from_function                                                         │
│                                                                                                                                                                                       │
│   2322positional = arg_names[:pos_count]                                                                                                                                         │
│   2323keyword_only_count = func_code.co_kwonlyargcount                                                                                                                           │
│   2324keyword_only = arg_names[pos_count:pos_count + keyword_only_count]                                                                                                         │
│ ❱ 2325annotations = get_annotations(func, globals=globals, locals=locals, eval_str=eval_st                                                                                       │
│   2326 │   │   │   │   │   │   │   │     format=annotation_format)                                                                                                                    │
│   2327defaults = func.__defaults__                                                                                                                                               │
│   2328kwdefaults = func.__kwdefaults__                                                                                                                                           │
│                                                                                                                                                                                       │
│ ╭────────────────────────────────────────────────────────────────────────────────── locals ───────────────────────────────────────────────────────────────────────────────────╮       │
│ │  annotation_format = <Format.VALUE: 1>                                                                                                                                      │       │
│ │          arg_names = ('ctx', 'relative_path', 'model_names', 'confirm', 'model_dir', 'available_models', 'to_delete', 'missing_models', 'name', 'model_path', ... +3)       │       │
│ │           eval_str = True                                                                                                                                                   │       │
│ │          func_code = <code object remove at 0x7a4446300, file "/Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/comfy_cli/command/models/models.py", line 333> │       │
│ │            globals = None                                                                                                                                                   │       │
│ │   is_duck_function = False                                                                                                                                                  │       │
│ │       keyword_only = ()                                                                                                                                                     │       │
│ │ keyword_only_count = 0                                                                                                                                                      │       │
│ │             locals = None                                                                                                                                                   │       │
│ │          pos_count = 4                                                                                                                                                      │       │
│ │         positional = ('ctx', 'relative_path', 'model_names', 'confirm')                                                                                                     │       │
│ │      posonly_count = 0                                                                                                                                                      │       │
│ │                  s = None                                                                                                                                                   │       │
│ │     skip_bound_arg = True                                                                                                                                                   │       │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯       │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/annotationlib.py:890 in get_annotations                                                             │
│                                                                                                                                                                                       │
│    887match format:                                                                        ╭─────────── locals ───────────╮                                                      │
│    888 │   │   case Format.VALUE:                                                               │ eval_str = True              │                                                      │
│    889 │   │   │   # For VALUE, we first look at __annotations__                                │   format = <Format.VALUE: 1> │                                                      │
│ ❱  890 │   │   │   ann = _get_dunder_annotations(obj)                                           │  globals = None              │                                                      │
│    891 │   │   │                                                                                │   locals = None              │                                                      │
│    892 │   │   │   # If it's not there, try __annotate__ instead                                ╰──────────────────────────────╯                                                      │893 │   │   │   if ann is None:                                                                                                                                                    │
│                                                                                                                                                                                       │
│ /Users/si/.local/share/uv/python/cpython-3.14.0-macos-aarch64-none/lib/python3.14/annotationlib.py:1059 in _get_dunder_annotations                                                    │
│                                                                                                                                                                                       │
│   1056 │   │   │   # For static types, the descriptor raises AttributeError.                                                                                                          │1057 │   │   │   return None                                                                                                                                                        │
│   1058else:                                                                                                                                                                      │
│ ❱ 1059 │   │   ann = getattr(obj, "__annotations__", None)                                                                                                                            │
│   1060 │   │   if ann is None:                                                                                                                                                        │
│   1061 │   │   │   return None                                                                                                                                                        │
│   1062                                                                                                                                                                                │
│                                                                                                                                                                                       │
│ /Users/si/Projects/ComfyUI/.venv/lib/python3.14/site-packages/comfy_cli/command/models/models.py:342 in __annotate__                                                                  │
│                                                                                                                                                                                       │
│   339 │   │   help="The relative path from the current workspace where the models are stored." ╭── locals ──╮                                                                         │
│   340 │   │   show_default=True,                                                               │ format = 1 │                                                                         │
│   341 │   ),                                                                                   ╰────────────╯                                                                         │
│ ❱ 342model_names: Optional[list[str]] = typer.Option(                                                                                                                            │
│   343 │   │   None,                                                                                                                                                                   │
│   344 │   │   help="List of model filenames to delete, separated by spaces",                                                                                                          │
│   345 │   │   show_default=False,                                                                                                                                                     │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: 'function' object is not subscriptable

I'll be submitting a fix soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions