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

Merge by mask #36

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Merge by mask #36

wants to merge 3 commits into from

Conversation

pjpollot
Copy link

@pjpollot pjpollot commented Sep 27, 2024

Hi @guill

What

I designed a simple node that takes a base image, and a mask selecting a specific area of this image and a batch of images to paste within the former. The image(s) to paste must have the same size as the base image and the mask.

Please take a look at examples/merge-with-mask.json for more details.

workflow screenshot node closeup screenshot

Example

base_image
The base image: a photo of a theater

mask
The mask associated to the based image selecting the screen area

We take two photos as inputs:

image_to_paste_1

and,

image_to_paste_2

And we get the following outputs:

ComfyUI_temp_ayooe_00005_

ComfyUI_temp_ayooe_00006_

Why

For my own inpainting workflow, I only got bad generations when using VAE Decode (for inpainting) as the main component to segment the space.

Therefore, as I wanted to have a something that somewhat mimics the inpaint results with A1111, I implemented this simple node.

I am open to any feedback!

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.

1 participant