Skip to content

Inconsistent random transform between source and target image in train_instruct_pix2pix #10697

@Luvata

Description

@Luvata

Describe the bug

Currently, random cropping and random flipping in train_transform of train_instruct_pix2pix.py and train_instruct_pix2pix_sdxl.py are applied independently to the source and target images, which leads to discrepancies.

This inconsistency can cause misalignment between the source and target images (the source could be flipped but not the target, or vice versa)

Reproduction

Following InstructPix2Pix training example, but set resolution to 512 to turn off random cropping. My edit model tends to return symmetric images.

Logs

System Info

0.33.0.dev0

Who can help?

@sayakpaul

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions