Papers
Topics
Authors
Recent
Search
2000 character limit reached

Conditional Latent Diffusion Models

Updated 8 July 2026
  • Conditional Latent Diffusion Models are generative frameworks that perform diffusion in a lower-dimensional latent space, separating encoder-based representation learning from iterative, condition-guided denoising.
  • They incorporate diverse conditioning interfaces—such as cross-attention, embedding injection, and concatenation—to guide synthesis in applications like image, audio, and biomedical generation.
  • They improve computational efficiency and sample fidelity while addressing challenges in decoder alignment, quantization, and stopping criteria for optimized performance.

Conditional latent diffusion models (LDMs) are diffusion models trained in the latent space of a pretrained autoencoder and guided by external information such as text, class labels, layouts, semantic maps, bounding boxes, support images, or spatial measurements. Their canonical formulation separates representation learning from iterative denoising: an encoder maps data to a lower-dimensional latent, a conditional denoiser models the latent diffusion process, and a decoder maps sampled latents back to the observation domain. This design was introduced to reduce the computational burden of pixel-space diffusion while retaining quality and flexibility, with cross-attention providing a general mechanism for conditioning high-resolution synthesis (Rombach et al., 2021).

1. Formal foundations

In the standard LDM formulation, an autoencoder first compresses an observation xx into a latent z=E(x)z = E(x) and reconstructs it with a decoder D(z)D(z). Diffusion is then performed in the latent domain rather than in pixel space. A representative forward process is

q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),

and the corresponding latent-space conditional objective can be written as

Lcond-LDM:=EE(x),y,ϵN(0,1),t[ϵϵθ(zt,t,τθ(y))22].\mathcal{L}_{\text{cond-LDM}} := \mathbb{E}_{E(x), y, \epsilon \sim \mathcal{N}(0,1), t}\left[\| \epsilon - \epsilon_\theta(z_t, t, \tau_\theta(y)) \|_2^2\right].

In this formulation, τθ(y)\tau_\theta(y) denotes an encoded condition, and the denoiser predicts the noise added to the latent variable at timestep tt (Rombach et al., 2021).

This basic pattern recurs across domains. In conditional MRI generation, the encoder maps an MRI image xx to a latent representation parameterized as

q(zx)=N(z;μ(x),σ2(x)),q(z \mid x) = \mathcal{N}(z; \mu(x), \sigma^2(x)),

the conditional U-Net receives ztz_t, the timestep z=E(x)z = E(x)0, and conditioning information, and the decoder reconstructs z=E(x)z = E(x)1 from the denoised latent. The training objective is the mean squared error between true and predicted noise (Castillo et al., 25 Feb 2025). In shape-guided vascular synthesis, the conditional loss is written as

z=E(x)z = E(x)2

where z=E(x)z = E(x)3 collects the conditioning variables (Deo et al., 2023). In text-to-audio generation, the same latent-diffusion principle appears with CLAP-derived embeddings as condition and a noise-prediction loss

z=E(x)z = E(x)4

during training (Liu et al., 2023).

A common implication is that “conditional LDM” denotes a family of models rather than a single architectural recipe. What remains invariant is latent-space denoising under side information; what varies is the structure of the latent space, the conditioning interface, and the semantics of the decoder.

2. Conditioning interfaces

Conditionality in LDMs is implemented through several distinct interfaces rather than through a single universal mechanism.

Mechanism Condition Representative use
Cross-attention Text, layouts, semantic maps, bounding boxes High-resolution image synthesis
Token or embedding injection Pathology, modality, class label MRI generation
Decoder-side structured guidance Shape moments, PCA anatomy embeddings 3D vasculature synthesis
FiLM modulation CLAP embeddings Text-to-audio generation
Latent concatenation Neighbor-frame latents Video frame interpolation
Visual-prompt cross-attention Support image instructions with masks In-context segmentation
Multi-level spatial fusion Condition latent aligned with measurements Reservoir facies generation

The original image-space-to-latent-space transition did not remove general-purpose conditioning. Cross-attention was introduced precisely to handle “general conditioning inputs such as text or bounding boxes,” with the condition encoder producing key-value pairs for attention and the U-Net activations producing queries (Rombach et al., 2021). In conditional MRI generation, conditioning is achieved by including embedding vectors or tokens representing the desired pathology and modality as additional inputs to the U-Net during both training and inference (Castillo et al., 25 Feb 2025). In shape-guided vascular synthesis, class embeddings are injected into all encoding and decoding blocks, while shape and anatomy embeddings are supplied only to the decoding blocks (Deo et al., 2023).

