这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mrjschulte
Copy link
Contributor

This node allow let the user do a quick and simple mix (otherwise known as a dissolve/fade) between two input images.

This node allow let the user do a quick and simple mix (otherwise known as a dissolve/fade) between two input images.
Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

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

About the mixing itself: it's only correct for images with premultiplied alpha. This is a problem because we use straight alpha everywhere.

I think the best solution would be to have a "Separate Alpha" setting like for Resize. Basically, if "Separate Alpha" is checked, we assume that the alpha channel is independent of the color channels. This allows us to use (1 - mix) * input1 + mix * input2 directly if checked. Otherwise, we have to multiply by alpha.

What do you think?

…ng/mix.py

Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
@mrjschulte
Copy link
Contributor Author

I can see your proposal working and being useful in the current Ux for a lot of the chaiNNer workflows out there. I need to look at it from typical user's pov where they don't really want/need to have to deal with anything at that granular of a level besides just getting their chain to run and for the output to be predictable.

Quite the opposite to a more informed, technical and also usually much more complex chain structure where the user would need and want to be aware of premultiplied RGB and other items.

@mrjschulte mrjschulte marked this pull request as draft February 12, 2024 19:45
@mrjschulte
Copy link
Contributor Author

Straight alpha really needs to go :)

@Sopel97
Copy link

Sopel97 commented Aug 21, 2024

How is this basic feature still not included? I was splitting my hair on this yesterday trying out this software. Unbelievable.

@joeyballentine joeyballentine force-pushed the main branch 2 times, most recently from d0e4684 to 5007ca9 Compare October 22, 2025 21:07
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.

3 participants