mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
fix debug_dataset for controlnet dataset
This commit is contained in:
@@ -1976,7 +1976,7 @@ def debug_dataset(train_dataset, show_input_ids=False):
|
|||||||
if "conditioning_images" in example:
|
if "conditioning_images" in example:
|
||||||
cond_img = example["conditioning_images"][j]
|
cond_img = example["conditioning_images"][j]
|
||||||
print(f"conditioning image size: {cond_img.size()}")
|
print(f"conditioning image size: {cond_img.size()}")
|
||||||
cond_img = (cond_img.numpy() * 255.0).astype(np.uint8)
|
cond_img = ((cond_img.numpy() + 1.0) * 127.5).astype(np.uint8)
|
||||||
cond_img = np.transpose(cond_img, (1, 2, 0))
|
cond_img = np.transpose(cond_img, (1, 2, 0))
|
||||||
cond_img = cond_img[:, :, ::-1]
|
cond_img = cond_img[:, :, ::-1]
|
||||||
if os.name == "nt":
|
if os.name == "nt":
|
||||||
|
|||||||
Reference in New Issue
Block a user