Merge pull request #429 from tsukimiya/hotfix/debug_dataset_linux_support

Refixed --debug_dataset option to work in non-Windows environments
This commit is contained in:
Kohya S
2023-04-22 08:57:06 +09:00
committed by GitHub

View File

@@ -1445,8 +1445,8 @@ def debug_dataset(train_dataset, show_input_ids=False):
im = im[:, :, ::-1] # RGB -> BGR (OpenCV)
if os.name == "nt": # only windows
cv2.imshow("img", im)
k = cv2.waitKey()
cv2.destroyAllWindows()
k = cv2.waitKey()
cv2.destroyAllWindows()
if k == 27 or k == ord("s") or k == ord("e"):
break
steps += 1