Comma Within a Comparison
A comma shouldn’t be used within a comparison (unless there is a non-restrictive clause). Writers will sometimes put a comma before a conjunction as this is where speakers will naturally pause for emphasis; when writing, the pause is considered grammatically incorrect.
This box is lighter, than that box.
The comma after lighter should be removed so it does not separate the two items – the boxes – which are being compared.
The box containing the hardcover books is really quite heavy, while the box containing the paperbacks is relatively light.
Hardcover books weigh more, than paperback books.
The box on the table, which contains the hardcover books, is really quite heavy while the box containing the paperbacks is relatively light.
This sentence is correct because the commas are being used around the non-restrictive clause which contains the hardcover books.