The problem is that I have X items of varying weighted values that must go into Y containers. The containers are of differing sizes (e.g. hold differing maximum weights). The to
If you map X to pictures of varying heights; and map Y to columns, then the solution given here should work for you too. It is a worst-fit bin packing solution with pre-sorting and additional item swapping coded in Python with examples.
Sounds like multiple-knapsack to me. From Wikipedia:
If we have n items and m knapsacks with capacities Wi, we get the multiple knapsack problem
EDIT: Sorry, missed the bit about each container needing to be similarly loaded. Still, it smells like multiple-knapsack, albeit with an extra constraint.