Merge pull request #345 from ghunkins/dev/ghunkins/allow-for-py39

🐍 Remove Python 3.10 Type Hint
This commit is contained in:
Zhongjie Duan
2025-02-26 11:42:19 +08:00
committed by GitHub

View File

@@ -10,7 +10,7 @@
# The above copyright notice and this permission notice shall be included in all # The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software. # copies or substantial portions of the Software.
# ============================================================================== # ==============================================================================
from typing import Dict, Optional, Tuple from typing import Dict, Optional, Tuple, Union, List
import torch, math import torch, math
from torch import nn from torch import nn
from einops import rearrange, repeat from einops import rearrange, repeat
@@ -757,7 +757,7 @@ class StepVideoModel(torch.nn.Module):
norm_elementwise_affine: bool = False, norm_elementwise_affine: bool = False,
norm_eps: float = 1e-6, norm_eps: float = 1e-6,
use_additional_conditions: Optional[bool] = False, use_additional_conditions: Optional[bool] = False,
caption_channels: Optional[int]|list|tuple = [6144, 1024], caption_channels: Optional[Union[int, List, Tuple]] = [6144, 1024],
attention_type: Optional[str] = "torch", attention_type: Optional[str] = "torch",
): ):
super().__init__() super().__init__()