Skip to content

Inpaint changes parts of original image #23

@worldemar

Description

@worldemar

Not sure if it is an issue that could or should be solved.
Inpaint seem to be using image mask to draw-in parts of image that are transparent.
Despite that it changes already painted (non-transparent) parts of image too.

How to reproduce:

  • fill entire image with one color
  • erase a hole that is smaller than 512x512
  • increase selection size to bigger than transparent hole
  • position selection in such a way that it covers entire hole and has all edges on solid color
  • use Inpaint

Expected result:

  • transparent hole is filled with whatever Diffusion has produced
  • parts that were already painted (solid color) are not changed

Observed result:

  • transparent hole is filled with whatever Diffusion has produced
  • solid color parts have very noticeable selection edge etched into it
  • solid color seem to be changed to slightly different hue

While using on regular images repeated Inpaint-s that cover same area seem to change contrast/saturation of previously painted parts.
How to reproduce:

  • resize selection to something small, for example 64x64
  • generate something at center of image
  • resize selection to larger size, for example 128x128
  • inpaint several times while covering entire original 64x64 square

Expected result:

  • transparent parts of image are painted
  • original 64x64 square is not changed

Observed result:

  • over several iterations of Inpaint original square becomes more and more oversharpened and over-saturated

Another easy way to get this result is to Generate anything and then Inpaint many times without changing selection. Doing Inpaint 10 times or so will turn almost any result into colorful noise.

As far as I was able to debug both of those are manifestations of same issue, maybe something to do with masking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions