Architecture
SD 1.x and 2.x use the classic latent diffusion architecture:- UNet — the denoising backbone that operates on compressed latent representations.
- VAE — encodes images into latent space and decodes latents back to pixel space.
- CLIP text encoder — conditions generation on text prompts.
- SD 1.x uses OpenAI CLIP ViT-L/14.
- SD 2.x uses OpenCLIP ViT-H/14 with a 1024-dimensional embedding.
Supported versions
SD 2.x models require
--v2 and, for v-prediction checkpoints, --v_parameterization. Omitting these flags when training against a v2 checkpoint produces incorrect results.Available training methods
LoRA training
Usetrain_network.py with --network_module=networks.lora:
SD 2.x flags
When training against an SD 2.x checkpoint you must add the following flags:Textual Inversion
Textual Inversion trains new token embeddings without modifying the model weights. Usetrain_textual_inversion.py:
