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

fix: Inpaint Fixes #4301

Merged
merged 22 commits into from
Aug 28, 2023
Merged

fix: Inpaint Fixes #4301

merged 22 commits into from
Aug 28, 2023

Conversation

StAlKeR7779
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

Description

Fix masked generation with inpaint models

Related Tickets & Documents

Added/updated tests?

  • Yes
  • No

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not working for me. I'm getting an invalid edge error when I try to inpaint:

[2023-08-17 16:25:37,321]::[InvokeAI]::ERROR --> Error while invoking:
Fields are incompatible: cannot connect 38534078-67b2-4b9c-98ee-e05a12be9a19.image to 91895c7f-4169-4a0a-8d45-82927bc72210.mask

On the other hand, I can't reproduce the original issue. When I set denoising strength to 1 I get complete replacement of the masked area, and no change when I set denoising to 0.

@psychedelicious
Copy link
Collaborator

I think @lstein 's issue is unrelated to this PR. I get it also on Canvas, while inpainting. @blessedcoolant ... uhh...

@blessedcoolant
Copy link
Collaborator

I think @lstein 's issue is unrelated to this PR. I get it also on Canvas, while inpainting. @blessedcoolant ... uhh...

That's expected coz I don't know what the goal of the PR is. I just created a new InpaintMask field coz Stalker wanted to test something. If he's entirely replacing the socket, then the graphs need to be updated. Coz the "mask" slot is no longer mask but rather inpaintmask.

@blessedcoolant
Copy link
Collaborator

blessedcoolant commented Aug 26, 2023

  • PR is fully synced with main.
  • Unified Canvas now works with these new stuff.
  • Added Scale Before Processing support to Canvas Text To Image and Image To Image (with SDXL) -- Now supported across all canvas modes.
  • Renamed InpaintMask to DenoiseMask as it is more apt
  • Create Inpaint Mask renamed to Create Denoise Mask
  • Updated the socket fields to reflect the above changes.

Needs a round of testing before we merge.

@hipsterusername @StAlKeR7779 @psychedelicious @Millu @lstein

@blessedcoolant blessedcoolant changed the title Fix masked generation with inpaint models fix: Inpaint Fixes Aug 26, 2023
@hipsterusername
Copy link
Member

Been testing, can't say anything other than - "Wow, somehow we managed to stumble into some wild inpainting improvements in this refactor"

It's pretty awesome

@hipsterusername
Copy link
Member

@lstein Give it a review when you can - we should try to get these things merged in sooner vs later for an RC

@Millu
Copy link
Contributor

Millu commented Aug 27, 2023

Just gave this a test, seems to be working great!

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest code change described below to avoid deprecation warning.

invokeai/backend/stable_diffusion/diffusers_pipeline.py Outdated Show resolved Hide resolved
Co-authored-by: Lincoln Stein <lincoln.stein@gmail.com>
Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hipsterusername hipsterusername merged commit 502570e into main Aug 28, 2023
8 checks passed
@hipsterusername hipsterusername deleted the fix/inpaint_gen branch August 28, 2023 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug]: Inpainting models not producing expected results with denoise strength: 1/denoise start 0 & end 1
6 participants