Deepfakes are often made using generative adversarial networks (GANs), in which two AI models work together to create realistic replicas. One of the models creates the best possible replica of a real image or video, and the other detects whether the replica is fake and, if it is, reports on the differences between it and the original. Deepfakes can also be generated by diffusion models that create images from text prompts.