Other domains use markedly different mechanisms. AudioLDM concatenates timestep embeddings and CLAP embeddings and applies feature-wise linear modulation, explicitly noting that no cross-attention is needed because the embedding is one-dimensional (Liu et al., 2023). LDMVFI conditions its denoising U-Net by concatenating the noisy latent of the intermediate frame with the two context latents corresponding to the neighboring frames (Danier et al., 2023). In in-context segmentation, a CLIP ViT prompt encoder extracts a visual instruction from the support image, and a two-stage masking strategy prevents interfering information from leaking into the instruction during cross-attention (Wang et al., 2024). In conditional reservoir facies generation, conditioning is spatially aligned rather than semantic: separate encoders map the full facies field and the conditioning data into compatible latent grids, and a second U-Net injects condition features at multiple resolution levels (Lee et al., 2023).

A frequent misconception is that conditioning in LDMs is synonymous with text prompting. The architectures above do not support that simplification. Reported conditions include class labels, pathology and modality tokens, Hu moments, Zernike moments, PCA-derived anatomy descriptors, support-image instructions, neighbor-frame latents, and sparse hard measurements.

3. Latent-space design and representation engineering

Conditional performance in LDMs depends not only on the denoiser but also on the geometry and semantics of the latent space. Several systems modify the latent representation itself so that conditioning becomes tractable or faithful.

LDMol is explicit that “the suitable latent space design is the key to the diffusion model performance.” Its SMILES autoencoder uses contrastive learning so that different SMILES enumerations of the same molecule cluster together, while stereoisomers serve as hard negatives. The resulting “structurally informative” latent space enables a DiT-based text-conditioned diffusion model to outperform autoregressive baselines on text-to-molecule generation (Chang et al., 2024). In latent diffusion for language generation, a frozen pretrained encoder-decoder LLM is paired with a learnable compression network inspired by the Perceiver Resampler to map variable-length encoder outputs into a fixed-size continuous latent suitable for diffusion; the decoder then reconstructs natural language from sampled latent codes (Lovelace et al., 2022).

Representation-learning variants push this idea further. LRDM conditions the latent denoiser on a learned representation extracted from the clean image by a separate encoder, regularizes that representation with a tractable prior, and reports faithful reconstructions and semantic interpolations (Traub, 2022). LDNS for neural spiking data uses an autoencoder with S4 layers to map high-dimensional spike-count sequences to smooth, low-dimensional, time-aligned latent trajectories, then trains conditional diffusion models on those latents; an optional autoregressive observation model captures single-neuron dynamics not mediated by the latent state (Kapoor et al., 2024). In 3D microstructure generation, a variational autoencoder compresses a z=E(x)z = E(x)5 voxel volume to a latent of size 1024, a feature predictor maps that latent to descriptors such as volume fractions, tortuosities, and processing parameters, and a conditional LDM generates latent microstructures guided by those descriptors (Baishnab et al., 12 Mar 2025).

These developments suggest that, in conditional LDMs, latent-space construction is often part of the conditioning strategy rather than a preprocessing convenience. When the latent encodes the invariants or factors relevant to the condition, guidance becomes easier to learn and more faithful to enforce.

4. Domain-specific realizations

Conditional LDMs have been instantiated across image, audio, video, language, scientific, and biomedical settings, with the form of the condition reflecting the structure of each task.

In image synthesis, the foundational LDM formulation supports text, layouts, semantic maps, and bounding boxes via cross-attention (Rombach et al., 2021). Creative-painting work extends this by enriching textual conditions through Wikipedia, T5, DialoGPT, BM25, TF-IDF, and relationship scoring, then fine-tuning on WikiArt so that artist names, styles, and genres become explicit conditions for synthesis (Wu, 2022). AudioLDM transfers the same latent-diffusion principle to text-to-audio generation, using CLAP audio embeddings as conditions during training and CLAP text embeddings during sampling, while also enabling zero-shot style transfer, inpainting, and super-resolution (Liu et al., 2023).

Medical and anatomical applications emphasize controllability over discrete categories and morphology. A brain MRI LDM is conditioned jointly on pathology—Healthy, Glioblastoma, Sclerosis, Dementia—and acquisition modality—T1w, T1ce, T2w, FLAIR, PD—and is reported to generate anatomically coherent, realistic synthetic MRIs even for pathology-modality combinations not present in training (Castillo et al., 25 Feb 2025). A 3D Circle of Willis model conditions on phenotype class, shape guidance from Hu and Zernike moments, and anatomy guidance from PCA, with those signals improving vessel continuity and anatomical plausibility (Deo et al., 2023).

