monai.SPADEDiffusionModelUNet
Diffusion UNet from MONAI with timestep and attention conditioning plus SPADE semantic-map normalization.
Diffusion and generative · 843 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 7.1M
- Operations
- 843
- Framework
- PyTorch
- Recurrent
- No
- Published
- CVPR 2019
- Cited by
- 2,965 (as of 19 October 2026)
- Authors
- Taesung Park, Ming-Yu Liu, Ting-Chun Wang, Jun-Yan Zhu
- Source
- monai 1.5.2
- License
- Apache-2.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m7450
- Graph hash
- 090ad88c0ea578419cf4304bedd63ba6e97c9abd1f5b9a79353cef7e78ed6f34
- Skeleton hash
- bc6f170479f84bbd71504aea8069f81778130c03c0d1a6f7d42c3158d13a8ac4
- Architecture hash
- 8b341cd58eae76154fc7765d26f0ae5768d80dce3a33b849ef6d3d9c9b35d65f
- Diagram SHA-256
- 744890721dc535a8a95288ec017c90037e784608380a1fe98610b8272c887d0a
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
SPADEDiffusionModelUNet is a UNet with timestep embedding and attention mechanisms for conditioning, with SPADE normalization added for semantic conditioning. The forward pass takes the input tensor, a timestep tensor and a segmentation tensor for SPADE norm, with optional context and class labels. Its up blocks use residual blocks with timestep conditioning and SPADE norm, with variants that add self-attention and cross-attention. The model becomes class-conditional when a number of class embeddings is specified. Spatial transformers can be added to perform conditioning on a context tensor through cross-attention. Additional residual connections for the down and middle blocks allow ControlNet-style inputs.
SPADE, spatially-adaptive normalization, is a layer for synthesizing photorealistic images given an input semantic layout. Its authors proposed using the input layout to modulate the activations in normalization layers through a spatially-adaptive, learned transformation. In the SPADE generator the segmentation mask is fed through spatially adaptive modulation without normalization, so only activations from the previous layer are normalized.
Key idea. MONAI's SPADEDiffusionModelUNet adds SPADE semantic normalization to a timestep-conditioned diffusion UNet so segmentation maps guide the denoising.
- SPADE
- spatially-adaptive normalization
- diffusion UNet
- denoising diffusion
- semantic conditioning
- MONAI
- generative models
- medical image synthesis
- timestep embedding
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{park2019semanticimagesynthesisspatiallyadaptive,
title={Semantic Image Synthesis with Spatially-Adaptive Normalization},
author={Taesung Park and Ming-Yu Liu and Ting-Chun Wang and Jun-Yan Zhu},
year={2019},
eprint={1903.07291},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1903.07291},
}