mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-21 22:07:07 +08:00
nit
This commit is contained in:
parent
58b9cc0502
commit
902f12e0b7
@ -3,7 +3,7 @@ import copy
|
|||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Callable, Protocol, TypedDict, Optional
|
from typing import Callable, Protocol, TypedDict, Optional, List
|
||||||
|
|
||||||
import comfy.utils
|
import comfy.utils
|
||||||
import comfy.model_management
|
import comfy.model_management
|
||||||
@ -24,10 +24,14 @@ class UnetApplyConds(TypedDict):
|
|||||||
|
|
||||||
|
|
||||||
class UnetParams(TypedDict):
|
class UnetParams(TypedDict):
|
||||||
|
# Tensor of shape [B, C, H, W]
|
||||||
input: torch.Tensor
|
input: torch.Tensor
|
||||||
|
# Tensor of shape [B]
|
||||||
timestep: torch.Tensor
|
timestep: torch.Tensor
|
||||||
c: UnetApplyConds
|
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]
|
UnetWrapperFunction = Callable[[UnetApplyFunction, UnetParams], torch.Tensor]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user