Conditional LDMs also recast discriminative or interpolation problems as generation. LDMVFI formulates video frame interpolation as sampling the conditional distribution z=E(x)z = E(x)6 of an intermediate frame given two context frames, using a VFI-specific autoencoder and a latent denoising U-Net (Danier et al., 2023). In-context segmentation treats support images and masks as visual prompts and directly generates segmentation masks via a latent diffusion backbone, with augmented pseudo-masking used to align the 3-channel image output space with binary segmentation targets (Wang et al., 2024).

Scientific applications often require exact or near-exact adherence to observed measurements. Conditional reservoir facies generation uses categorical encoders, multi-level spatial conditioning, and an explicit preservation loss so that generated realizations rigorously preserve conditioning data (Lee et al., 2023). Related geomodel parameterization work combines a VAE, a latent-space U-Net, hard-data loss, and ensemble-based data assimilation to update latent variables rather than the full geological model during history matching (Federico et al., 2024). In materials science, a conditional LDM generates high-resolution 3D two-phase and three-phase microstructures tailored to user-specified volume fractions and tortuosities, and the same latent is used to predict manufacturing parameters such as blend ratio, interaction parameter z=E(x)z = E(x)7, and annealing time (Baishnab et al., 12 Mar 2025).

Discrete-sequence and biological domains have likewise adopted the paradigm. LD4LG supports unconditional, class-conditional, and sequence-to-sequence language generation in the latent space of pretrained encoder-decoder LLMs (Lovelace et al., 2022). LDMol uses text conditioning for molecule generation and extends the learned score model to molecule-to-text retrieval and text-guided molecule editing (Chang et al., 2024). LDNS conditions latent neural trajectories on reach direction, full velocity profiles, or trial length to generate realistic spiking data for observed and previously unseen behaviors (Kapoor et al., 2024).

5. Fidelity, diversity, and quantitative behavior

The empirical literature evaluates conditional LDMs with metrics that reflect both adherence to the condition and realism of the generated samples. Reported metrics include FID, CLIP score, MS-SSIM, LPIPS, FloLPIPS, Vendi Score, exact preservation error, two-point connectivity functions, SSIM, and flow-response statistics, depending on domain.

In anatomical synthesis, adding structured conditions can materially change quality. For Circle of Willis generation, the proposed LDM with shape and anatomy guidance achieves FID z=E(x)z = E(x)8, MS-SSIM z=E(x)z = E(x)9, and 4-G-R SSIM D(z)D(z)0, outperforming both conditional 3D GAN and conditional VAE baselines as well as a vanilla LDM (Deo et al., 2023). In reservoir facies generation, the conditional LDM records a preservation error rate of D(z)D(z)1 versus D(z)D(z)2 for the GAN baseline, while also matching the pixel-wise prior distribution more faithfully and avoiding mode collapse (Lee et al., 2023).

Decoder-aware objectives also alter the quantitative picture. The latent perceptual loss (LPL) addresses what is described as the “decoder-diffusion disconnect” by comparing intermediate decoder features for reference and predicted clean latents. Across ImageNet-1k, CC12M, and S320M at D(z)D(z)3 and D(z)D(z)4 resolution, this yields FID improvements between D(z)D(z)5 and D(z)D(z)6, including D(z)D(z)7 on ImageNet-1k at D(z)D(z)8 and D(z)D(z)9 on CC12M at q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),0 (Berrada et al., 2024). In 3D microstructure generation, the correlation between user-specified input features and measured output features is reported as at least q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),1 on synthetic data and q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),2–q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),3 on experimental data, indicating that the conditional signal survives the compression and denoising stages with high fidelity (Baishnab et al., 12 Mar 2025).

These results support a broader point: conditional LDMs are evaluated on more than one axis. Fidelity to the data manifold, fidelity to the condition, sample diversity, and domain-specific physical or structural constraints may improve or degrade independently. Consequently, a low FID alone is not sufficient to characterize a conditional system.

6. Efficiency, acceleration, and deployment

A major motivation for LDMs is efficiency, but the conditional setting introduces new opportunities and new bottlenecks. Several recent methods modify the inference path, the guidance path, or the numeric representation of the model to improve deployability.

