I have both cameras and I reach for the 50D if my subject does not require fantastic AF - i.e. relatively stationary and in good light. Otherwise I reach for the 1DII.
The 50D does produce some amazing files and when printed they look very nice - at the pixel level it is quite noisy though.
The thing for me is that most of my subjects require the AF of the 1DII so I use it far more often. A good IQ shot is not worth having if your subject is out of focus!
Well, I have the 40D and 1D II, and I will say the 40D does produce better results, with better contrast and colour and clearly a bit more detail. It's not a huge difference but it is noticeable. The 40D is noisier surprisingly at low ISO, and a bit better at high ISO with NR turned on. Prints though look great.
However, the AF of the 1D II in servo is far better, and I find unless I'm using fast L primes like the 300L f/2.8L IS, the 40D really struggles badly in AI servo with faster action in general.