◀ 上一页
1 / 5
下一页 ▶
SDXL + ControlNet Canny 宏观架构
从条件编码、完整 denoiser 到 VAE 解码;关键 shape 均取自 CNXL-CANNY-FULL 的实测记录。
1. SDXL + ControlNet Canny 宏观架构
从条件编码、完整 denoiser 到 VAE 解码;关键 shape 均取自 CNXL-CANNY-FULL 的实测记录。
CNXL-CANNY-FULL
Prompt
token IDs
CLIP-L
OpenCLIP bigG
完整文本编码器
[1, 77, 2048]
Noisy latent / tokens
batch = 1
[1, 4, 128, 128]
ControlNet Condition
Canny / latent condition
[1, 3, 1024, 1024]
UNet2DConditionModel
Dual-CLIP Control residual
完整生产层数,未折叠
[1, 4, 128, 128]
VAE Decoder
latent → pixels
[1, 3, 1024, 1024]
Final image
[1, 3, 1024, 1024]
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
条件编码与分支组装
保留所有实际执行的文本与图像条件分支;输出 shape 与 merge 方式分别标注。
2. 条件编码与分支组装
保留所有实际执行的文本与图像条件分支;输出 shape 与 merge 方式分别标注。
CNXL-CANNY-FULL
CLIP-L
Layers ×12
hidden 768 · heads 12
[1, 77, 768]
OpenCLIP bigG
Layers ×32
hidden 1280 · heads 20
[1, 77, 1280]
Dual condition merge
sequence condition + pooled/global condition
[1, 77, 2048]
ControlNet Condition
Canny / latent condition
[1, 3, 1024, 1024]
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
完整 U-Net 多尺度拓扑
Down / Mid / Up 全部生产层均执行;橙色虚线表示 skip connection,shape 为 batch 1。
3. 完整 U-Net 多尺度拓扑
Down / Mid / Up 全部生产层均执行;橙色虚线表示 skip connection,shape 为 batch 1。
CNXL-CANNY-FULL
Down 0
ResNet×2
ResNet only
320×128×128
Down 1
ResNet×2
CrossAttn
640×64×64
Down 2
ResNet×2
CrossAttn
1280×32×32
Mid
ResNet
CrossAttn
1280×32×32
Up 0
ResNet×3
CrossAttn
1280×32×32
Up 1
ResNet×3
CrossAttn
640×64×64
Up 2
ResNet×3
ResNet only
320×128×128
skip 0: 320×128²
skip 1: 640×64²
skip 2: 1280×32²
input [1, 4, 128, 128]
output [1, 4, 128, 128]
Conv_in 4→320 · Conv_out 320→4 · layers_per_block=2
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
核心算子与任务差异
ResNet、时间步注入、空间自注意力与文本交叉注意力;分支差异单独说明。
4. 核心算子与任务差异
ResNet、时间步注入、空间自注意力与文本交叉注意力;分支差异单独说明。
CNXL-CANNY-FULL
ResnetBlock2D
GroupNorm + SiLU + Conv
Add time embedding
GroupNorm + Dropout + Conv
Residual / shortcut add
Transformer2DModel
Norm → Self Attention
Q=K=V=image tokens
Norm → Cross Attention
K=V=context [1, 77, 2048]
Norm → GEGLU / MLP
residual after every sublayer
ControlNet residual 在对应 Down/Mid 特征级注入;不是额外输入通道拼接。
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep
VAE 边界与运行证据
VAE 仅把运行中真实执行的 Encode/Decode 标为 ACTUAL-CUDA;中间通道阶梯来自固定配置。
5. VAE 边界与运行证据
VAE 仅把运行中真实执行的 Encode/Decode 标为 ACTUAL-CUDA;中间通道阶梯来自固定配置。
CNXL-CANNY-FULL
Denoised latent
actual denoiser output
[1, 4, 128, 128]
VAE Decoder
MidBlock + UpDecoder ×4
spatial upsample ×8
[1, 3, 1024, 1024]
Pixel output
native 1024²
[1, 3, 1024, 1024]
STATIC-CONFIG 通道阶梯:512 → 512 → 256 → 128;latent_channels=4
Trace evidence
实例化参数合计
4.720B
峰值 CUDA allocated
7.50 GiB
行级 shape
4,476 rows / 114,791 hits
模块级 shape
3,232 rows / 3,256 hits
运行边界
native 1024² · batch 1
随机初始化 BF16
结构/shape 学习证据;不代表生成质量
ACTUAL-CUDA-FULL-TOPOLOGY
BF16 · NVIDIA A100-SXM4-40GB · native 1024² · 1 shape-equivalent denoiser timestep