Skip to content

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

@leszekhanusz

Description

@leszekhanusz

Describe the bug

It is my understanding that if we provide strength=1 to the inpainting pipeline, that the model would try to fill the missing parts without taking into account what was in the image before (where the mask is).

It does not appear to be the case and is really apparent when trying to zoomout of a picture.
In that case, the prediction will very often fill this area with white.

Using the following mask (open the image in a new tab to see the white border):

zoomout_mask

I create prediction first by keeping the white border in the init_image, then I create prediction by filling the white border with similar colors (with gimp).

keeping white border:

zoomout_white

Filling white border with gimp:

zoomout_filled

Here is my result with the white border:

white_result

Here is my result with the filled border:

filled_result

It is clear that the model is keeping data about the parts which should be cropped by the mask.

Reproduction

The code I used to generate the grids is here

Add 3 images above named zoomout_mask.png zoomout_white.png zoomout_filled.png in the /tmp/inpainting folder and run the above script.

Logs

No response

System Info

diffusers version: commit 5cbed8e0d157f65d3ddc2420dfd09f2df630e978

Metadata

Metadata

Assignees

Labels

staleIssues that haven't received updates

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions