  In quantum thermodynamics, effects of finiteness of the baths have been less
considered. In particular, there is no general theory which focuses on
finiteness of the baths of multiple conserved quantities. Then, we investigate
how the optimal performance of generalized heat engines with multiple conserved
quantities alters in response to the size of the baths. In the context of
general theories of quantum thermodynamics, the size of the baths has been
given in terms of the number of identical copies of a system, which does not
cover even such a natural scaling as the volume. In consideration of the
asymptotic extensivity, we deal with a generic scaling of the baths to
naturally include the volume scaling. Based on it, we derive a bound for the
performance of generalized heat engines reflecting finite-size effects of the
baths, which we call fine-grained generalized Carnot bound. We also construct a
protocol to achieve the optimal performance of the engine given by this bound.
Finally, applying the obtained general theory, we deal with simple examples of
generalized heat engines. As for an example of non-i.i.d.~scaling and multiple
conserved quantities, we investigate a heat engine with two baths composed of
an ideal gas exchanging particles, where the volume scaling is applied. The
result implies that the mass of the particle explicitly affects the performance
of this engine with finite-size baths.
