mirror of
https://github.com/Stability-AI/generative-models.git
synced 2025-12-20 06:44:22 +01:00
Adapting txt logging for python 3.8
This commit is contained in:
@@ -258,14 +258,10 @@ class DiffusionEngine(pl.LightningModule):
|
|||||||
xc = log_txt_as_img((image_h, image_w), x, size=image_h // 20)
|
xc = log_txt_as_img((image_h, image_w), x, size=image_h // 20)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
elif isinstance(x, Union[List, ListConfig]):
|
elif isinstance(x, (List, ListConfig)):
|
||||||
if isinstance(x[0], str):
|
if isinstance(x[0], str):
|
||||||
# strings
|
# strings
|
||||||
xc = log_txt_as_img((image_h, image_w), x, size=image_h // 20)
|
xc = log_txt_as_img((image_h, image_w), x, size=image_h // 20)
|
||||||
elif isinstance(x[0], Union[ListConfig, List]):
|
|
||||||
# # case: videos processed
|
|
||||||
x = [xx[0] for xx in x]
|
|
||||||
xc = log_txt_as_img((image_h, image_w), x, size=image_h // 20)
|
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user