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:
edikius 2023-03-05 07:20:04 +01:00
parent 16130c7546
commit 158f7582e1
4 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB