Skip to content
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

There is a difference between training code and test code #64

Open
Afakash opened this issue Aug 6, 2024 · 0 comments
Open

There is a difference between training code and test code #64

Afakash opened this issue Aug 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Afakash
Copy link

Afakash commented Aug 6, 2024

Describe the bug

Hello, I found that there may be a bug in the BrushNet training code in the example.
[code file: /examples/brushnet/train_brushnet.py ]

Specifically, the white area (value = 1) of the mask generated from the datasets is align with the unmasked area (that is, encoded by VAE into conditional latent as the input of BrushNet branch).

In the test code, the unmasked area is aligned with the black area in the mask (Value=0). Especially in the test code, the white area corresponds to the part that needs to be filled.
[code file: /examples/brushnet/test_brushnet.py ]

In addition, in your paper, the black area is inpainted in Figure 1, while in Figure 3, the white area of ​​the mask is inpainted.

Reproduction

// train code:
masks = torch.nn.functional.interpolate(
batch["masks"],
size=(
latents.shape[-2],
latents.shape[-1]
)
)
// test code:
init_image = init_image * (1-mask_image)

Logs

No response

System Info

cuda: 11.8
torch: 2.3.0

Who can help?

No response

@Afakash Afakash added the bug Something isn't working label Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant