House of M
Layla Miller is first seen as a young mutant girl who lives in Hell’s Kitchen. When she wakes up one morning, she finds everything has changed and is one of a small number of unaffected characters. Layla was instrumental in bringing down the "House of M" by using her ability to restore the memories of superheroes who rebelled and helped restore reality. Dr. Strange suggested that the Scarlet Witch had created Layla as a fail safe to help the heroes in case something went wrong. Contradicting Doctor Strange's theory of her origin, Layla's life prior to the events of House of M has been described: she was a young mutant living in an orphanage where she was picked on by the other orphans. However, Layla was shown to have fabricated a large portion of her experiences at the orphanage in order to facilitate her entry into X-Factor Investigations. The extent of what really occurred is unknown. When asked, Layla has purported to understand how it is that she "knows stuff." However, she claims that if she were to tell anyone, she would be struck down and die on the spot. Since she has proven to be capable of manipulation, the veracity of her contention is in doubt.
After Layla joins X-Factor Investigations, she helps the other team members in various, indirect ways. When an operative of Singularity Investigations tries to murder Rictor, Layla electrocutes him. She then sends his body back to Singularity Investigations with a note that says stay out of Mutant Town. After being taken back to an abusive orphanage, Jamie makes an arrangement that allows her to return at X-Factor where she would be safe. When Cyclops arrives to inform Siryn that her father, Banshee, has died, he pretends not to recognize Layla. Layla has taken steps to deal with Singularity Investigations, a rival investigations firm. When X-Factor have their final showdown with Singularity Investigations, she helps uncover that Guido has been brainwashed by them at some point in his past and rescuing a client. Jamie organizes all X-Factor members to see Doc Samson for psychiatric evaluations, they play chess and she reveals she is willing to make sacrifices for the greater good and that she is herself expendable.
During the Marvel Civil War, Quicksilver makes repeated attempts to enter X-Factor Investigations Headquarters. Each time, however, he is thwarted by Layla, who Quicksilver comes to consider his nemesis. When the rest of the team are discussing their stance in the war, they eventually begin to talk about M-Day. Later it comes to light that she knew the truth about why and how it happened leaving the other members distrustful of her. When the Inhumans come looking for Quicksilver, Layla advises him that Black Bolt isn’t going to kill him during the confrontation and that he should take a small trip to the future to see the outcome of what happens to them. She and Jamie go to the meeting where she reveals to Jamie that she tried to kill Pietro but couldn’t because he escaped and that his actions are meant to happen.
A group made up of ex-mutants by the name of X-Cell, who believes the government had depowered mutants, are hiding in Mutant Town. When Siryn and Monet return from France they bring an ex-mutant called Nicole, which shocks Layla because she didn’t know of her arrival. Layla visits Quicksilver who had restored most of X-Cell's powers. She reveals to Callisto and Marrow that it was he and Wanda Maximoff who caused the Decimation, the government did not depower them, and Pietro has lied. After a failed attempt on Layla's life, Nicole is tripped by Layla and falls in front of a train, which destroys her, revealing she was actually a robot. Around this time she is also offered a place among Nick Fury's Secret Warriors by Daisy Johnson but declines, claiming the mutants will need her more.
Layla goes with one of Jamie's dupes to investigate an alternate future caused by the birth of the mutant messiah. While there, they discover that the mutants are living in internment camps. While in an internment camp, the mutant scanners alternate between detecting Layla as a mutant and detecting Layla as human. They learn from a child version of Bishop that the mutant messiah had caused this world. Layla then proceeds to kill the dupe to send the information back to the original Jamie, leaving her alone and stranded in the future.
Divided We Stand
Despite being trapped in an alternate future, Layla is still seen interacting with Jamie as a figment of his imagination. This figment serves as "stuff Jamie knows deep down", appearing in moments of self-realization, such as when Jamie admitted to himself that he knew about Siryn's pregnancy. It is implied in Layla's final words in the story: 'but not the right stuff' (in response to Jamie's 'I'm Jamie Madrox. I know stuff.'), as well as her 8 days in a trance in the Layla Miller one-shot (after which she whispers the same lines she says to Jamie, 'One of us, One of us') that this 'figment' of Jamie's imagination is actually Layla contacting Jamie to give him some guidance.
The Summers Rebellion
Layla eventually escapes the camp and helps a new mutant called Linqon. After revealing to some people an operation called Operation Purity, which involves every citizen being tested for mutant genes, she goes to Atlantic City and meets up with Cyclops and his daughter Ruby. Together with Ruby, she initiates the Summers Rebellion. Layla is last seen stating that, while she is unsure of the future, she is confident in her ability to "know stuff". Layla finds a way back into the past but is now much older than she was before. She pretends to be a nun and works with John Maddox, a duplicate who settled down to raise a family. When she arrives at John's church, she finds Jamie about to kill himself. She stops him and reveals who she really is, much to his shock. She reveals herself to be a holographic projection and takes Jamie into the alternate future. When Layla and Jaime return to the future, Jamie meets Ruby, who berates Layla for traveling back in time when warned not to. The group is then attacked by Sentinels. After Layla and Jamie argue about how they never came for one another, the two finally give into their emotions and share a kiss. Jamie is awkward about starting a relationship with Layla, feeling she is still a child, though Layla tells him she never really was. Later, Layla, Jamie and Ruby go find a old, frail Doctor Doom, requesting his help in time-travel. Doom reveals he has met Layla before and informs the trio about Doomlocks. They are then attacked by sentinels and saved by Trevor Fitzroy. They bring the frail Doom back to their stronghold in Atlantic City where she gets into an argument with Cyclops about bringing him with them and Trevor Fitzroy's future. Taking Doom to an old lab, he creates a Doomlock and turns on them, bringing forth Cortex, the rogue Madrox dupe. Cortex kills Trevor and Ruby asks Layla if she can bring him back. Layla reveals that her ability isn't to "know stuff" but to bring back the dead. However there are consequences to bringing back a human: the cost of their soul, conscience and morality. When the battle is over and Layla explains what her powers are to Jamie, they are teleported by a Doomlock back in time and Jamie ends up back with X-Factor while Layla is transported back to before she joined up at X-Factor Investigations. She ends up at the orphanage she lived at before M-Day and after talking with her younger self. She sets forth the motions that lead her to joining X-Factor by downloading all her knowledge into her younger version's brain which causes her to passout and give her the ability to "know stuff", Layla then gets up and walks away, contemplating what she did to herself. Crypticly she informs her younger self that while she knows why Doom sent her further back, Jamie will find out in "a couple of years", apparently indicating that much time has elapsed since the current X-Factor series began (since Layla has only been "Knowing Stuff" since after the "House of M" event, prior to this her ablity was to awaken lost memories).
Return to present
Following the disappearance of the Invisible Woman, it is revealed Layla has been living with Dr. Doom in an advisory capacity for a year; awaiting to cross paths with X-Factor while they search for Susan.
During the event's of Second Coming, Bastion assigns Bolivar Trask and his Mutant Response Division to target and kill every member of X-Factor Investigations. Arriving at Dublin Airport, Layla and Shatterstar have come to the aid of Theresa Cassidy, who is now going by the codename Banshee. During the confrontation, Layla uses technology acquired from Dr. Doom to combat the MRD soldiers and point Monet in the right direction to help turn the tide of the battle.
After Monet's encounter with Baron Mordo, Layla has an almost violent encounter with Monet who doesn't trust her since finding out about her partnership with Dr. Doom. After Monet faints from exhaustion, she informs Guido that Wolfsbane has returned and joins the rest of X-Factor on a trip to Las Vegas.
When Guido receives a fatal shot while protecting J. Jonah Jameson, the doctors pronounce him dead. But upon their return to the room he is seen alive with Layla hiding in the closet suggesting she resurrects Guido. Layla speaks to Guido in the hospital and begins to cry. She cryptically tells Guido she'll find a way to get his soul back. Madrox has figured out that Layla has brought Guido (Strong Guy) back from death at the cost of his soul. 
Shatterstar and Layla have a cryptic conversation about what happened between them during their time together at Doctor Doom's castle in Latervia. Shatterstar asks her if she has ever thought about what happened between them. She replies that she has, but she learned not to give in to her impulses, and he should do the same.
During a confrontation with Bloodbath, he stops the fight and tells the team that he can steal souls, but makes the team think why he couldn't take Strong Guy's. After being questioned by her teammates, Layla tells the X-Factor team the truth about reviving Strong Guy at the cost of his soul, before chanting a spell that sends Bloodbath to hell.  She is later sitting in the morgue for days isolating herself from her teammates. Banshee (Siryn) is talking with Wolverine in the background about her behavior. Banshee attempts to console Layla, and Layla tells her to remove her hand or it will end up like Jamie's. (Madrox) Wolverine talks with her. It turns out that Layla has night terrors from her ordeal being stuck in the future, but they are down to once a week. She has also kept Jamie in a cooler of dry ice, and had a third year med student make repairs on the cadaver. Layla also states she doesn't know what she is waiting for. With the exception of Banshee, none of her teammates are talking to her for what she did to/for Guido. Wolverine questions how Layla didn't see Madrox's death coming. There is a flashback (flash-forward since it takes place eighty years in an alternate future.) that shows Layla writing in a journal that described the outcome if Guido was left dead. She thought she could just ignore it but by reviving Guido it was Jamie who paid the price. Layla tells Wolverine that the reason she is even cryptically telling him this is because like him, she knows in her heart she really is alone in the crowd just like Wolverine.  After Jamie is brought back from the dead, an ecstatic Layla states that she knew Jamie would be back and that she's wasted some much time, and gives into her feelings for him. She proceeds to warm up Jamie from his frozen state by seducing him. After their tryst, Layla admits to Jamie that she did revive Guido (Strong Guy) and doesn't want to keep anymore secrets from him. She proceeds to tell him about the changes in X-Factor Investigations during his time way.
Powers and Abilities
Reanimation: Layla has the ability to reanimate dead beings, restoring their consciousness, but not their souls.
The following "powers" are actually the result of her older self's memories being implanted into her head by that same version of her. Not a perfect process, it left gaps in her memory (the "blind spots"), but enabled her to seemingly "predict" the future (and also created a time paradox, wherein she was forced to carry out the actions in her "memory" to ensure she could later go back and implant the memories in her younger self) These faux abilities are:
Layla's powers apparently work on the concept of the Chaos Theory of Quantum Mechanics. In a jaunt through time (80 years into a possible future) she was scanned as both a flat-scan human and also a mutant within seconds of each other. Her only comment to this was "Yeah, it comes and goes."
Quantum Precognition: ability to see paths of causality to their ultimate conclusion, which allows her to alter events to prevent or cause certain occurrences; this gives her a sense of apparent omniscience. All she has to do is do one thing at one end, and it makes things turn out the way they should at the other end. Able to see the true reality. She is even able to view a person's real history at a detailed level. Ability to know very detailed sequences of events that will occur in her immediate area, causing her to say she "knows stuff." Whether her ability extends globally as well is still unknown.
Mental Awakening (formerly): Able to pierce the veil between divergent realities. She can enable others to see this, by clearing their minds in an unknown manner. Ability to restore the memories of individuals affected by changes to reality.
Reality Warp Immunity: Layla was immune to Scarlet Witch's reality warp, retaining memories of regular Earth-616 during the House of M storyline.
Chaos Theory Rebounding: Presumably according to her if she tells anyone what she knows she will be struck down dead on the spot. (If there is any truth to this it would mean that her powers most likely rebound back on to her).
Blind Spots: However, she only sees in the future, not the past, and a few times has exhibited 'blind spots'. Her abilities apparently do not work as well on Quicksilver, due to a chaotic influence, possibly caused by Quicksilver's relation to the Scarlet Witch, or those related to Singularity Investigations (like her brainwashed teammate Strong Guy), especially CEO Damian Tryp, whom she cannot read at all.