12:03 PM PT -- Amanda's attorney, David Esquibias, tells TMZ, "I'm not confirming that Amanda is expecting and because of that it's premature for anyone to speculate about who would have custody of Amanda's unborn child."
Amanda Bynes could have to give up custody when her child is born around 8 months from now ... due to her mental health issues.
Sources close to the situation tell TMZ ... Amanda's about 6 weeks pregnant and currently receiving treatment in a psychiatric facility. While it's a good sign she's getting treatment ... we're told the plan is for Amanda's father and her BF, Paul Michael, to share custody of the baby. BTW, yes she's back with Paul and we're told they're working things out.
The reason Amanda's dad would be planning to share custody is because she remains under a conservatorship run by her parents ... they've taken care of her, and made her legal and medical decisions for years.
Our sources say Amanda does not yet realize she's losing custody. We're also told she did NOT get pregnant in an attempt to get out of her conservatorship -- and nothing is changing with the conservatorship.
Amanda's been wanting a child for some time now, according to our sources, but people around her are worried about the baby's health because Amanda smokes cigarettes.
As we reported ... Amanda announced her pregnancy Tuesday night by posting a pic of the ultrasound, which she's since taken down.