A simple work flow with three generators.
1 for background
1 per character
1 for a mix of character and background
there is also a mask processor for high-quality application
In no way do I pretend to have an ideal solution to such a problem, but only as one of many possible ones. The process is presented in the most accessible form and does not require additional comments, but if you have any questions, please ask.