Well, the Stones (occasionally), Zeppelin (very rarely) and especially The Who all had moments of humour in their music, but I know what you mean. It certainly wasn't part of their image. Comedy in Beatles music would appear to be a no-brainer since they had such a cheeky image and irreverent attitude (not to mention huge Goon Show fandom), so it's really too bad that we get only subtle glimpses of it in their music, and hardly any of that before the heavy drug days.
Who else did comedy music? Well, of the Beatles' contemporaries you had The Fugs, and ...