I'd say they need to be of comparable size. Each needs to be large enough in comparison to the other, to hold their own if mating gets rough.
I've never heard of cannibalism during mating of Corns which were very different sizes, but that's not to say it isn't a risk. Personally, it's not a risk I'd take. I guess you could try it if you were prepared to "supervise" at all times and not leave the pair unattended while together, so you could separate them in a hurry if necessary. In that instance, it's most important that the female is at optimal breeding size (general rule-of-thumb 300g/3 feet long/3 years old). On the other hand, they may refuse to perform with an audience, so your chances of a successful mating could be lowered.
Having said that, I've known some accidental breedings between very young/small males (10 months was the youngest I've seen quoted) and mature females, that resulted in fertile clutches.