WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

Image Blend by Mask node should have blending mode input #159

Closed srbustdown closed 1 year ago

srbustdown commented 1 year ago

Image Blend by Mask: I would like to blend two images by a mask with the option of selecting the blending mode as an input i.e. add/multiple/screen/overlay

The inputs should be as follows: Image A Image B Mask Blend Percentage Blend Mode

There might be a better way to do this but I'm not that familiar with alternative methods of image editing using a node based approach.

TLDR: Added a screenshot at the bottom to help visualize the workflow. Ignore the placeholder image and bad mask. Separate foreground and background. Apply a "brightening effect" to foreground and a "darkening effect" to the background to make the "subject" of an image pop more.

The workflow I'm going for is:

  1. Separate the foreground and background using a mask (ControlNet Depth)
  2. Take the Foreground mask that ControlNet Depth provides and invert it to get the background mask.
  3. Connect original image that was fed into ControlNetDepth as input A in the Image Blend by Mask node.
  4. Connect a "brightening image" as input B to Image Blend by Mask node.
  5. Connect the mask given from ControlNet Depth to the mask input Image Blend by Mask node.
  6. Set the percentage based on how much I want to affect the foreground.
  7. Set the blend type based on whatever I want to do to the image like photoshop layers (overlay/multiply/etc) => Blended Image A
  8. Invert the "brightening image" to make a "darkening image" as input B to another Image Blend by Mask node.
  9. Invert the mask given from ControlNet Depth to the mask input Image Blend by Mask node.
  10. Connect original image that was fed into ControlNetDepth as input A in the Image Blend by Mask node.
  11. Set the percentage based on how much I want to affect the foreground.
  12. Set the blend type based on whatever I want to do to the image like photoshop layers (overlay/multiply/etc) => Blended Image B
  13. Take blended image A and Blended Image B and blend them together with a Image Blend node.

Screenshot 2023-08-12 191253 Screenshot 2023-08-12 184949

WASasquatch commented 1 year ago

Just Image Blend with a mode, and Image Blend that.

srbustdown commented 1 year ago

Sorry I don't understand, can you share a screenshot?

WASasquatch commented 1 year ago

If all you are doing is wanting to blend mode or w/e you just blend however, and then blend that.

image Workflow: ComfyUI_00916_

If you want a blending node like that, you're welcome to PR it, but it's not much a concern for me.

srbustdown commented 1 year ago

Thank you, that is exactly the effect I wanted. Sorry I did not know you could combine the image blend by mode and image blend by mask nodes in that way.

WASasquatch commented 1 year ago

I added that idea to my to-do list, I'll add it eventually lol. Would be more simple for straight forward merges that don't need extra post.