1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Update train_controlnet_flux.py,Fix size mismatch issue in validation (#9679)

Update train_controlnet_flux.py

Fix the problem of inconsistency between size of image and size of validation_image which causes np.stack to report error.

Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
ScilenceForest
2024-11-01 12:45:10 +08:00
committed by GitHub
parent f55f1f7ee5
commit 7ffbc2525f

View File

@@ -152,6 +152,7 @@ def log_validation(
guidance_scale=3.5,
generator=generator,
).images[0]
image = image.resize((args.resolution, args.resolution))
images.append(image)
image_logs.append(
{"validation_image": validation_image, "images": images, "validation_prompt": validation_prompt}