One of you has to return home to begin the PR paperwork. The other will have to stay behind and wait with the baby, or leave the baby with relatives. It can take the same amount of time as regular PR paperwork. If you are from a VISA exempt country, you could try bringing the baby home with you and then begin the process, but from what I've read from others, having a TRV issued for the baby is likely not going to happen.
Do try to keep in mind, that if one of you has to stay behind with the baby, I hope you have left yourself ample time to fulfill your PR in country responsibility of 730 days, otherwise there is a risk you will loose that PR as well and have to start over.
I have never quite understood why folks would go through all of the things they do to get the PR, and then land and leave again to their originating country. What was the point of getting the PR to begin with if you are just going back to where you came from? And why would you leave and have your baby born out of the country so you can spend yet MORE money sponsoring a child back to a country you apparently didn't want to be in to begin with?
Anyway. Be prepared for some time away from baby for at least one of you.