If you can manage to have it deep cleaned, and bring it back to a "good looking" carpet, then I'd do that, and offer the 'replacement' with a selections board. But it doesn't sound, from your description, like you can do that.
So, rather than offering a selections board, just bite the bullet and replace the carpeting with something neutral (not too light, because the showing traffic will damage it, and not too dark) that won't show too much dirt.
A clean line, low profile berber would be good (or whatever is currently popular in your region). It should be quality carpeting, and professionally installed. While there's a temptation here to "cheap out"... resist that temptation, people can tell quality, and poor installation, and that will only hurt your ability to sell.
It almost always makes sense to replace the carpet before you list your house. The only time I would recommend doing it later would be if you have pets or small children who you think may damage the carpet during the time the house is on the market. If that is the case, I would advise getting a written estimate and offering a carpet allowance for what the new carpet would cost. Then if the Buyers want to upgrade, chose their own colors, etc. that is up to them to do.
One side note is that if you are offering a carpet allowance and photos of the house do not show the carpet to appear stained, worn, or some outrageous color, then I would not put "carpet allowance" all over the public listings as it may make potential Buyers feel it is in really bad shape before they even arrive. It is something that can be shared in the Realtor remarks as well as your property marketing brochure that your Realtor should prepare for your home.
Hope this helps a little. Please feel free to let me know if you would like the recommendation for a good carpet contractor in the area as well.
From a buyers perspective, as long as I see the home well kept and the carpet is clean- I would go for a "carpet allowance" or have it installed before settlement.
But if it has too many stains and dirty, it will not show very well.
I find the better the home is presented and staged the faster you'll have an offer. Buyer's will see the carpet and many will not be able to get past the "it needs replacing" attidude. If you do decide to replace it go with carpet that is similar to what is there now. NO huge upgrades, you won't recoup your $$. This market is demanding. If you would like a free check list for listing your property email me and I'll send you a PDF file.