From The Pistis Sophia, the teachings given by Jesus after his Resurrection and recorded by the apostles.
Bartholomew said: “A man who hath intercourse with a male, what is his vengeance?”
Jesus said, “The measure of the man who hath intercourse with males and of the man with whom he lieth, is the same as that of the blasphemer.*
“When then the time is completed through the sphere, the receivers of Yaldabaoth come after their soul, and he with his forty-and-nine demons taketh vengeance on it eleven years.
“Thereafter they carry it to the fire-rivers and seething pitch-seas, which are full of demons with pigs’ faces. They eat into them and take vengeance on [?] them in the fire-rivers another eleven years.
“Thereafter they carry them into the outer darkness until the day of judgment when the great darkness is judged; and then they will be dissolved and destroyed.”
The blasphemer (and homosexual) is punished by:
Jesus said: “If the time of such an one is completed through the sphere, the receivers of Yaldabaoth come after him and bind him by his tongue to a great demon with a horse’s face; they spend three days travelling round with him in the world, and take vengeance on him.
“Thereafter they lead him into the region of the cold and of the snow, and take vengeance on him there eleven years.
“Thereafter they lead him down into the chaos before Yaldabaoth and his forty-and-nine demons, and every one of his demons taketh vengeance on him another eleven years.
“Thereafter they lead him into the outer darkness until the day when the great ruler with the dragon’s face who encircleth the darkness, shall be judged. And that soul becometh frozen up[?] and destroyed and dissolved.