fix(ip_adapter): add None to types

This commit is contained in:
psychedelicious 2023-09-05 12:30:00 +10:00
parent bd15874cf6
commit 95ecb1a0c1

View File

@ -20,7 +20,7 @@ def is_torch2_available():
@torch.no_grad() @torch.no_grad()
def generate( def generate(
self, self,
prompt: Union[str, List[str]] = None, prompt: Union[str, List[str], None] = None,
image: Union[ image: Union[
torch.FloatTensor, torch.FloatTensor,
PIL.Image.Image, PIL.Image.Image,
@ -28,6 +28,7 @@ def generate(
List[torch.FloatTensor], List[torch.FloatTensor],
List[PIL.Image.Image], List[PIL.Image.Image],
List[np.ndarray], List[np.ndarray],
None,
] = None, ] = None,
height: Optional[int] = None, height: Optional[int] = None,
width: Optional[int] = None, width: Optional[int] = None,