From e7df27ef137e23b996dad6d363cfd41781d15fe3 Mon Sep 17 00:00:00 2001 From: huchenlei Date: Fri, 24 May 2024 18:01:47 -0400 Subject: [PATCH] Remove file --- comfy/types.py | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 comfy/types.py diff --git a/comfy/types.py b/comfy/types.py deleted file mode 100644 index a8a3d29fd..000000000 --- a/comfy/types.py +++ /dev/null @@ -1,32 +0,0 @@ -import torch -from typing import Callable, Protocol, TypedDict, Optional, List - - -class UnetApplyFunction(Protocol): - """Function signature protocol on comfy.model_base.BaseModel.apply_model""" - - def __call__(self, x: torch.Tensor, t: torch.Tensor, **kwargs) -> torch.Tensor: - pass - - -class UnetApplyConds(TypedDict): - """Optional conditions for unet apply function.""" - - c_concat: Optional[torch.Tensor] - c_crossattn: Optional[torch.Tensor] - control: Optional[torch.Tensor] - transformer_options: Optional[dict] - - -class UnetParams(TypedDict): - # Tensor of shape [B, C, H, W] - input: torch.Tensor - # Tensor of shape [B] - timestep: torch.Tensor - c: UnetApplyConds - # List of [0, 1], [0], [1], ... - # 0 means unconditional, 1 means conditional - cond_or_uncond: List[int] - - -UnetWrapperFunction = Callable[[UnetApplyFunction, UnetParams], torch.Tensor]