You can apply for GC from within the US. The only time you need to leave for Consular Processing is for the interview, after which you immediately receive your GC. Everyone is saying that the entire GC process needs to be done outside the US but that's wrong. You can have an H1B and apply for GC from within the US without leaving and you only need to leave for the CP interview which is a couple of days max.