Updated: September 3, 2026 · Docs · Clothoff AI Editorial Team

What is a GAN?

The architecture behind first-generation undress programs and face swaps: how two networks train against each other, and why diffusion took over after 2022.

Definition

What is a GAN in one paragraph?

A GAN (generative adversarial network) is a pair of neural networks trained against each other: a generator produces samples and a discriminator judges whether each sample is real or generated. Introduced by Goodfellow and colleagues on June 10, 2014, GANs powered image synthesis, face swaps and the withdrawn 2019 desktop undressing program before diffusion models displaced them after 2022.

GAN variants that shaped synthetic imagery (checked September 3, 2026)
VariantYearWhat it addedWhere it appeared
Original GAN2014Adversarial training of generator and discriminatorLow-resolution faces and digits; proof of concept
pix2pix (conditional GAN)2016Paired image-to-image translation with a conditioning inputSketch-to-photo tools; the 2019 “DeepNude” pipeline
StyleGAN / StyleGAN22018 / 2019Style-based generator with controllable latent spacePhotoreal synthetic faces; “this person does not exist” demos
Encoder–decoder face swap2017–2018Shared encoder, per-identity decoders, adversarial loss in later versionsDeepFaceLab and similar face-swap toolsets

How does adversarial training work?

The generator starts from random noise and tries to produce an image the discriminator cannot tell from a real training image. The discriminator is trained on both and learns to spot fakes.

Each network’s loss is the other’s gain, so training is a two-player game: as the discriminator improves, the generator is pushed toward more realistic output. Training is unstable and can collapse to a few repeated outputs, a failure called mode collapse.

We propose a new framework for estimating generative models via an adversarial process, in which we simultaneously train two models: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability that a sample came from the training data rather than G.

Goodfellow et al., “Generative Adversarial Networks” (arXiv:1406.2661, 2014), accessed September 3, 2026

Which GANs mattered for undress and face-swap tools?

Conditional GANs such as pix2pix (2016) learn a mapping from an input image to an output image, which is exactly what the 2019 “DeepNude” program did: mask, sketch and render, each stage a pix2pix generator trained on paired examples.

StyleGAN (2018) produced fully synthetic faces of high quality and taught the field to edit images by moving through latent space. Face-swap toolsets used shared-encoder autoencoders and added GAN losses to sharpen the result.

Why did diffusion replace GANs?

GANs need paired or narrowly distributed training data, are hard to train and offer weak text control.

Diffusion models, described in the 2021 latent diffusion paper and released as Stable Diffusion in 2022, train stably on billions of captioned images, follow text prompts and support masks natively through inpainting. By 2023 every undress service we could test had moved to diffusion.

Where are GANs still used?

Discriminators live on as components: adversarial losses sharpen autoencoders inside diffusion pipelines, and GAN-style upscalers such as ESRGAN handle the HD tiers of many image tools. Some real-time face-swap models keep a GAN backbone for speed. In deepfake detection, GAN fingerprints left by upsampling layers remain a classic forensic signal.

Consent and safety

Consent Note

This site is a publisher: it reviews third-party tools and does not create, edit, accept or store images. Docs entries are general information, not legal advice.

Primary sources

Sources

  1. Goodfellow et al., “Generative Adversarial Networks” (2014) — arXiv:1406.2661 via Hugging Face, accessed September 3, 2026.
  2. Isola et al., pix2pix (2016) — arXiv:1611.07004 via Hugging Face, accessed September 3, 2026.
  3. Karras et al., StyleGAN (2018) — arXiv:1812.04948 via Hugging Face, accessed September 3, 2026.
  4. iperov/DeepFaceLab repository (archived 2024) — GitHub, accessed September 3, 2026.
  5. Rombach et al., latent diffusion (2021) — arXiv:2112.10752 via Hugging Face, accessed September 3, 2026.
  6. Rössler et al., FaceForensics++ (2019) — arXiv:1901.08971 via Hugging Face, accessed September 3, 2026.
Frequently asked questions

FAQ

What does “adversarial” mean in a GAN?

It describes the training setup: a generator tries to produce samples that look real and a discriminator tries to tell them from training data. Each is optimized against the other, like a forger and an inspector. The 2014 paper frames this as a two-player minimax game.

Did the 2019 desktop undressing program use a GAN?

Yes. It chained three conditional GANs built on the 2016 pix2pix architecture: one masked the clothing, one drew an anatomical sketch and one rendered texture. The small paired dataset of roughly 10,000 images explains its blurry, frontal-only results; current tools use diffusion inpainting.

Are GANs still used in deepfakes?

Partly. Encoder–decoder face-swap toolsets added adversarial losses for sharpness, and some real-time swappers keep GAN backbones for speed. Fully synthetic faces and body edits now come from diffusion models. Forensic tools still look for GAN upsampling fingerprints, but need separate detectors for diffusion output.

Why are GANs hard to train?

Because two networks chase moving targets. If the discriminator wins too easily the generator gets no useful gradient; if the generator finds one output that fools it, training collapses to that mode. Diffusion models avoid the problem with a fixed denoising objective.

What is StyleGAN?

A generator architecture from Nvidia researchers, published in 2018, that feeds a learned style vector into every layer, giving separate control over coarse pose, mid-level features and fine texture. It produced photoreal synthetic faces at 1024 px and made latent-space editing practical.

Do GANs and diffusion models leave different traces?

Yes. GAN generators upsample through fixed layers and leave periodic frequency patterns that classifiers learn to detect. Diffusion output lacks those patterns but shows its own statistical regularities in noise residuals. Detectors trained on one family usually degrade on the other.