N Neurarch Architectures Models Checks Data Docs Open the app

Comparisons / Diffusion UNet vs DiT-XL/2

Diffusion UNet vs DiT-XL/2

Convolutional against transformer backbones for diffusion.

DiT-XL/2 has 664M more parameters than Diffusion UNet: 199 layers added, 14 removed, 4 changed.

Baseline

Diffusion UNet

Layers
17
Parameters
6.7M
Input
4 × 64 × 64
Output
4 × 64 × 64
Forward-passes
yes
Est. train cost
$0.541
Compared

DiT-XL/2

Layers
201
Parameters
671M
Input
4 × 32 × 32
Output
256 × 32
Forward-passes
yes
Est. train cost
$4.41

The deltas

Every number is DiT-XL/2 relative to Diffusion UNet.

Parameters
+664M (100× the size)
Layers
+184
Added
199
Removed
14
Changed
4
Unchanged
1

Which GPUs each one fits

Each side is measured at its own declared input (4 × 64 × 64 against 4 × 32 × 32). Both columns are right about their own model; the difference between them is not a fact about the designs.

GPUDiffusion UNetDiT-XL/2
T4 16GBfitsfits
A100 40GBfitsfits
H100 80GBfitsfits

Layer by layer

Aligned in topological order. 1 of 218 rows are the same layer with the same parameters.

Show all 218 rows
Diffusion UNetDiT-XL/2
LayerParamsOutputLayerParamsOutput
1changed
shape
noisy_latent
Input
4 × 64 × 64noisy_latent
Input
4 × 32 × 32
2removedconv_in
Conv2d
3.2K320 × 64 × 64
3addedtimestep_+_class
Input
1 × 2
4addedpatchify_2x2
Patch Embed
20K256 × 1152
5addedcond_embed
Embedding
1.2M1 × 2 × 1152
6addedpos_embed
Positional Encoding
256 × 1152
7addedadaLN_1
Linear
8.0M1 × 2 × 6912
8addedadaLN_2
Linear
8.0M1 × 2 × 6912
9addedadaLN_3
Linear
8.0M1 × 2 × 6912
10addedadaLN_4
Linear
8.0M1 × 2 × 6912
11addedadaLN_5
Linear
8.0M1 × 2 × 6912
12addedadaLN_6
Linear
8.0M1 × 2 × 6912
13addedadaLN_7
Linear
8.0M1 × 2 × 6912
14addedadaLN_8
Linear
8.0M1 × 2 × 6912
15addedadaLN_9
Linear
8.0M1 × 2 × 6912
16addedadaLN_10
Linear
8.0M1 × 2 × 6912
17addedadaLN_11
Linear
8.0M1 × 2 × 6912
18addedadaLN_12
Linear
8.0M1 × 2 × 6912
19addedadaLN_13
Linear
8.0M1 × 2 × 6912
20addedadaLN_14
Linear
8.0M1 × 2 × 6912
21addedadaLN_15
Linear
8.0M1 × 2 × 6912
22addedadaLN_16
Linear
8.0M1 × 2 × 6912
23addedadaLN_17
Linear
8.0M1 × 2 × 6912
24addedadaLN_18
Linear
8.0M1 × 2 × 6912
25addedadaLN_19
Linear
8.0M1 × 2 × 6912
26addedadaLN_20
Linear
8.0M1 × 2 × 6912
27addedadaLN_21
Linear
8.0M1 × 2 × 6912
28addedadaLN_22
Linear
8.0M1 × 2 × 6912
29addedadaLN_23
Linear
8.0M1 × 2 × 6912
30addedadaLN_24
Linear
8.0M1 × 2 × 6912
31addedadaLN_25
Linear
8.0M1 × 2 × 6912
32addedadaLN_26
Linear
8.0M1 × 2 × 6912
33addedadaLN_27
Linear
8.0M1 × 2 × 6912
34addedadaLN_28
Linear
8.0M1 × 2 × 6912
35changed
type, numGroups, numChannels, normalizedShape
down1_norm
Group Norm
640320 × 64 × 64norm1_1
Layer Norm
2.3K256 × 1152
36removeddown1_conv
Conv2d
3.2K320 × 64 × 64
37removeddown1_silu
Swish
320 × 64 × 64
38removedto_tokens
Reshape
4096 × 320
39removeddown1_text_attn
Cross Attention
411K4096 × 320
40removedto_feature_map
Reshape
320 × 64 × 64
41removeddownsample_1
Conv2d
6.4K640 × 32 × 32
42addedself_attn_1
Multi Head Attention
5.3M256 × 1152
43addedresidual1_1
Add
256 × 1152
44changed
type, numGroups, numChannels, normalizedShape
mid_norm
Group Norm
1.3K640 × 32 × 32norm2_1
Layer Norm
2.3K256 × 1152
45removedto_tokens
Reshape
1024 × 640
46removedmid_text_attn
Cross Attention
1.6M1024 × 640
47removedto_feature_map
Reshape
640 × 32 × 32
48removedupsample_1
Upsample
640 × 64 × 64
49removedup1_conv
Conv2d
3.2K320 × 64 × 64
50addedmlp_1
Feed Forward
11M256 × 1152
51addedresidual2_1
Add
256 × 1152
52changed
type, numGroups, numChannels, normalizedShape
conv_out_norm
Group Norm
640320 × 64 × 64norm1_2
Layer Norm
2.3K256 × 1152
53removedup1_silu
Swish
320 × 64 × 64
54removedconv_out
Conv2d
404 × 64 × 64
55addedself_attn_2
Multi Head Attention
5.3M256 × 1152
56addedresidual1_2
Add
256 × 1152
57addednorm2_2
Layer Norm
2.3K256 × 1152
58addedmlp_2
Feed Forward
11M256 × 1152
59addedresidual2_2
Add
256 × 1152
60addednorm1_3
Layer Norm
2.3K256 × 1152
61addedself_attn_3
Multi Head Attention
5.3M256 × 1152
62addedresidual1_3
Add
256 × 1152
63addednorm2_3
Layer Norm
2.3K256 × 1152
64addedmlp_3
Feed Forward
11M256 × 1152
65addedresidual2_3
Add
256 × 1152
66addednorm1_4
Layer Norm
2.3K256 × 1152
67addedself_attn_4
Multi Head Attention
5.3M256 × 1152
68addedresidual1_4
Add
256 × 1152
69addednorm2_4
Layer Norm
2.3K256 × 1152
70addedmlp_4
Feed Forward
11M256 × 1152
71addedresidual2_4
Add
256 × 1152
72addednorm1_5
Layer Norm
2.3K256 × 1152
73addedself_attn_5
Multi Head Attention
5.3M256 × 1152
74addedresidual1_5
Add
256 × 1152
75addednorm2_5
Layer Norm
2.3K256 × 1152
76addedmlp_5
Feed Forward
11M256 × 1152
77addedresidual2_5
Add
256 × 1152
78addednorm1_6
Layer Norm
2.3K256 × 1152
79addedself_attn_6
Multi Head Attention
5.3M256 × 1152
80addedresidual1_6
Add
256 × 1152
81addednorm2_6
Layer Norm
2.3K256 × 1152
82addedmlp_6
Feed Forward
11M256 × 1152
83addedresidual2_6
Add
256 × 1152
84addednorm1_7
Layer Norm
2.3K256 × 1152
85addedself_attn_7
Multi Head Attention
5.3M256 × 1152
86addedresidual1_7
Add
256 × 1152
87addednorm2_7
Layer Norm
2.3K256 × 1152
88addedmlp_7
Feed Forward
11M256 × 1152
89addedresidual2_7
Add
256 × 1152
90addednorm1_8
Layer Norm
2.3K256 × 1152
91addedself_attn_8
Multi Head Attention
5.3M256 × 1152
92addedresidual1_8
Add
256 × 1152
93addednorm2_8
Layer Norm
2.3K256 × 1152
94addedmlp_8
Feed Forward
11M256 × 1152
95addedresidual2_8
Add
256 × 1152
96addednorm1_9
Layer Norm
2.3K256 × 1152
97addedself_attn_9
Multi Head Attention
5.3M256 × 1152
98addedresidual1_9
Add
256 × 1152
99addednorm2_9
Layer Norm
2.3K256 × 1152
100addedmlp_9
Feed Forward
11M256 × 1152
101addedresidual2_9
Add
256 × 1152
102addednorm1_10
Layer Norm
2.3K256 × 1152
103addedself_attn_10
Multi Head Attention
5.3M256 × 1152
104addedresidual1_10
Add
256 × 1152
105addednorm2_10
Layer Norm
2.3K256 × 1152
106addedmlp_10
Feed Forward
11M256 × 1152
107addedresidual2_10
Add
256 × 1152
108addednorm1_11
Layer Norm
2.3K256 × 1152
109addedself_attn_11
Multi Head Attention
5.3M256 × 1152
110addedresidual1_11
Add
256 × 1152
111addednorm2_11
Layer Norm
2.3K256 × 1152
112addedmlp_11
Feed Forward
11M256 × 1152
113addedresidual2_11
Add
256 × 1152
114addednorm1_12
Layer Norm
2.3K256 × 1152
115addedself_attn_12
Multi Head Attention
5.3M256 × 1152
116addedresidual1_12
Add
256 × 1152
117addednorm2_12
Layer Norm
2.3K256 × 1152
118addedmlp_12
Feed Forward
11M256 × 1152
119addedresidual2_12
Add
256 × 1152
120addednorm1_13
Layer Norm
2.3K256 × 1152
121addedself_attn_13
Multi Head Attention
5.3M256 × 1152
122addedresidual1_13
Add
256 × 1152
123addednorm2_13
Layer Norm
2.3K256 × 1152
124addedmlp_13
Feed Forward
11M256 × 1152
125addedresidual2_13
Add
256 × 1152
126addednorm1_14
Layer Norm
2.3K256 × 1152
127addedself_attn_14
Multi Head Attention
5.3M256 × 1152
128addedresidual1_14
Add
256 × 1152
129addednorm2_14
Layer Norm
2.3K256 × 1152
130addedmlp_14
Feed Forward
11M256 × 1152
131addedresidual2_14
Add
256 × 1152
132addednorm1_15
Layer Norm
2.3K256 × 1152
133addedself_attn_15
Multi Head Attention
5.3M256 × 1152
134addedresidual1_15
Add
256 × 1152
135addednorm2_15
Layer Norm
2.3K256 × 1152
136addedmlp_15
Feed Forward
11M256 × 1152
137addedresidual2_15
Add
256 × 1152
138addednorm1_16
Layer Norm
2.3K256 × 1152
139addedself_attn_16
Multi Head Attention
5.3M256 × 1152
140addedresidual1_16
Add
256 × 1152
141addednorm2_16
Layer Norm
2.3K256 × 1152
142addedmlp_16
Feed Forward
11M256 × 1152
143addedresidual2_16
Add
256 × 1152
144addednorm1_17
Layer Norm
2.3K256 × 1152
145addedself_attn_17
Multi Head Attention
5.3M256 × 1152
146addedresidual1_17
Add
256 × 1152
147addednorm2_17
Layer Norm
2.3K256 × 1152
148addedmlp_17
Feed Forward
11M256 × 1152
149addedresidual2_17
Add
256 × 1152
150addednorm1_18
Layer Norm
2.3K256 × 1152
151addedself_attn_18
Multi Head Attention
5.3M256 × 1152
152addedresidual1_18
Add
256 × 1152
153addednorm2_18
Layer Norm
2.3K256 × 1152
154addedmlp_18
Feed Forward
11M256 × 1152
155addedresidual2_18
Add
256 × 1152
156addednorm1_19
Layer Norm
2.3K256 × 1152
157addedself_attn_19
Multi Head Attention
5.3M256 × 1152
158addedresidual1_19
Add
256 × 1152
159addednorm2_19
Layer Norm
2.3K256 × 1152
160addedmlp_19
Feed Forward
11M256 × 1152
161addedresidual2_19
Add
256 × 1152
162addednorm1_20
Layer Norm
2.3K256 × 1152
163addedself_attn_20
Multi Head Attention
5.3M256 × 1152
164addedresidual1_20
Add
256 × 1152
165addednorm2_20
Layer Norm
2.3K256 × 1152
166addedmlp_20
Feed Forward
11M256 × 1152
167addedresidual2_20
Add
256 × 1152
168addednorm1_21
Layer Norm
2.3K256 × 1152
169addedself_attn_21
Multi Head Attention
5.3M256 × 1152
170addedresidual1_21
Add
256 × 1152
171addednorm2_21
Layer Norm
2.3K256 × 1152
172addedmlp_21
Feed Forward
11M256 × 1152
173addedresidual2_21
Add
256 × 1152
174addednorm1_22
Layer Norm
2.3K256 × 1152
175addedself_attn_22
Multi Head Attention
5.3M256 × 1152
176addedresidual1_22
Add
256 × 1152
177addednorm2_22
Layer Norm
2.3K256 × 1152
178addedmlp_22
Feed Forward
11M256 × 1152
179addedresidual2_22
Add
256 × 1152
180addednorm1_23
Layer Norm
2.3K256 × 1152
181addedself_attn_23
Multi Head Attention
5.3M256 × 1152
182addedresidual1_23
Add
256 × 1152
183addednorm2_23
Layer Norm
2.3K256 × 1152
184addedmlp_23
Feed Forward
11M256 × 1152
185addedresidual2_23
Add
256 × 1152
186addednorm1_24
Layer Norm
2.3K256 × 1152
187addedself_attn_24
Multi Head Attention
5.3M256 × 1152
188addedresidual1_24
Add
256 × 1152
189addednorm2_24
Layer Norm
2.3K256 × 1152
190addedmlp_24
Feed Forward
11M256 × 1152
191addedresidual2_24
Add
256 × 1152
192addednorm1_25
Layer Norm
2.3K256 × 1152
193addedself_attn_25
Multi Head Attention
5.3M256 × 1152
194addedresidual1_25
Add
256 × 1152
195addednorm2_25
Layer Norm
2.3K256 × 1152
196addedmlp_25
Feed Forward
11M256 × 1152
197addedresidual2_25
Add
256 × 1152
198addednorm1_26
Layer Norm
2.3K256 × 1152
199addedself_attn_26
Multi Head Attention
5.3M256 × 1152
200addedresidual1_26
Add
256 × 1152
201addednorm2_26
Layer Norm
2.3K256 × 1152
202addedmlp_26
Feed Forward
11M256 × 1152
203addedresidual2_26
Add
256 × 1152
204addednorm1_27
Layer Norm
2.3K256 × 1152
205addedself_attn_27
Multi Head Attention
5.3M256 × 1152
206addedresidual1_27
Add
256 × 1152
207addednorm2_27
Layer Norm
2.3K256 × 1152
208addedmlp_27
Feed Forward
11M256 × 1152
209addedresidual2_27
Add
256 × 1152
210addednorm1_28
Layer Norm
2.3K256 × 1152
211addedself_attn_28
Multi Head Attention
5.3M256 × 1152
212addedresidual1_28
Add
256 × 1152
213addednorm2_28
Layer Norm
2.3K256 × 1152
214addedmlp_28
Feed Forward
11M256 × 1152
215addedresidual2_28
Add
256 × 1152
216addedfinal_norm
Layer Norm
2.3K256 × 1152
217addedunpatchify
Linear
37K256 × 32
218samepredicted_noise
Output
4 × 64 × 64predicted_noise
Output
256 × 32

What this is not

Take it further

Open either graph in the editor, change it, and check it again: Diffusion UNet · DiT-XL/2

Compare any two models of your own, including anything on Hugging Face: the comparison tool.

Machine-readable: this page as markdown · the pair index · POST https://www.neurarch.com/api/v1/plan for a graph of your own.

Related comparisons

U-Net vs Diffusion UNet
A segmentation U-Net against the one a diffusion model uses.
ViT-B/16 vs DiT-XL/2
A vision transformer against a diffusion transformer.