mirror of
https://github.com/lucidrains/DALLE2-pytorch.git
synced 2025-12-19 17:54:20 +01:00
Fixed variable naming issue (#183)
This commit is contained in:
@@ -346,17 +346,17 @@ class TrainDecoderConfig(BaseModel):
|
|||||||
img_emb_url = data_config.img_embeddings_url
|
img_emb_url = data_config.img_embeddings_url
|
||||||
text_emb_url = data_config.text_embeddings_url
|
text_emb_url = data_config.text_embeddings_url
|
||||||
|
|
||||||
if using_text_encodings:
|
if using_text_embeddings:
|
||||||
# Then we need some way to get the embeddings
|
# Then we need some way to get the embeddings
|
||||||
assert using_clip or exists(text_emb_url), 'If text conditioning, either clip or text_embeddings_url must be provided'
|
assert using_clip or exists(text_emb_url), 'If text conditioning, either clip or text_embeddings_url must be provided'
|
||||||
|
|
||||||
if using_clip:
|
if using_clip:
|
||||||
if using_text_encodings:
|
if using_text_embeddings:
|
||||||
assert not exists(text_emb_url) or not exists(img_emb_url), 'Loaded clip, but also provided text_embeddings_url and img_embeddings_url. This is redundant. Remove the clip model or the text embeddings'
|
assert not exists(text_emb_url) or not exists(img_emb_url), 'Loaded clip, but also provided text_embeddings_url and img_embeddings_url. This is redundant. Remove the clip model or the text embeddings'
|
||||||
else:
|
else:
|
||||||
assert not exists(img_emb_url), 'Loaded clip, but also provided img_embeddings_url. This is redundant. Remove the clip model or the embeddings'
|
assert not exists(img_emb_url), 'Loaded clip, but also provided img_embeddings_url. This is redundant. Remove the clip model or the embeddings'
|
||||||
|
|
||||||
if text_emb_url:
|
if text_emb_url:
|
||||||
assert using_text_encodings, "Text embeddings are being loaded, but text embeddings are not being conditioned on. This will slow down the dataloader for no reason."
|
assert using_text_embeddings, "Text embeddings are being loaded, but text embeddings are not being conditioned on. This will slow down the dataloader for no reason."
|
||||||
|
|
||||||
return values
|
return values
|
||||||
|
|||||||
Reference in New Issue
Block a user