From 902f12e0b7d6cd38a1612069783bd67f5a973e1a Mon Sep 17 00:00:00 2001 From: huchenlei Date: Mon, 20 May 2024 15:15:44 -0400 Subject: [PATCH] nit --- comfy/model_patcher.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/comfy/model_patcher.py b/comfy/model_patcher.py index 63cc0f881..17d254ae5 100644 --- a/comfy/model_patcher.py +++ b/comfy/model_patcher.py @@ -3,7 +3,7 @@ import copy import inspect import logging import uuid -from typing import Callable, Protocol, TypedDict, Optional +from typing import Callable, Protocol, TypedDict, Optional, List import comfy.utils import comfy.model_management @@ -24,10 +24,14 @@ class UnetApplyConds(TypedDict): class UnetParams(TypedDict): + # Tensor of shape [B, C, H, W] input: torch.Tensor + # Tensor of shape [B] timestep: torch.Tensor c: UnetApplyConds - cond_or_uncond: torch.Tensor + # List of [0, 1], [0], [1], ... + # 0 means unconditional, 1 means conditional + cond_or_uncond: List[int] UnetWrapperFunction = Callable[[UnetApplyFunction, UnetParams], torch.Tensor]