LatentCRF exemplifies inference-path modification. It introduces a continuous CRF in latent space, implemented as a neural network layer with unary, pairwise, and higher-order energy terms,

q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),4

where the pairwise term is conditioned on text inputs. The mean-field update is

q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),5

and only five mean-field iterations are used in practice. By replacing roughly one third of the denoising steps, the method reports a q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),6 inference speed-up with no loss in image quality or diversity, and improves FID from q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),7 for LDM-33 steps to q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),8 for LatentCRF+LDM-33 steps; the CRF layer has 130M parameters versus 865M+ for the LDM (Ranasinghe et al., 2024).

Quantization studies identify a different class of bottleneck. Post-training quantization for LDMs is sensitive to block location, module type, and diffusion timestep. An SQNR-based strategy therefore combines global hybrid quantization—keeping quantization-sensitive later upsampling blocks in higher precision—with local correction methods such as SmoothQuant applied to modules with lowest SQNR, including output projections of transformer blocks and shortcut connections in up blocks. The same work notes that conditional calibration can aggravate quantization loss because conditional inputs may exhibit mismatched activation distributions, particularly around attention projections (Dey et al., 2023).

Guidance itself can also become an efficiency problem when latent models rely on pixel-space evaluators. Latent-CLIP removes the need to decode intermediate latents before CLIP-based evaluation or reward computation by training a CLIP model directly in latent space on 2.7B latent-text pairs. When used in reward-based noise optimization, latent-space rewards match the performance of pixel-space CLIP rewards on GenEval and T2I-CompBench while cutting the cost of the total pipeline by q(xtx0)=N(xt;αˉtx0,(1αˉt)I),q(\mathbf{x}_t \mid \mathbf{x}_0) = \mathcal{N}\left(\mathbf{x}_t ; \sqrt{\bar{\alpha}_t}\mathbf{x}_0, (1-\bar{\alpha}_t)\mathbf{I}\right),9, and the same latent-space reward can guide generation away from harmful content without decoding intermediate images (Becker et al., 11 Mar 2025).

7. Limitations, misconceptions, and open directions

Several lines of work identify nontrivial failure modes in conditional LDMs. One is the disconnect between latent denoising and decoder behavior: because the diffusion objective is usually defined only in latent space, the denoiser is not directly encouraged to remain in regions of latent space that decode to sharp and realistic images. LPL was proposed specifically to remediate this disconnect (Berrada et al., 2024). Another limitation concerns stopping time. Under a Gaussian framework with linear autoencoders, “Optimal Stopping in Latent Diffusion Models” shows that the final diffusion steps can degrade sample quality, that lower-dimensional representations benefit from earlier termination, and that higher-dimensional latent spaces require later stopping time (Wu et al., 9 Oct 2025).

A second misconception is that moving from pixel space to latent space necessarily weakens conditional control. The reported evidence is more nuanced. LatentCRF conditions pairwise energies on text and preserves prompt alignment while accelerating inference (Ranasinghe et al., 2024). Conditional MRI generation synthesizes pathology-modality combinations that were absent from training while remaining anatomically coherent (Castillo et al., 25 Feb 2025). Reservoir facies generation reaches near-perfect preservation of conditioning measurements through explicit preservation loss and spatially aligned conditioning (Lee et al., 2023). These examples indicate that latent compression does not by itself imply weaker conditionality; the outcome depends on how the condition is encoded and enforced.

Interpretability remains comparatively underdeveloped. A related diffusion-language study shows that denoising progress can be represented as a low-dimensional, probe-accessible, and steerable latent signal even when the model is not explicitly conditioned on timestep. This is not a study of LDMs proper, but it suggests that internal representations of conditioning variables may emerge even when not hard-coded as explicit inputs (Rulli et al., 2 Jul 2026). A plausible implication is that future work on conditional LDMs may increasingly examine internal latent geometry, not only external control interfaces.

Taken together, current research depicts conditional LDMs as a modular generative framework defined by three interacting design choices: the structure of the latent space, the interface through which conditions enter the denoiser, and the degree to which training or inference explicitly enforces condition fidelity. Their recent evolution has moved beyond text-conditioned image synthesis into scientifically constrained generation, structured editing, retrieval, segmentation, data assimilation, and behavior-conditioned biological simulation, while simultaneously exposing open questions about decoder alignment, stopping criteria, quantization, and interpretability.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (20)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Conditional Latent Diffusion Models (LDMs).