This commit is contained in:
huchenlei 2024-12-20 09:50:05 -08:00
parent 678ac2ffc9
commit d7da99a138

View File

@ -24,7 +24,7 @@ def log_txt_as_img(wh, xc, size=10):
try:
draw.text((0, 0), lines, fill="black", font=font)
except UnicodeEncodeError:
print("Cant encode string for logging. Skipping.") # noqa: T201
logging.warning("Cant encode string for logging. Skipping.")
txt = np.array(txt).transpose(2, 0, 1) / 127.5 - 1.0
txts.append(txt)