🎲 LDM Sampler
There's no CFG here — meet the sampler that denoises the original LDM
- model
- positive
- latent_image
- negative
- LATENT
Somewhere in the middle of your LDM workflow sits the node that actually does the generating. Loader gets the model, the BERT encoder turns your words into conditioning, and then this node runs the denoising loop that turns noise into a meaningful latent. If you're used to ComfyUI's KSampler, this is that - except it's a standalone re-implementation written for one specific 2021 architecture, and it's where you'll most feel that this model predates everything you know.
The giveaway is what's not here: no cfg input, no negative conditioning socket. The original LDM F8 Large was trained without classifier-free guidance, so there's no CFG scale to crank and no negative prompt to write. The single conditioning input is helpfully still labelled positive, but it's the only conditioning. Don't go looking for a second text-encode node; there isn't one.
How it works
The checkpoint stores its own noise schedule (the betas / alphas_cumprod tensors), and this node builds a sigma schedule from it, then marches the latent down that schedule over steps iterations. The samplers come in two families, and it's worth knowing which you're on because they behave differently:
- Alpha-space -
ddim,ddpm,plms. These are the samplers native to the LDM paper.ddimis deterministic (or stochastic, viaeta);ddpmis the ancestral, always-random walk;plmsis the multistep speed-up. - Sigma-space -
euler,euler_ancestral,heun,dpmpp_2m. The k-diffusion family, ported over so you can use the samplers you already know.
Schedulers have a compatibility rule you'll want in your head: the alpha-space samplers only accept ddim_uniform, linear, and beta. The sigma-space samplers accept all six (karras, exponential, and cosine included). Pick a forbidden combo and the node doesn't error - it silently swaps to a compatible schedule and prints a warning to the console. If output ever looks odd, check that console.
The inputs you actually set
steps- 50 by default. The k-diffusion samplers converge well at 20–30; this old model likes a bit more, so if you're usingddimorplms, 50 is a fine floor and 100 won't hurt.sampler_nameandscheduler- your comfort pick.euler+karras, or the paper-authenticddim+ddim_uniformare the two sane starting points. For pure history, runddimwithetaat 0.seed- roll it until you like the image;ddim/euler/dpmpp_2mare deterministic for a fixed seed, ancestral ones aren't.eta- stochasticity forddimonly (0 = deterministic, 1 ≈ DDPM). Ignored by everyone else;ddpmis always stochastic regardless.denoise- 1.0 means full generation from noise (txt2img). Dial it below 1.0 to partially denoise an existing latent, which is how img2img works here.
The latent_image input takes either an empty latent from 🌫️ LDM Empty Latent (txt2img) or an encoded image from 📥 LDM VAE Encode (img2img).
Wire it up and get it out
The node takes model (MODEL from Load LDM Checkpoint), positive (CONDITIONING from LDM BERT Text Encode), and latent_image. Its single LATENT output feeds 🖼️ LDM VAE Decode, which turns it into pixels you can save. The chain is short and that's the whole point: Loader → Text Encode → Empty Latent → Sampler → VAE Decode.
Common issues
- "Where's the negative prompt?" - doesn't exist here, by training design. Your best "negative" is writing the positive more carefully.
- Inconsistent results across sampler names - expected; each family walks the schedule differently. Same seed across families gives different images.
- Loose prompt adherence - if the image only vaguely matches your text, that's the model, not the sampler. No CFG means no sharpening of prompt-vs-image contrast; it's the defining limitation of this whole pack.
- Weird results with
karras+ddim- that combo is incompatible; the node fell back toddim_uniform. Check the console for the warning.
One tip: keep the canvas at the model's native 256×256. A small, honest image at native resolution beats a smeared one at 1024 - and if you must go bigger, do it after generation with an upscaler, not by asking this model to stretch.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| model | LDM_MODEL | MODEL output from Load LDM Checkpoint. | |
| positive | LDM_CONDITIONING | CONDITIONING from BERT Text Encode node. | |
| latent_image | LDM_LATENT | Starting latent: empty (txt2img) or encoded image (img2img). | |
| seed | INT | 420–18446744073709550000 | Random seed for initial noise. |
| steps | INT | 501–1000 | Number of denoising steps. |
| enable_cfg | BOOLEAN | false | Enable Classifier-Free Guidance. When True, the model uses both positive and negative conditioning to steer generation. |
| cfg_scale | FLOAT | 7.51–30 | CFG strength. 1.0 = no effect. Higher values follow the prompt more strictly but may cause oversaturation. Only used when enable_cfg=True. |
| sampler_name | COMBO | ddim/ddpm/plms are alpha-space. euler/heun/dpmpp_2m are sigma-space. | |
| scheduler | COMBO | Sigma schedule. | |
| eta | FLOAT | 0.000–1 | Stochasticity for DDIM only. 0=deterministic, 1≈DDPM. |
| denoise | FLOAT | 1.000–1 | 1.0 = full generation; < 1.0 = partial (img2img). |
| negativeopt | LDM_CONDITIONING | Negative conditioning from a second BERT Text Encode node. If not connected and CFG is enabled, zero (empty) conditioning is used. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LDM_LATENT | — |