Lever in deep space Can you tell me where my logic goes wrong below?

*

*Lever on Earth: if I drop down mass 2m at distance d from fulcrum a certain amount h (i.e. velocity v and KE mv2), then it will lift mass m at distance 2d from fulcrum a distance of 2h in the same time (i.e. velocity 2v and KE 2mv2).  Let's keep h small wrt d to ignore curvature.  The upward mass m has twice as much velocity and kinetic energy as the downward mass 2m.  The extra kinetic energy of the upward mass is balanced out by its gravitational potential energy.


*Lever in deep space:  Will the same thing happen in deep space?  Will the mass m object keep going at velocity 2v if the lever releases it and doesn't hold on to it?


*Where is all the extra kinetic energy coming from?  Who is providing the potential energy since we are in deep space far from any gravity?


*What if I put mass 2m or 3m instead of mass m at distance 2d (assuming the level is strong enough to handle the stress)?  Will it also get launched at velocity 2v?
I am looking for a big picture answer of what happens at the end of the day.  The details of what happens to the lever atoms and molecules is all well and good but it must explain the final result where all this extra kinetic energy comes from.
P.S.  A similar scenario would be to turn the lever on its side and do the experiment with horizontal movement, effectively making gravity irrelevant.
Closing Comment: After comments exchange with @Allure and @ThePhoton I think I understand what's going on.  In deep space, the initial mass 2m had to arrive with a velocity > v because, as soon as it hit the lever, it started slowing down and had to push itself as well as the lever arm.  For the combined movement to be h the initial KE must have been > mv2.  I didn't do the detailed calculations but I am satisfied that the incoming mass 2m supplied all the kinetic energy, some or all of which was imparted to the departing mass m through the lever.
 A: 
Lever in deep space: Will the same thing happen in deep space? Will the mass m object keep going at velocity 2v if the lever releases it and doesn't hold on to it?

In deep space, the mass of $2m$ does not exert any force on the lever because it has no weight, so nothing happens.
A: 

*

*Lever on Earth: if I drop down mass 2m at distance d from fulcrum a certain amount h (i.e. velocity v and KE mv2), then it will lift mass m at distance 2d from fulcrum a distance of 2h in the same time (i.e. velocity 2v and KE 2mv2).


This is only true if all of the kinetic energy initially in the first mass is transferred to the second mass. This occurs only in a perfectly elastic collision, and then only in this special case where the moments of inertia of the two masses about the fulcrum of the lever are equal.
If the collision is anything but perfectly elastic, the final velocity of the short end of the lever will be less than the initial falling velocity of the first mass (which you have called v)

... Let's keep h small wrt d to ignore curvature. The upward mass m has twice as much velocity

This is only true if the collision of the first mass onto the lever is perfectly inelastic. If the collision is inelastic, then kinetic energy is not conserved --- some of the energy must be converted into shock waves in the surrounding material or used up deforming the colliding objects.
So you can't have both all of the k.e. from the first object being transferred into the second one, and the velocity of the second object being equal to twice the initial velocity of the first object, because one requires a perfectly elastic collision (and nicely balanced masses of the two objects, which you happen to have assumed), and the other requires a perfectly inelastic collision.
In the case of an (ideal or partially) elastic collision, the first mass will bounce back from the lever after striking it, so you must account for it retaining some kinetic energy after the collision.
In all cases (ideal elastic, partially elastic or ideally inelastic) angular momentum will be conserved. You will use conservation of momentum and whatever you assume about the elasticity of the collision to set up the equations to find the final velocities of the two masses.

Will the same thing happen in deep space? Will the mass m object keep going at velocity 2v if the lever releases it and doesn't hold on to it?

Again this depends on whether the collision of the first object onto the lever is perfectly elastic, perfectly inelastic, or somewhere in between. The maximum final velocity of the second object is if the collision is perfectly elastic. The minimum final velocity of the second object occurs if the collision is perfectly inelastic. Any other final velocity between those values is also possible.



*Where is all the extra kinetic energy coming from?


There is no extra kinetic energy. The final kinetic energy of the second mass will be equal or less than the initial kinetic energy of the first mass.
This is true regardless of whether this happens in a gravitational field or not. We can assume the collision between the first mass and the lever happens in an instant, and that there is no time for the force of gravity to affect the velocities of the objects or the lever in the instant after the collision.
