After Layla Miller's parents died in a car accident, she was sent to New York's St. Joan Orphanage. While there, Layla manifested mutant powers, growing horns & breathing fire, frightening & alienating the human orphans. When the delusional Scarlet Witch rewrote reality to make mutants the dominant species (Reality-58163, the "House of M", Layla's parents were resurrected, & a normal-looking Layla now had new powers, enabling her to remember the old world & to restore the memories of others. Dr. Strange(Stephan Strange) has theorized this new power was the Scarlet Witch's subconscious providing a way to reverse her actions. Despite knowing that restoring the conventional Reality-616 would destroy her idyllic new life, Layla unlocked numerous heroes' memories; they confronted the Scarlet Witch, who restored reality to normal but depowered most of Earth's mutants at the same time, an event later dubbed "M-Day."
Layla awoke back in the orphanage, seemingly no longer a mutant, but now aware of probable futures & how to promote one over another. With this foreknowledge, she ran away & approached mutant detective agency X-Factor, concealing her motives, Layla helped them investigate Singularity Investigations & its similarly prescient head, Damian Tryp. He was recreating the mutant-killing Legacy Virus to prevent a future where repowered mutants destroyed humanity (Earth-6124), but Layla's presence proved a random factor Tryp could not anticipate, & X-Factor destroyed Singularity Investigations.
Layla's prescience often unsettled her teammates, especially [[Jamie Madrox Multiple Man, who the 13-year-old Layla claimed was her future husband. Regarding Scarlet Witch's brother Quicksilver as dangerous & generally despising him, Layla tried to arrange his death, but failed because he possessed a small portion of his sister's chaos power, making him unpredictable; depowered by M-Day, he had gained new powers from stolen Terrigen crystals, but he lost these abilities thanks in part to Layla's manipulations.
Tryp's silent partner, the Isolationist (Josef Huber), plotted to slaughter Earth's remaining mutants; aware of Layla, he had Nicole,a robotic simulacrum of a young, depowered mutant, infiltrate X-Factor, its chaotic randomizing generator disrupting Layla's foresight. Nicole tried to murder Layla, but an unhinged Quicksilver rescued her, claiming he did so in hopes of killing Layla himself. Escaping him, Layla warned X-Factor in time to thwart Huber, & lured Nicole into the path of an oncoming train.
Layla foresaw a terrifying future, where she would need to permit herself to be held in a mutant internment camp for the sake of achieving her overall goals. The birth of a new mutant, the first since M-Day, triggered hope that it might be possible to restore mutantkind, & Madrox sent two of his duplicates to gather information from alternate futures where this restoration succeeded. Layla jumped in on one of the time jumps, ending up 80 years ahead in a world where a mutant/human race war had concluded with mutants in camps (Earth-1191). Incarcerated, she & the Madrox duplicate learned that the newborn in their own time had started the war, & Layla slew the duplicate so that his knowledge would be transmitted back to Earth-616. Though displaced from her own time, Layla soon communicated through the timelines to Madrox herself, somehow informing him that their teammate Siryn was pregnant with his child. Escaping the mutant camp, Layla worked with Ruby Summers building a rebellion against the anti-mutant regime. When she was 21, Layla found a means to bring Jamie Madrox to her from Earth-616, though from his perspective less than a year had passed since Layla had been lost in the future.