Fix assert message (#253)

This commit is contained in:
Heng Jia
2022-10-18 23:50:59 +08:00
committed by GitHub
parent c18c080128
commit 5975e8222b

View File

@@ -1432,7 +1432,7 @@ class DiffusionPrior(nn.Module):
**kwargs **kwargs
): ):
assert exists(text) ^ exists(text_embed), 'either text or text embedding must be supplied' 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' 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): if exists(image):