Skip to content

Conversation

@leszekhanusz
Copy link
Contributor

Applying @nagolinc proposition in #261 to the inpainting pipeline.

Should fix #261

This modification allows to do outpainting without having a white border.

@leszekhanusz leszekhanusz mentioned this pull request Sep 11, 2022
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@patil-suraj
Copy link
Contributor

Thanks a lot for the PR! Do you have a colab with some examples with which we can verify this ?

@leszekhanusz
Copy link
Contributor Author

Thanks a lot for the PR! Do you have a colab with some examples with which we can verify this ?

I don't have a colab but it's easy to see it with diffusionui:

  • Upload any image
  • draw a big zone to inpaint (half bottom of image)
  • inside that zone, paint everything with white
  • set the strength to 1

You'll see a big difference whether the fix is applied or not.

Alternatively you could use the image and mask examples in the issue #261

@patrickvonplaten
Copy link
Contributor

@patil-suraj @anton-l could we check this out maybe? Also related to: #328

@chengyjonathan
Copy link

I was playing around with this change, and I noticed that it would trigger this error more frequently:

if not mask.shape == init_latents.shape:
raise ValueError("The mask and init_image should be the same size!")

Even when I explicitly resize the images like so:

initial_image = init_image["image"].convert("RGB").resize((512, 512))
mask_image = init_image["mask"].convert("RGB").resize((512, 512))

@leszekhanusz
Copy link
Contributor Author

@chengyjonathan could you please give us an example of image and mask which causes your problem?

@chengyjonathan
Copy link

chengyjonathan commented Sep 18, 2022 via email

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Oct 13, 2022
@github-actions github-actions bot closed this Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues that haven't received updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inpainting example is using data from the masked parts with strength 1

5 participants