Comfy-Org / Comfy-Org/ComfyUI

TypeError: type 'Choice' is not subscriptable

Open
#13,350 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

comfy launch --disable-all-custom-nodes

```
Traceback (most recent call last):
File "/home/blah/stuff/comfy-env/bin/comfy", line 5, in
from comfy_cli.__main__ import main
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/__main__.py", line 1, in
from comfy_cli.cmdline import main
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/cmdline.py", line 8, in
import typer
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/__init__.py", line 29, in
from .main import Typer as Typer
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/main.py", line 20, in
from typer._types import TyperChoice
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/_types.py", line 9, in
class TyperChoice(click.Choice[ParamTypeValue]):
~~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: type 'Choice' is not subscriptable
```
it worked fine yesterday.

### Actual Behavior

Cant start comfy. Throws the error and nothing else.

### Steps to Reproduce

`python3 -m venv comfy-env && source comfy-env/bin/activate && comfy launch `

### Debug Logs

```powershell
comfy launch -- --disable-cuda-malloc --use-sage-attention --disable-all-custom-nodes
Traceback (most recent call last):
File "/home/blah/stuff/comfy-env/bin/comfy", line 5, in
from comfy_cli.__main__ import main
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/__main__.py", line 1, in
from comfy_cli.cmdline import main
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/comfy_cli/cmdline.py", line 8, in
import typer
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/__init__.py", line 29, in
from .main import Typer as Typer
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/main.py", line 20, in
from typer._types import TyperChoice
File "/home/blah/stuff/comfy-env/lib/python3.12/site-packages/typer/_types.py", line 9, in
class TyperChoice(click.Choice[ParamTypeValue]):
~~~~~~~~~~~~^^^^^^^^^^^^^^^^
TypeError: type 'Choice' is not subscriptable
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.