Lift ipadapter api input type constraint (#2945)

pull/2952/head
Chenlei Hu 2024-06-04 21:37:51 -04:00 committed by GitHub
parent c91dbe5c3b
commit bb3c2a9bf7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -207,10 +207,10 @@ class ControlNetUnit(BaseModel):
# the base64string will be interpret by torch.load to reconstruct ipadapter
# preprocessor output.
# Currently the option is only accessible in API calls.
ipadapter_input: Optional[List[torch.Tensor]] = None
ipadapter_input: Optional[List[Any]] = None
@validator("ipadapter_input", pre=True)
def parse_ipadapter_input(cls, value) -> Optional[List[torch.Tensor]]:
def parse_ipadapter_input(cls, value) -> Optional[List[Any]]:
if value is None:
return None
if isinstance(value, str):