From 5975e8222b627b186a9cf187291f5a5109733f3f Mon Sep 17 00:00:00 2001 From: Heng Jia <33179480+JiaHeng-DLUT@users.noreply.github.com> Date: Tue, 18 Oct 2022 23:50:59 +0800 Subject: [PATCH] Fix assert message (#253) --- dalle2_pytorch/dalle2_pytorch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dalle2_pytorch/dalle2_pytorch.py b/dalle2_pytorch/dalle2_pytorch.py index 9ab9566..2c17908 100644 --- a/dalle2_pytorch/dalle2_pytorch.py +++ b/dalle2_pytorch/dalle2_pytorch.py @@ -1432,7 +1432,7 @@ class DiffusionPrior(nn.Module): **kwargs ): assert exists(text) ^ exists(text_embed), 'either text or text embedding must be supplied' - assert exists(image) ^ exists(image_embed), 'either text or text embedding must be supplied' + assert exists(image) ^ exists(image_embed), 'either image or image embedding must be supplied' assert not (self.condition_on_text_encodings and (not exists(text_encodings) and not exists(text))), 'text encodings must be present if you specified you wish to condition on it on initialization' if exists(image):