Partially based on the film Ugetsu monogatari (1953) ?
i'm just scrawling this out here on a thought, but doesn't it seem that the romance with the dead woman in this film draws heavily from the film Ugetsu monogatari (which itself is based on a japanese story)?
spoiler
in this film towards the end when he goes back to see her, she tells him to forget his family, forget his girlfriend, and stay with her forever..
in the film Ugetsu monogatari, a man meets a noble lady and develops a romance with her, and she also eventually tells him to forget his family and everyone in his old life and to stay with her.. only later he awakes around the rubble of the house he had been staying in with her, only to learn from passers-by that it was a castle that had been burnt down long ago, and the woman had been dead many years- basically he had been under a bewitchment that whole time.
anyway just seemed pretty similar so thought i'd post here to get some thoughts
thanks