Unverified Commit 7ffbc252 authored by ScilenceForest's avatar ScilenceForest Committed by GitHub
Browse files

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: default avatarSayak Paul <spsayakpaul@gmail.com>
parent f55f1f7e
...@@ -152,6 +152,7 @@ def log_validation( ...@@ -152,6 +152,7 @@ def log_validation(
guidance_scale=3.5, guidance_scale=3.5,
generator=generator, generator=generator,
).images[0] ).images[0]
image = image.resize((args.resolution, args.resolution))
images.append(image) images.append(image)
image_logs.append( image_logs.append(
{"validation_image": validation_image, "images": images, "validation_prompt": validation_prompt} {"validation_image": validation_image, "images": images, "validation_prompt": validation_prompt}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment