Skip to content

fix(fluX image validation): convert RGB to BGR for OpenPose images #12090

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/flux-control/train_control_lora_flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ def log_validation(flux_transformer, args, accelerator, weight_dtype, step, is_f

for validation_prompt, validation_image in zip(validation_prompts, validation_images):
validation_image = load_image(validation_image)
# Convert RGB to BGR for OpenPose validation images
validation_image_np = np.array(validation_image)[:, :, ::-1]
validation_image = Image.fromarray(validation_image_np)
# maybe need to inference on 1024 to get a good image
validation_image = validation_image.resize((args.resolution, args.resolution))

Expand Down