AUTOMATIC1111/stable-diffusion-webui
Glossary
Project-specific vocabulary used throughout the codebase. General Stable Diffusion / ML terms (UNet, CFG, VAE, …) are explained in upstream documentation; this list focuses on names that are unique to this repository or have a non-obvious meaning here.
| Term | Meaning |
|---|---|
| alwayson script | A Script subclass whose show() returns AlwaysVisible. Its UI appears on every tab and its process()/postprocess() hooks run on every generation. ControlNet and ADetailer are typical examples. See systems/scripts-and-extensions.md. |
| API mode | The server started by webui.py:api_only() when --nowebui is passed. No Gradio UI; only /sdapi/v1/* and /docs. |
| call queue | The global queue_lock (in modules/call_queue.py) that serialises GPU work. Every generation handler is wrapped with wrap_gradio_gpu_call(). |
| checkpoint | A .ckpt/.safetensors file containing UNet+VAE+text-encoder weights. The list is built by modules/sd_models.py from models/Stable-diffusion/. Internally represented by CheckpointInfo. |
| clip skip | Number of layers to skip from the end of the CLIP text encoder. Implemented as a hijack in modules/sd_hijack_clip.py. |
| cmd_opts | shared.cmd_opts — the parsed argparse Namespace from modules/cmd_args.py. Read-only at runtime. |
| demo | shared.demo — the top-level Gradio Blocks object built by ui.create_ui(). Closed and rebuilt on UI reload. |
| denoiser | The CFG-applying wrapper around the UNet, defined in modules/sd_samplers_cfg_denoiser.py. Extensions hook into it via cfg_denoiser callbacks. |
| embedding | A textual-inversion file in embeddings/. Loaded by modules/textual_inversion/textual_inversion.py. |
| extra network | A model file referenced inline in a prompt with <type:name:weight> syntax (Lora, hypernetwork, embedding). Browser UI in modules/ui_extra_networks.py. |
| Extras tab | The post-processing tab; runs face restoration and upscalers without re-generating. Code in modules/postprocessing.py and modules/extras.py. |
| face restoration | GFPGAN or CodeFormer post-processing; abstracted by modules/face_restoration.py. |
| hijack | Monkey-patches applied to the upstream ldm package so that prompt parsing, attention, and embeddings work correctly. See systems/sd-hijack.md. |
| hires fix | Two-pass txt2img that generates at low resolution then upscales+denoises at high resolution. Implemented inside StableDiffusionProcessingTxt2Img in modules/processing.py. |
| hypernetwork | Small MLP applied to UNet attention layers; trained via modules/hypernetworks/hypernetwork.py. Considered legacy in favour of Lora. |
| infotext | The PNG/EXIF metadata string that describes how an image was generated (prompt, seed, sampler, model hash, …). Built by processing.create_infotext(). Parsing/round-tripping logic in modules/infotext_utils.py. |
| Lora | Low-rank adaptation file. The built-in extension under extensions-builtin/Lora/ implements the prompt syntax and patching. Also handles LyCORIS variants (LoHa, LoKr, IA3, GLoRA, OFT). |
| opts | shared.opts — the user options object backed by config.json. Settings page edits write through to it. |
| outpainting | Iterative img2img that fills space outside an existing image; see scripts/outpainting_mk_2.py and scripts/poor_mans_outpainting.py. |
| p | Convention: any variable named p is a StableDiffusionProcessing instance. Scripts mutate p to influence generation. |
| paste field / infotext field | A (component, key) pair that participates in PNG-info round-tripping. Registered by scripts/UI tabs and consumed by modules/infotext_utils.py. |
| postprocessor (Extras) | A ScriptPostprocessing subclass registered in modules/scripts_postprocessing.py. The Extras tab runs an ordered chain of these. |
| prompt parser | The Lark grammar in modules/prompt_parser.py that handles attention (), scheduling [a:b:0.5], and AND-composable diffusion. |
| refiner | An optional second checkpoint switched in mid-generation (SDXL pattern). Code in modules/processing_scripts/refiner.py. |
| sampler | A wrapper around an underlying sampling algorithm (k-diffusion, timesteps, LCM). Defined in modules/sd_samplers_*.py. The aggregate list is sd_samplers.all_samplers. |
| scheduler | The sigma schedule (Karras, Exponential, Align Your Steps, …). Independent from the sampler since v1.10. Defined in modules/sd_schedulers.py. |
| script | Either a one-shot script (X/Y/Z plot, prompt matrix) bound to the Script dropdown, or an alwayson script. Lives under scripts/ or in an extension. |
| script callback | A named hook (≈30 of them) registered in modules/script_callbacks.py. The recommended extension entry point. |
| script runner | ScriptRunner in modules/scripts.py. One per tab (txt2img, img2img, extras). Owns the active scripts list and drives them through the pipeline. |
| shared | modules/shared.py — process-wide globals: cmd_opts, opts, state, sd_model, face_restorers, etc. The de-facto service locator. |
| state | shared.state — the State object in modules/shared_state.py holding job progress, interrupt flags, current preview image. |
| toprow | The shared prompt + Generate area at the top of txt2img/img2img tabs. Built by Toprow in modules/ui_toprow.py. |
| upscaler | A Upscaler subclass exposed in shared.sd_upscalers. Concrete impls live in modules/esrgan_model.py, modules/realesrgan_model.py, modules/dat_model.py, modules/hat_model.py, and the LDSR/SwinIR/ScuNET built-in extensions. |
| VAE | Variational Autoencoder; either bundled with the checkpoint or loaded separately via models/VAE/. Code in modules/sd_vae.py. |
| xyz_grid | The X/Y/Z plot script that varies up to three parameters in a grid. Source in scripts/xyz_grid.py (~38 KB). |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.
Previous
Getting started
Next
By the numbers