N Neurarch Try it See it Changes Bot Pricing API Open 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 16GBfitsno
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—
3added—timestep_+_class
Input
1 × 2
4added—patchify_2x2
Patch Embed
20K256 × 1152
5added—cond_embed
Embedding
1.2M1 × 2 × 1152
6added—pos_embed
Positional Encoding
256 × 1152
7added—adaLN_1
Linear
8.0M1 × 2 × 6912
8added—adaLN_2
Linear
8.0M1 × 2 × 6912
9added—adaLN_3
Linear
8.0M1 × 2 × 6912
10added—adaLN_4
Linear
8.0M1 × 2 × 6912
11added—adaLN_5
Linear
8.0M1 × 2 × 6912
12added—adaLN_6
Linear
8.0M1 × 2 × 6912
13added—adaLN_7
Linear
8.0M1 × 2 × 6912
14added—adaLN_8
Linear
8.0M1 × 2 × 6912
15added—adaLN_9
Linear
8.0M1 × 2 × 6912
16added—adaLN_10
Linear
8.0M1 × 2 × 6912
17added—adaLN_11
Linear
8.0M1 × 2 × 6912
18added—adaLN_12
Linear
8.0M1 × 2 × 6912
19added—adaLN_13
Linear
8.0M1 × 2 × 6912
20added—adaLN_14
Linear
8.0M1 × 2 × 6912
21added—adaLN_15
Linear
8.0M1 × 2 × 6912
22added—adaLN_16
Linear
8.0M1 × 2 × 6912
23added—adaLN_17
Linear
8.0M1 × 2 × 6912
24added—adaLN_18
Linear
8.0M1 × 2 × 6912
25added—adaLN_19
Linear
8.0M1 × 2 × 6912
26added—adaLN_20
Linear
8.0M1 × 2 × 6912
27added—adaLN_21
Linear
8.0M1 × 2 × 6912
28added—adaLN_22
Linear
8.0M1 × 2 × 6912
29added—adaLN_23
Linear
8.0M1 × 2 × 6912
30added—adaLN_24
Linear
8.0M1 × 2 × 6912
31added—adaLN_25
Linear
8.0M1 × 2 × 6912
32added—adaLN_26
Linear
8.0M1 × 2 × 6912
33added—adaLN_27
Linear
8.0M1 × 2 × 6912
34added—adaLN_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—
42added—self_attn_1
Multi Head Attention
5.3M256 × 1152
43added—residual1_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—
50added—mlp_1
Feed Forward
11M256 × 1152
51added—residual2_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—
55added—self_attn_2
Multi Head Attention
5.3M256 × 1152
56added—residual1_2
Add
256 × 1152
57added—norm2_2
Layer Norm
2.3K256 × 1152
58added—mlp_2
Feed Forward
11M256 × 1152
59added—residual2_2
Add
256 × 1152
60added—norm1_3
Layer Norm
2.3K256 × 1152
61added—self_attn_3
Multi Head Attention
5.3M256 × 1152
62added—residual1_3
Add
256 × 1152
63added—norm2_3
Layer Norm
2.3K256 × 1152
64added—mlp_3
Feed Forward
11M256 × 1152
65added—residual2_3
Add
256 × 1152
66added—norm1_4
Layer Norm
2.3K256 × 1152
67added—self_attn_4
Multi Head Attention
5.3M256 × 1152
68added—residual1_4
Add
256 × 1152
69added—norm2_4
Layer Norm
2.3K256 × 1152
70added—mlp_4
Feed Forward
11M256 × 1152
71added—residual2_4
Add
256 × 1152
72added—norm1_5
Layer Norm
2.3K256 × 1152
73added—self_attn_5
Multi Head Attention
5.3M256 × 1152
74added—residual1_5
Add
256 × 1152
75added—norm2_5
Layer Norm
2.3K256 × 1152
76added—mlp_5
Feed Forward
11M256 × 1152
77added—residual2_5
Add
256 × 1152
78added—norm1_6
Layer Norm
2.3K256 × 1152
79added—self_attn_6
Multi Head Attention
5.3M256 × 1152
80added—residual1_6
Add
256 × 1152
81added—norm2_6
Layer Norm
2.3K256 × 1152
82added—mlp_6
Feed Forward
11M256 × 1152
83added—residual2_6
Add
256 × 1152
84added—norm1_7
Layer Norm
2.3K256 × 1152
85added—self_attn_7
Multi Head Attention
5.3M256 × 1152
86added—residual1_7
Add
256 × 1152
87added—norm2_7
Layer Norm
2.3K256 × 1152
88added—mlp_7
Feed Forward
11M256 × 1152
89added—residual2_7
Add
256 × 1152
90added—norm1_8
Layer Norm
2.3K256 × 1152
91added—self_attn_8
Multi Head Attention
5.3M256 × 1152
92added—residual1_8
Add
256 × 1152
93added—norm2_8
Layer Norm
2.3K256 × 1152
94added—mlp_8
Feed Forward
11M256 × 1152
95added—residual2_8
Add
256 × 1152
96added—norm1_9
Layer Norm
2.3K256 × 1152
97added—self_attn_9
Multi Head Attention
5.3M256 × 1152
98added—residual1_9
Add
256 × 1152
99added—norm2_9
Layer Norm
2.3K256 × 1152
100added—mlp_9
Feed Forward
11M256 × 1152
101added—residual2_9
Add
256 × 1152
102added—norm1_10
Layer Norm
2.3K256 × 1152
103added—self_attn_10
Multi Head Attention
5.3M256 × 1152
104added—residual1_10
Add
256 × 1152
105added—norm2_10
Layer Norm
2.3K256 × 1152
106added—mlp_10
Feed Forward
11M256 × 1152
107added—residual2_10
Add
256 × 1152
108added—norm1_11
Layer Norm
2.3K256 × 1152
109added—self_attn_11
Multi Head Attention
5.3M256 × 1152
110added—residual1_11
Add
256 × 1152
111added—norm2_11
Layer Norm
2.3K256 × 1152
112added—mlp_11
Feed Forward
11M256 × 1152
113added—residual2_11
Add
256 × 1152
114added—norm1_12
Layer Norm
2.3K256 × 1152
115added—self_attn_12
Multi Head Attention
5.3M256 × 1152
116added—residual1_12
Add
256 × 1152
117added—norm2_12
Layer Norm
2.3K256 × 1152
118added—mlp_12
Feed Forward
11M256 × 1152
119added—residual2_12
Add
256 × 1152
120added—norm1_13
Layer Norm
2.3K256 × 1152
121added—self_attn_13
Multi Head Attention
5.3M256 × 1152
122added—residual1_13
Add
256 × 1152
123added—norm2_13
Layer Norm
2.3K256 × 1152
124added—mlp_13
Feed Forward
11M256 × 1152
125added—residual2_13
Add
256 × 1152
126added—norm1_14
Layer Norm
2.3K256 × 1152
127added—self_attn_14
Multi Head Attention
5.3M256 × 1152
128added—residual1_14
Add
256 × 1152
129added—norm2_14
Layer Norm
2.3K256 × 1152
130added—mlp_14
Feed Forward
11M256 × 1152
131added—residual2_14
Add
256 × 1152
132added—norm1_15
Layer Norm
2.3K256 × 1152
133added—self_attn_15
Multi Head Attention
5.3M256 × 1152
134added—residual1_15
Add
256 × 1152
135added—norm2_15
Layer Norm
2.3K256 × 1152
136added—mlp_15
Feed Forward
11M256 × 1152
137added—residual2_15
Add
256 × 1152
138added—norm1_16
Layer Norm
2.3K256 × 1152
139added—self_attn_16
Multi Head Attention
5.3M256 × 1152
140added—residual1_16
Add
256 × 1152
141added—norm2_16
Layer Norm
2.3K256 × 1152
142added—mlp_16
Feed Forward
11M256 × 1152
143added—residual2_16
Add
256 × 1152
144added—norm1_17
Layer Norm
2.3K256 × 1152
145added—self_attn_17
Multi Head Attention
5.3M256 × 1152
146added—residual1_17
Add
256 × 1152
147added—norm2_17
Layer Norm
2.3K256 × 1152
148added—mlp_17
Feed Forward
11M256 × 1152
149added—residual2_17
Add
256 × 1152
150added—norm1_18
Layer Norm
2.3K256 × 1152
151added—self_attn_18
Multi Head Attention
5.3M256 × 1152
152added—residual1_18
Add
256 × 1152
153added—norm2_18
Layer Norm
2.3K256 × 1152
154added—mlp_18
Feed Forward
11M256 × 1152
155added—residual2_18
Add
256 × 1152
156added—norm1_19
Layer Norm
2.3K256 × 1152
157added—self_attn_19
Multi Head Attention
5.3M256 × 1152
158added—residual1_19
Add
256 × 1152
159added—norm2_19
Layer Norm
2.3K256 × 1152
160added—mlp_19
Feed Forward
11M256 × 1152
161added—residual2_19
Add
256 × 1152
162added—norm1_20
Layer Norm
2.3K256 × 1152
163added—self_attn_20
Multi Head Attention
5.3M256 × 1152
164added—residual1_20
Add
256 × 1152
165added—norm2_20
Layer Norm
2.3K256 × 1152
166added—mlp_20
Feed Forward
11M256 × 1152
167added—residual2_20
Add
256 × 1152
168added—norm1_21
Layer Norm
2.3K256 × 1152
169added—self_attn_21
Multi Head Attention
5.3M256 × 1152
170added—residual1_21
Add
256 × 1152
171added—norm2_21
Layer Norm
2.3K256 × 1152
172added—mlp_21
Feed Forward
11M256 × 1152
173added—residual2_21
Add
256 × 1152
174added—norm1_22
Layer Norm
2.3K256 × 1152
175added—self_attn_22
Multi Head Attention
5.3M256 × 1152
176added—residual1_22
Add
256 × 1152
177added—norm2_22
Layer Norm
2.3K256 × 1152
178added—mlp_22
Feed Forward
11M256 × 1152
179added—residual2_22
Add
256 × 1152
180added—norm1_23
Layer Norm
2.3K256 × 1152
181added—self_attn_23
Multi Head Attention
5.3M256 × 1152
182added—residual1_23
Add
256 × 1152
183added—norm2_23
Layer Norm
2.3K256 × 1152
184added—mlp_23
Feed Forward
11M256 × 1152
185added—residual2_23
Add
256 × 1152
186added—norm1_24
Layer Norm
2.3K256 × 1152
187added—self_attn_24
Multi Head Attention
5.3M256 × 1152
188added—residual1_24
Add
256 × 1152
189added—norm2_24
Layer Norm
2.3K256 × 1152
190added—mlp_24
Feed Forward
11M256 × 1152
191added—residual2_24
Add
256 × 1152
192added—norm1_25
Layer Norm
2.3K256 × 1152
193added—self_attn_25
Multi Head Attention
5.3M256 × 1152
194added—residual1_25
Add
256 × 1152
195added—norm2_25
Layer Norm
2.3K256 × 1152
196added—mlp_25
Feed Forward
11M256 × 1152
197added—residual2_25
Add
256 × 1152
198added—norm1_26
Layer Norm
2.3K256 × 1152
199added—self_attn_26
Multi Head Attention
5.3M256 × 1152
200added—residual1_26
Add
256 × 1152
201added—norm2_26
Layer Norm
2.3K256 × 1152
202added—mlp_26
Feed Forward
11M256 × 1152
203added—residual2_26
Add
256 × 1152
204added—norm1_27
Layer Norm
2.3K256 × 1152
205added—self_attn_27
Multi Head Attention
5.3M256 × 1152
206added—residual1_27
Add
256 × 1152
207added—norm2_27
Layer Norm
2.3K256 × 1152
208added—mlp_27
Feed Forward
11M256 × 1152
209added—residual2_27
Add
256 × 1152
210added—norm1_28
Layer Norm
2.3K256 × 1152
211added—self_attn_28
Multi Head Attention
5.3M256 × 1152
212added—residual1_28
Add
256 × 1152
213added—norm2_28
Layer Norm
2.3K256 × 1152
214added—mlp_28
Feed Forward
11M256 × 1152
215added—residual2_28
Add
256 × 1152
216added—final_norm
Layer Norm
2.3K256 × 1152
217added—unpatchify
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.