fix(nodes) paste_image paste mask transparency and img_scale add multiple of#8437
Closed
Neosettler wants to merge 3 commits intoinvoke-ai:mainfrom
Closed
fix(nodes) paste_image paste mask transparency and img_scale add multiple of#8437Neosettler wants to merge 3 commits intoinvoke-ai:mainfrom
Neosettler wants to merge 3 commits intoinvoke-ai:mainfrom
Conversation
fix(nodes): paste_image, paste mask operation doesn't want a black backdrop, black should translate to transparent, the hack here is to used the reference image instead, thus, acting as transparent but it's not. + img_scale, add "multiple of" for convenience
Author
psychedelicious
suggested changes
Aug 18, 2025
Contributor
psychedelicious
left a comment
There was a problem hiding this comment.
Thanks! It looks like this changes the existing node behaviours a bit and therefore is not backwards compatible. Can you please review and ensure the nodes are backwards compatible when the new fields are not set by the user?
|
|
||
| # Create a temporary image to paste the image with transparency | ||
| temp_image = Image.new("RGBA", new_image.size) | ||
| temp_image = new_image |
Contributor
There was a problem hiding this comment.
This seems off. We are assigning new_image to temp_image. They now both refer to the same object. Then we paste image onto temp_image. Finally, we do an alpha composite of new_image and temp_image - so alpha compositing the same image onto itself?
I think I understand the root issue you want to address, but if you can provide some example input images to test with, I'd be better able to review. Ty
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
fix(nodes): paste_image, paste mask operation doesn't want a black backdrop. Black should translate to transparent and the hack here is to used the reference image instead. Thus, acting as transparent but it's technically not. + img_scale, add "multiple of" for convenience
Related Issues / Discussions
QA Instructions
Merge Plan
Checklist
What's Newcopy (if doing a release after this PR)