mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
fixed import error
I had an ImportError: cannot import name 'Protocol' from 'typing' while trying to update so I fixed it to start an app
This commit is contained in:
parent
16130c7546
commit
158f7582e1
@ -14,7 +14,12 @@ import torch
|
|||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
from torch.utils.checkpoint import checkpoint
|
from torch.utils.checkpoint import checkpoint
|
||||||
import math
|
import math
|
||||||
from typing import Optional, NamedTuple, Protocol, List
|
|
||||||
|
try:
|
||||||
|
from typing import Optional, NamedTuple, List, Protocol
|
||||||
|
except ImportError:
|
||||||
|
from typing import Optional, NamedTuple, List
|
||||||
|
from typing_extensions import Protocol
|
||||||
|
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|||||||
1
main.py
1
main.py
@ -11,6 +11,7 @@ if os.name == "nt":
|
|||||||
import execution
|
import execution
|
||||||
import server
|
import server
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if '--help' in sys.argv:
|
if '--help' in sys.argv:
|
||||||
print("Valid Command line Arguments:")
|
print("Valid Command line Arguments:")
|
||||||
|
|||||||
BIN
models/controlnet/1.jpg
Normal file
BIN
models/controlnet/1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 205 KiB |
BIN
models/controlnet/example.png
Normal file
BIN
models/controlnet/example.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 MiB |
Loading…
Reference in New Issue
Block a user