If you accepted an offer things may be more complicated. A contract is a promise to act and complete a transaction. There are often many ways out for a buyer, but it's generally assumed if the seller signs, they want to sell.
Start with your agent and go over your reasons. They may be aware of escape options available to you from within the contract. If they are not helpful, you may want to have your contract looked over by an attorney to see what options you have to cancel it.
If the agent involved represents the buyer and not you, get an attorney.