The main factors, IMHO, are:
1. Existing company policy
2. How key your current role is
3. How well your current role is documented
4. How well the project is going
5. What commitments you've already made
EXISTING COMPANY POLICY.
In my industry, 30 days notice is minimum for most team members. Key players in projects (such as the project manager) don't get the key role unless they're willing to make a conscious, verbal commitment to stay at least until the projected end of the project. ( Meaning, if the project is expected to last four months, you make a verbal commitment to stay at least those four months. If the project runs behind schedule, that's a different story and you're off the hook. )
HOW KEY YOUR CURRENT ROLE IS
You're going to be the best judge as to how important your current role is, and you should have some understanding as to how long it will take to get someone else up to speed on the specifics of the project (assuming they're able to quickly find someone who has the same skill sets as you). So don't give two weeks notice if you know realistically that two weeks won't be enough to get someone else up to speed.
Since you're playing a major role in the project, it's likely that your mid-project departure will cause the project to slip behind schedule while they find your replacement. People will be terribly unhappy about schedule slippages, considering the costs that are at stake.
HOW WELL YOUR CURRENT ROLE IS DOCUMENTED
A lot also depends on how well documented your role in the project is -- meaning, how much of the project knowledge is just in your head, and how much is recorded accurately and completely in the project documentation?
If you've got a fully documented project, you'll have an easier time exiting because people will be more confident that another warm body can come in and pick things up where you left off.
HOW WELL THE PROJECT IS GOING
If the project is running on time, on schedule, within budget and everyone's feeling confident of success, then you'll have a better chance of leaving with no hard feelings.
If the project is behind schedule, where everyone's overworked, and the budget has been shot to hell, then you're going to be perceived as someone who is abandoning ship. Your departure will be demoralizing to the remaining team members who have to pick up the slack while they look for your replacement.
WHAT COMMITMENTS YOU'VE ALREADY MADE
If you've set expectations about "seeing things through until the end" for example, you're going to be burning a few bridges if you don't live up to those commitments.
You obviously have a sense that your departure is going to create waves, otherwise you wouldn't be asking this question. If your premature departure is going to be received so badly that people will call you "unprofessional" or will likely tag you as "do not rehire" in your personnel file, then you'll have to weigh whether that's worth you starting your schooling *now*.
I get the impression that this is a very visible project within your company or your industry. Contributing to any delays in a highly visible, multi-million dollar project is bad for your career in the long run. Plus once you're gone, people can always scape-goat you as the reason for any future problems that arise, whether or not you're really to blame.
Having said all that, I think the main things to keep in mind are:
a) negotiate with the powers that be as to how much notice you realistically need to give, regardless of what the official policy is.
b) make sure that your role is fully documented, so people feel less panicked about you suddenly leaving.
c) Taking on a part-time contractual role is a good idea *only if* you are able to give the project the attention that it deserves on a part-time basis. I've seen people attempt the juggling act of school and part-time work, and fail miserably. One or both ends up suffering. You have to judge whether or not you can competently handle both.
In my last job, I was recruited by another company while I was in the middle of a project with my old firm. I explained to my prospective employer that I didn't want to leave until I completed the work on my current project. As it turns out, my new employer was willing to wait to hire me because he had the assurance that I wouldn't abandon his projects once I was on board. I gave my previous employer four (4) months notice and had a very clean exit. I know they'll not think twice about re-hiring me.
A final note -- it's unlikely that you just woke up this morning with the sudden, overwhelming urge to go back to school. People don't get accepted to a master's program overnight. So if you've not dropped any hints before now about wanting to go back to school, people may be skeptical about your need to quit so suddenly. You may get some questions about that.