SUPRA-Tex: 3D Generation with Super-Aligned Texture
rename_dict = {
"decoder.conv_in.bias": "first_stage_model.decoder.conv_in.bias",
"decoder.conv_in.weight": "first_stage_model.decoder.conv_in.weight",
"decoder.conv_norm_out.bias": "first_stage_model.decoder.norm_out.bias",
"decoder.conv_norm_out.weight": "first_stage_model.decoder.norm_out.weight",
"decoder.conv_out.bias": "first_stage_model.decoder.conv_out.bias",
"decoder.conv_out.weight": "first_stage_model.decoder.conv_out.weight",
"decoder.mid_block.attentions.0.group_norm.bias": "first_stage_model.decoder.mid.attn_1.norm.bias",
"decoder.mid_block.attentions.0.group_norm.weight": "first_stage_model.decoder.mid.attn_1.norm.weight",
"decoder.mid_block.attentions.0.to_k.bias": "first_stage_model.decoder.mid.attn_1.k.bias",
"decoder.mid_block.attentions.0.to_k.weight": "first_stage_model.decoder.mid.attn_1.k.weight",
"decoder.mid_block.attentions.0.to_out.0.bias": "first_stage_model.decoder.mid.attn_1.proj_out.bias",
"decoder.mid_block.attentions.0.to_out.0.weight": "first_stage_model.decoder.mid.attn_1.proj_out.weight",
"decoder.mid_block.attentions.0.to_q.bias": "first_stage_model.decoder.mid.attn_1.q.bias",
"decoder.mid_block.attentions.0.to_q.weight": "first_stage_model.decoder.mid.attn_1.q.weight",
"decoder.mid_block.attentions.0.to_v.bias": "first_stage_model.decoder.mid.attn_1.v.bias",
"decoder.mid_block.attentions.0.to_v.weight": "first_stage_model.decoder.mid.attn_1.v.weight",
"decoder.mid_block.resnets.0.conv1.bias": "first_stage_model.decoder.mid.block_1.conv1.bias",
"decoder.mid_block.resnets.0.conv1.weight": "first_stage_model.decoder.mid.block_1.conv1.weight",
"decoder.mid_block.resnets.0.conv2.bias": "first_stage_model.decoder.mid.block_1.conv2.bias",
"decoder.mid_block.resnets.0.conv2.weight": "first_stage_model.decoder.mid.block_1.conv2.weight",
"decoder.mid_block.resnets.0.norm1.bias": "first_stage_model.decoder.mid.block_1.norm1.bias",
"decoder.mid_block.resnets.0.norm1.weight": "first_stage_model.decoder.mid.block_1.norm1.weight",
"decoder.mid_block.resnets.0.norm2.bias": "first_stage_model.decoder.mid.block_1.norm2.bias",
"decoder.mid_block.resnets.0.norm2.weight": "first_stage_model.decoder.mid.block_1.norm2.weight",
"decoder.mid_block.resnets.1.conv1.bias": "first_stage_model.decoder.mid.block_2.conv1.bias",
"decoder.mid_block.resnets.1.conv1.weight": "first_stage_model.decoder.mid.block_2.conv1.weight",
"decoder.mid_block.resnets.1.conv2.bias": "first_stage_model.decoder.mid.block_2.conv2.bias",
"decoder.mid_block.resnets.1.conv2.weight": "first_stage_model.decoder.mid.block_2.conv2.weight",
"decoder.mid_block.resnets.1.norm1.bias": "first_stage_model.decoder.mid.block_2.norm1.bias",
"decoder.mid_block.resnets.1.norm1.weight": "first_stage_model.decoder.mid.block_2.norm1.weight",
"decoder.mid_block.resnets.1.norm2.bias": "first_stage_model.decoder.mid.block_2.norm2.bias",
"decoder.mid_block.resnets.1.norm2.weight": "first_stage_model.decoder.mid.block_2.norm2.weight",
"decoder.up_blocks.0.resnets.0.conv1.bias": "first_stage_model.decoder.up.3.block.0.conv1.bias",
"decoder.up_blocks.0.resnets.0.conv1.weight": "first_stage_model.decoder.up.3.block.0.conv1.weight",
"decoder.up_blocks.0.resnets.0.conv2.bias": "first_stage_model.decoder.up.3.block.0.conv2.bias",
"decoder.up_blocks.0.resnets.0.conv2.weight": "first_stage_model.decoder.up.3.block.0.conv2.weight",
"decoder.up_blocks.0.resnets.0.norm1.bias": "first_stage_model.decoder.up.3.block.0.norm1.bias",
"decoder.up_blocks.0.resnets.0.norm1.weight": "first_stage_model.decoder.up.3.block.0.norm1.weight",
"decoder.up_blocks.0.resnets.0.norm2.bias": "first_stage_model.decoder.up.3.block.0.norm2.bias",
"decoder.up_blocks.0.resnets.0.norm2.weight": "first_stage_model.decoder.up.3.block.0.norm2.weight",
"decoder.up_blocks.0.resnets.1.conv1.bias": "first_stage_model.decoder.up.3.block.1.conv1.bias",
"decoder.up_blocks.0.resnets.1.conv1.weight": "first_stage_model.decoder.up.3.block.1.conv1.weight",
"decoder.up_blocks.0.resnets.1.conv2.bias": "first_stage_model.decoder.up.3.block.1.conv2.bias",
"decoder.up_blocks.0.resnets.1.conv2.weight": "first_stage_model.decoder.up.3.block.1.conv2.weight",
"decoder.up_blocks.0.resnets.1.norm1.bias": "first_stage_model.decoder.up.3.block.1.norm1.bias",
"decoder.up_blocks.0.resnets.1.norm1.weight": "first_stage_model.decoder.up.3.block.1.norm1.weight",
"decoder.up_blocks.0.resnets.1.norm2.bias": "first_stage_model.decoder.up.3.block.1.norm2.bias",
"decoder.up_blocks.0.resnets.1.norm2.weight": "first_stage_model.decoder.up.3.block.1.norm2.weight",
"decoder.up_blocks.0.resnets.2.conv1.bias": "first_stage_model.decoder.up.3.block.2.conv1.bias",
"decoder.up_blocks.0.resnets.2.conv1.weight": "first_stage_model.decoder.up.3.block.2.conv1.weight",
"decoder.up_blocks.0.resnets.2.conv2.bias": "first_stage_model.decoder.up.3.block.2.conv2.bias",
"decoder.up_blocks.0.resnets.2.conv2.weight": "first_stage_model.decoder.up.3.block.2.conv2.weight",
"decoder.up_blocks.0.resnets.2.norm1.bias": "first_stage_model.decoder.up.3.block.2.norm1.bias",
"decoder.up_blocks.0.resnets.2.norm1.weight": "first_stage_model.decoder.up.3.block.2.norm1.weight",
"decoder.up_blocks.0.resnets.2.norm2.bias": "first_stage_model.decoder.up.3.block.2.norm2.bias",
"decoder.up_blocks.0.resnets.2.norm2.weight": "first_stage_model.decoder.up.3.block.2.norm2.weight",
"decoder.up_blocks.0.upsamplers.0.conv.bias": "first_stage_model.decoder.up.3.upsample.conv.bias",
"decoder.up_blocks.0.upsamplers.0.conv.weight": "first_stage_model.decoder.up.3.upsample.conv.weight",
"decoder.up_blocks.1.resnets.0.conv1.bias": "first_stage_model.decoder.up.2.block.0.conv1.bias",
"decoder.up_blocks.1.resnets.0.conv1.weight": "first_stage_model.decoder.up.2.block.0.conv1.weight",
"decoder.up_blocks.1.resnets.0.conv2.bias": "first_stage_model.decoder.up.2.block.0.conv2.bias",
"decoder.up_blocks.1.resnets.0.conv2.weight": "first_stage_model.decoder.up.2.block.0.conv2.weight",
"decoder.up_blocks.1.resnets.0.norm1.bias": "first_stage_model.decoder.up.2.block.0.norm1.bias",
"decoder.up_blocks.1.resnets.0.norm1.weight": "first_stage_model.decoder.up.2.block.0.norm1.weight",
"decoder.up_blocks.1.resnets.0.norm2.bias": "first_stage_model.decoder.up.2.block.0.norm2.bias",
"decoder.up_blocks.1.resnets.0.norm2.weight": "first_stage_model.decoder.up.2.block.0.norm2.weight",
"decoder.up_blocks.1.resnets.1.conv1.bias": "first_stage_model.decoder.up.2.block.1.conv1.bias",
"decoder.up_blocks.1.resnets.1.conv1.weight": "first_stage_model.decoder.up.2.block.1.conv1.weight",
"decoder.up_blocks.1.resnets.1.conv2.bias": "first_stage_model.decoder.up.2.block.1.conv2.bias",
"decoder.up_blocks.1.resnets.1.conv2.weight": "first_stage_model.decoder.up.2.block.1.conv2.weight",
"decoder.up_blocks.1.resnets.1.norm1.bias": "first_stage_model.decoder.up.2.block.1.norm1.bias",
"decoder.up_blocks.1.resnets.1.norm1.weight": "first_stage_model.decoder.up.2.block.1.norm1.weight",
"decoder.up_blocks.1.resnets.1.norm2.bias": "first_stage_model.decoder.up.2.block.1.norm2.bias",
"decoder.up_blocks.1.resnets.1.norm2.weight": "first_stage_model.decoder.up.2.block.1.norm2.weight",
"decoder.up_blocks.1.resnets.2.conv1.bias": "first_stage_model.decoder.up.2.block.2.conv1.bias",
"decoder.up_blocks.1.resnets.2.conv1.weight": "first_stage_model.decoder.up.2.block.2.conv1.weight",
"decoder.up_blocks.1.resnets.2.conv2.bias": "first_stage_model.decoder.up.2.block.2.conv2.bias",
"decoder.up_blocks.1.resnets.2.conv2.weight": "first_stage_model.decoder.up.2.block.2.conv2.weight",
"decoder.up_blocks.1.resnets.2.norm1.bias": "first_stage_model.decoder.up.2.block.2.norm1.bias",
"decoder.up_blocks.1.resnets.2.norm1.weight": "first_stage_model.decoder.up.2.block.2.norm1.weight",
"decoder.up_blocks.1.resnets.2.norm2.bias": "first_stage_model.decoder.up.2.block.2.norm2.bias",
"decoder.up_blocks.1.resnets.2.norm2.weight": "first_stage_model.decoder.up.2.block.2.norm2.weight",
"decoder.up_blocks.1.upsamplers.0.conv.bias": "first_stage_model.decoder.up.2.upsample.conv.bias",
"decoder.up_blocks.1.upsamplers.0.conv.weight": "first_stage_model.decoder.up.2.upsample.conv.weight",
"decoder.up_blocks.2.resnets.0.conv1.bias": "first_stage_model.decoder.up.1.block.0.conv1.bias",
"decoder.up_blocks.2.resnets.0.conv1.weight": "first_stage_model.decoder.up.1.block.0.conv1.weight",
"decoder.up_blocks.2.resnets.0.conv2.bias": "first_stage_model.decoder.up.1.block.0.conv2.bias",
"decoder.up_blocks.2.resnets.0.conv2.weight": "first_stage_model.decoder.up.1.block.0.conv2.weight",
"decoder.up_blocks.2.resnets.0.conv_shortcut.bias": "first_stage_model.decoder.up.1.block.0.nin_shortcut.bias",
"decoder.up_blocks.2.resnets.0.conv_shortcut.weight": "first_stage_model.decoder.up.1.block.0.nin_shortcut.weight",
"decoder.up_blocks.2.resnets.0.norm1.bias": "first_stage_model.decoder.up.1.block.0.norm1.bias",
"decoder.up_blocks.2.resnets.0.norm1.weight": "first_stage_model.decoder.up.1.block.0.norm1.weight",
"decoder.up_blocks.2.resnets.0.norm2.bias": "first_stage_model.decoder.up.1.block.0.norm2.bias",
"decoder.up_blocks.2.resnets.0.norm2.weight": "first_stage_model.decoder.up.1.block.0.norm2.weight",
"decoder.up_blocks.2.resnets.1.conv1.bias": "first_stage_model.decoder.up.1.block.1.conv1.bias",
"decoder.up_blocks.2.resnets.1.conv1.weight": "first_stage_model.decoder.up.1.block.1.conv1.weight",
"decoder.up_blocks.2.resnets.1.conv2.bias": "first_stage_model.decoder.up.1.block.1.conv2.bias",
"decoder.up_blocks.2.resnets.1.conv2.weight": "first_stage_model.decoder.up.1.block.1.conv2.weight",
"decoder.up_blocks.2.resnets.1.norm1.bias": "first_stage_model.decoder.up.1.block.1.norm1.bias",
"decoder.up_blocks.2.resnets.1.norm1.weight": "first_stage_model.decoder.up.1.block.1.norm1.weight",
"decoder.up_blocks.2.resnets.1.norm2.bias": "first_stage_model.decoder.up.1.block.1.norm2.bias",
"decoder.up_blocks.2.resnets.1.norm2.weight": "first_stage_model.decoder.up.1.block.1.norm2.weight",
"decoder.up_blocks.2.resnets.2.conv1.bias": "first_stage_model.decoder.up.1.block.2.conv1.bias",
"decoder.up_blocks.2.resnets.2.conv1.weight": "first_stage_model.decoder.up.1.block.2.conv1.weight",
"decoder.up_blocks.2.resnets.2.conv2.bias": "first_stage_model.decoder.up.1.block.2.conv2.bias",
"decoder.up_blocks.2.resnets.2.conv2.weight": "first_stage_model.decoder.up.1.block.2.conv2.weight",
"decoder.up_blocks.2.resnets.2.norm1.bias": "first_stage_model.decoder.up.1.block.2.norm1.bias",
"decoder.up_blocks.2.resnets.2.norm1.weight": "first_stage_model.decoder.up.1.block.2.norm1.weight",
"decoder.up_blocks.2.resnets.2.norm2.bias": "first_stage_model.decoder.up.1.block.2.norm2.bias",
"decoder.up_blocks.2.resnets.2.norm2.weight": "first_stage_model.decoder.up.1.block.2.norm2.weight",
"decoder.up_blocks.2.upsamplers.0.conv.bias": "first_stage_model.decoder.up.1.upsample.conv.bias",
"decoder.up_blocks.2.upsamplers.0.conv.weight": "first_stage_model.decoder.up.1.upsample.conv.weight",
"decoder.up_blocks.3.resnets.0.conv1.bias": "first_stage_model.decoder.up.0.block.0.conv1.bias",
"decoder.up_blocks.3.resnets.0.conv1.weight": "first_stage_model.decoder.up.0.block.0.conv1.weight",
"decoder.up_blocks.3.resnets.0.conv2.bias": "first_stage_model.decoder.up.0.block.0.conv2.bias",
"decoder.up_blocks.3.resnets.0.conv2.weight": "first_stage_model.decoder.up.0.block.0.conv2.weight",
"decoder.up_blocks.3.resnets.0.conv_shortcut.bias": "first_stage_model.decoder.up.0.block.0.nin_shortcut.bias",
"decoder.up_blocks.3.resnets.0.conv_shortcut.weight": "first_stage_model.decoder.up.0.block.0.nin_shortcut.weight",
"decoder.up_blocks.3.resnets.0.norm1.bias": "first_stage_model.decoder.up.0.block.0.norm1.bias",
"decoder.up_blocks.3.resnets.0.norm1.weight": "first_stage_model.decoder.up.0.block.0.norm1.weight",
"decoder.up_blocks.3.resnets.0.norm2.bias": "first_stage_model.decoder.up.0.block.0.norm2.bias",
"decoder.up_blocks.3.resnets.0.norm2.weight": "first_stage_model.decoder.up.0.block.0.norm2.weight",
"decoder.up_blocks.3.resnets.1.conv1.bias": "first_stage_model.decoder.up.0.block.1.conv1.bias",
"decoder.up_blocks.3.resnets.1.conv1.weight": "first_stage_model.decoder.up.0.block.1.conv1.weight",
"decoder.up_blocks.3.resnets.1.conv2.bias": "first_stage_model.decoder.up.0.block.1.conv2.bias",
"decoder.up_blocks.3.resnets.1.conv2.weight": "first_stage_model.decoder.up.0.block.1.conv2.weight",
"decoder.up_blocks.3.resnets.1.norm1.bias": "first_stage_model.decoder.up.0.block.1.norm1.bias",
"decoder.up_blocks.3.resnets.1.norm1.weight": "first_stage_model.decoder.up.0.block.1.norm1.weight",
"decoder.up_blocks.3.resnets.1.norm2.bias": "first_stage_model.decoder.up.0.block.1.norm2.bias",
"decoder.up_blocks.3.resnets.1.norm2.weight": "first_stage_model.decoder.up.0.block.1.norm2.weight",
"decoder.up_blocks.3.resnets.2.conv1.bias": "first_stage_model.decoder.up.0.block.2.conv1.bias",
"decoder.up_blocks.3.resnets.2.conv1.weight": "first_stage_model.decoder.up.0.block.2.conv1.weight",
"decoder.up_blocks.3.resnets.2.conv2.bias": "first_stage_model.decoder.up.0.block.2.conv2.bias",
"decoder.up_blocks.3.resnets.2.conv2.weight": "first_stage_model.decoder.up.0.block.2.conv2.weight",
"decoder.up_blocks.3.resnets.2.norm1.bias": "first_stage_model.decoder.up.0.block.2.norm1.bias",
"decoder.up_blocks.3.resnets.2.norm1.weight": "first_stage_model.decoder.up.0.block.2.norm1.weight",
"decoder.up_blocks.3.resnets.2.norm2.bias": "first_stage_model.decoder.up.0.block.2.norm2.bias",
"decoder.up_blocks.3.resnets.2.norm2.weight": "first_stage_model.decoder.up.0.block.2.norm2.weight",
"encoder.conv_in.bias": "first_stage_model.encoder.conv_in.bias",
"encoder.conv_in.weight": "first_stage_model.encoder.conv_in.weight",
"encoder.conv_norm_out.bias": "first_stage_model.encoder.norm_out.bias",
"encoder.conv_norm_out.weight": "first_stage_model.encoder.norm_out.weight",
"encoder.conv_out.bias": "first_stage_model.encoder.conv_out.bias",
"encoder.conv_out.weight": "first_stage_model.encoder.conv_out.weight",
"encoder.down_blocks.0.downsamplers.0.conv.bias": "first_stage_model.encoder.down.0.downsample.conv.bias",
"encoder.down_blocks.0.downsamplers.0.conv.weight": "first_stage_model.encoder.down.0.downsample.conv.weight",
"encoder.down_blocks.0.resnets.0.conv1.bias": "first_stage_model.encoder.down.0.block.0.conv1.bias",
"encoder.down_blocks.0.resnets.0.conv1.weight": "first_stage_model.encoder.down.0.block.0.conv1.weight",
"encoder.down_blocks.0.resnets.0.conv2.bias": "first_stage_model.encoder.down.0.block.0.conv2.bias",
"encoder.down_blocks.0.resnets.0.conv2.weight": "first_stage_model.encoder.down.0.block.0.conv2.weight",
"encoder.down_blocks.0.resnets.0.norm1.bias": "first_stage_model.encoder.down.0.block.0.norm1.bias",
"encoder.down_blocks.0.resnets.0.norm1.weight": "first_stage_model.encoder.down.0.block.0.norm1.weight",
"encoder.down_blocks.0.resnets.0.norm2.bias": "first_stage_model.encoder.down.0.block.0.norm2.bias",
"encoder.down_blocks.0.resnets.0.norm2.weight": "first_stage_model.encoder.down.0.block.0.norm2.weight",
"encoder.down_blocks.0.resnets.1.conv1.bias": "first_stage_model.encoder.down.0.block.1.conv1.bias",
"encoder.down_blocks.0.resnets.1.conv1.weight": "first_stage_model.encoder.down.0.block.1.conv1.weight",
"encoder.down_blocks.0.resnets.1.conv2.bias": "first_stage_model.encoder.down.0.block.1.conv2.bias",
"encoder.down_blocks.0.resnets.1.conv2.weight": "first_stage_model.encoder.down.0.block.1.conv2.weight",
"encoder.down_blocks.0.resnets.1.norm1.bias": "first_stage_model.encoder.down.0.block.1.norm1.bias",
"encoder.down_blocks.0.resnets.1.norm1.weight": "first_stage_model.encoder.down.0.block.1.norm1.weight",
"encoder.down_blocks.0.resnets.1.norm2.bias": "first_stage_model.encoder.down.0.block.1.norm2.bias",
"encoder.down_blocks.0.resnets.1.norm2.weight": "first_stage_model.encoder.down.0.block.1.norm2.weight",
"encoder.down_blocks.1.downsamplers.0.conv.bias": "first_stage_model.encoder.down.1.downsample.conv.bias",
"encoder.down_blocks.1.downsamplers.0.conv.weight": "first_stage_model.encoder.down.1.downsample.conv.weight",
"encoder.down_blocks.1.resnets.0.conv1.bias": "first_stage_model.encoder.down.1.block.0.conv1.bias",
"encoder.down_blocks.1.resnets.0.conv1.weight": "first_stage_model.encoder.down.1.block.0.conv1.weight",
"encoder.down_blocks.1.resnets.0.conv2.bias": "first_stage_model.encoder.down.1.block.0.conv2.bias",
"encoder.down_blocks.1.resnets.0.conv2.weight": "first_stage_model.encoder.down.1.block.0.conv2.weight",
"encoder.down_blocks.1.resnets.0.conv_shortcut.bias": "first_stage_model.encoder.down.1.block.0.nin_shortcut.bias",
"encoder.down_blocks.1.resnets.0.conv_shortcut.weight": "first_stage_model.encoder.down.1.block.0.nin_shortcut.weight",
"encoder.down_blocks.1.resnets.0.norm1.bias": "first_stage_model.encoder.down.1.block.0.norm1.bias",
"encoder.down_blocks.1.resnets.0.norm1.weight": "first_stage_model.encoder.down.1.block.0.norm1.weight",
"encoder.down_blocks.1.resnets.0.norm2.bias": "first_stage_model.encoder.down.1.block.0.norm2.bias",
"encoder.down_blocks.1.resnets.0.norm2.weight": "first_stage_model.encoder.down.1.block.0.norm2.weight",
"encoder.down_blocks.1.resnets.1.conv1.bias": "first_stage_model.encoder.down.1.block.1.conv1.bias",
"encoder.down_blocks.1.resnets.1.conv1.weight": "first_stage_model.encoder.down.1.block.1.conv1.weight",
"encoder.down_blocks.1.resnets.1.conv2.bias": "first_stage_model.encoder.down.1.block.1.conv2.bias",
"encoder.down_blocks.1.resnets.1.conv2.weight": "first_stage_model.encoder.down.1.block.1.conv2.weight",
"encoder.down_blocks.1.resnets.1.norm1.bias": "first_stage_model.encoder.down.1.block.1.norm1.bias",
"encoder.down_blocks.1.resnets.1.norm1.weight": "first_stage_model.encoder.down.1.block.1.norm1.weight",
"encoder.down_blocks.1.resnets.1.norm2.bias": "first_stage_model.encoder.down.1.block.1.norm2.bias",
"encoder.down_blocks.1.resnets.1.norm2.weight": "first_stage_model.encoder.down.1.block.1.norm2.weight",
"encoder.down_blocks.2.downsamplers.0.conv.bias": "first_stage_model.encoder.down.2.downsample.conv.bias",
"encoder.down_blocks.2.downsamplers.0.conv.weight": "first_stage_model.encoder.down.2.downsample.conv.weight",
"encoder.down_blocks.2.resnets.0.conv1.bias": "first_stage_model.encoder.down.2.block.0.conv1.bias",
"encoder.down_blocks.2.resnets.0.conv1.weight": "first_stage_model.encoder.down.2.block.0.conv1.weight",
"encoder.down_blocks.2.resnets.0.conv2.bias": "first_stage_model.encoder.down.2.block.0.conv2.bias",
"encoder.down_blocks.2.resnets.0.conv2.weight": "first_stage_model.encoder.down.2.block.0.conv2.weight",
"encoder.down_blocks.2.resnets.0.conv_shortcut.bias": "first_stage_model.encoder.down.2.block.0.nin_shortcut.bias",
"encoder.down_blocks.2.resnets.0.conv_shortcut.weight": "first_stage_model.encoder.down.2.block.0.nin_shortcut.weight",
"encoder.down_blocks.2.resnets.0.norm1.bias": "first_stage_model.encoder.down.2.block.0.norm1.bias",
"encoder.down_blocks.2.resnets.0.norm1.weight": "first_stage_model.encoder.down.2.block.0.norm1.weight",
"encoder.down_blocks.2.resnets.0.norm2.bias": "first_stage_model.encoder.down.2.block.0.norm2.bias",
"encoder.down_blocks.2.resnets.0.norm2.weight": "first_stage_model.encoder.down.2.block.0.norm2.weight",
"encoder.down_blocks.2.resnets.1.conv1.bias": "first_stage_model.encoder.down.2.block.1.conv1.bias",
"encoder.down_blocks.2.resnets.1.conv1.weight": "first_stage_model.encoder.down.2.block.1.conv1.weight",
"encoder.down_blocks.2.resnets.1.conv2.bias": "first_stage_model.encoder.down.2.block.1.conv2.bias",
"encoder.down_blocks.2.resnets.1.conv2.weight": "first_stage_model.encoder.down.2.block.1.conv2.weight",
"encoder.down_blocks.2.resnets.1.norm1.bias": "first_stage_model.encoder.down.2.block.1.norm1.bias",
"encoder.down_blocks.2.resnets.1.norm1.weight": "first_stage_model.encoder.down.2.block.1.norm1.weight",
"encoder.down_blocks.2.resnets.1.norm2.bias": "first_stage_model.encoder.down.2.block.1.norm2.bias",
"encoder.down_blocks.2.resnets.1.norm2.weight": "first_stage_model.encoder.down.2.block.1.norm2.weight",
"encoder.down_blocks.3.resnets.0.conv1.bias": "first_stage_model.encoder.down.3.block.0.conv1.bias",
"encoder.down_blocks.3.resnets.0.conv1.weight": "first_stage_model.encoder.down.3.block.0.conv1.weight",
"encoder.down_blocks.3.resnets.0.conv2.bias": "first_stage_model.encoder.down.3.block.0.conv2.bias",
"encoder.down_blocks.3.resnets.0.conv2.weight": "first_stage_model.encoder.down.3.block.0.conv2.weight",
"encoder.down_blocks.3.resnets.0.norm1.bias": "first_stage_model.encoder.down.3.block.0.norm1.bias",
"encoder.down_blocks.3.resnets.0.norm1.weight": "first_stage_model.encoder.down.3.block.0.norm1.weight",
"encoder.down_blocks.3.resnets.0.norm2.bias": "first_stage_model.encoder.down.3.block.0.norm2.bias",
"encoder.down_blocks.3.resnets.0.norm2.weight": "first_stage_model.encoder.down.3.block.0.norm2.weight",
"encoder.down_blocks.3.resnets.1.conv1.bias": "first_stage_model.encoder.down.3.block.1.conv1.bias",
"encoder.down_blocks.3.resnets.1.conv1.weight": "first_stage_model.encoder.down.3.block.1.conv1.weight",
"encoder.down_blocks.3.resnets.1.conv2.bias": "first_stage_model.encoder.down.3.block.1.conv2.bias",
"encoder.down_blocks.3.resnets.1.conv2.weight": "first_stage_model.encoder.down.3.block.1.conv2.weight",
"encoder.down_blocks.3.resnets.1.norm1.bias": "first_stage_model.encoder.down.3.block.1.norm1.bias",
"encoder.down_blocks.3.resnets.1.norm1.weight": "first_stage_model.encoder.down.3.block.1.norm1.weight",
"encoder.down_blocks.3.resnets.1.norm2.bias": "first_stage_model.encoder.down.3.block.1.norm2.bias",
"encoder.down_blocks.3.resnets.1.norm2.weight": "first_stage_model.encoder.down.3.block.1.norm2.weight",
"encoder.mid_block.attentions.0.group_norm.bias": "first_stage_model.encoder.mid.attn_1.norm.bias",
"encoder.mid_block.attentions.0.group_norm.weight": "first_stage_model.encoder.mid.attn_1.norm.weight",
"encoder.mid_block.attentions.0.to_k.bias": "first_stage_model.encoder.mid.attn_1.k.bias",
"encoder.mid_block.attentions.0.to_k.weight": "first_stage_model.encoder.mid.attn_1.k.weight",
"encoder.mid_block.attentions.0.to_out.0.bias": "first_stage_model.encoder.mid.attn_1.proj_out.bias",
"encoder.mid_block.attentions.0.to_out.0.weight": "first_stage_model.encoder.mid.attn_1.proj_out.weight",
"encoder.mid_block.attentions.0.to_q.bias": "first_stage_model.encoder.mid.attn_1.q.bias",
"encoder.mid_block.attentions.0.to_q.weight": "first_stage_model.encoder.mid.attn_1.q.weight",
"encoder.mid_block.attentions.0.to_v.bias": "first_stage_model.encoder.mid.attn_1.v.bias",
"encoder.mid_block.attentions.0.to_v.weight": "first_stage_model.encoder.mid.attn_1.v.weight",
"encoder.mid_block.resnets.0.conv1.bias": "first_stage_model.encoder.mid.block_1.conv1.bias",
"encoder.mid_block.resnets.0.conv1.weight": "first_stage_model.encoder.mid.block_1.conv1.weight",
"encoder.mid_block.resnets.0.conv2.bias": "first_stage_model.encoder.mid.block_1.conv2.bias",
"encoder.mid_block.resnets.0.conv2.weight": "first_stage_model.encoder.mid.block_1.conv2.weight",
"encoder.mid_block.resnets.0.norm1.bias": "first_stage_model.encoder.mid.block_1.norm1.bias",
"encoder.mid_block.resnets.0.norm1.weight": "first_stage_model.encoder.mid.block_1.norm1.weight",
"encoder.mid_block.resnets.0.norm2.bias": "first_stage_model.encoder.mid.block_1.norm2.bias",
"encoder.mid_block.resnets.0.norm2.weight": "first_stage_model.encoder.mid.block_1.norm2.weight",
"encoder.mid_block.resnets.1.conv1.bias": "first_stage_model.encoder.mid.block_2.conv1.bias",
"encoder.mid_block.resnets.1.conv1.weight": "first_stage_model.encoder.mid.block_2.conv1.weight",
"encoder.mid_block.resnets.1.conv2.bias": "first_stage_model.encoder.mid.block_2.conv2.bias",
"encoder.mid_block.resnets.1.conv2.weight": "first_stage_model.encoder.mid.block_2.conv2.weight",
"encoder.mid_block.resnets.1.norm1.bias": "first_stage_model.encoder.mid.block_2.norm1.bias",
"encoder.mid_block.resnets.1.norm1.weight": "first_stage_model.encoder.mid.block_2.norm1.weight",
"encoder.mid_block.resnets.1.norm2.bias": "first_stage_model.encoder.mid.block_2.norm2.bias",
"encoder.mid_block.resnets.1.norm2.weight": "first_stage_model.encoder.mid.block_2.norm2.weight",
"post_quant_conv.bias": "first_stage_model.post_quant_conv.bias",
"post_quant_conv.weight": "first_stage_model.post_quant_conv.weight",
"quant_conv.bias": "first_stage_model.quant_conv.bias",
"quant_conv.weight": "first_stage_model.quant_conv.weight",
}
def SDXLVAEStateDictConverter_Original2Diffusers(state_dict):
state_dict_ = {name: state_dict[rename_dict[name]] for name in rename_dict if rename_dict[name] in state_dict}
for name in [
"encoder.mid_block.attentions.0.to_q.weight",
"encoder.mid_block.attentions.0.to_k.weight",
"encoder.mid_block.attentions.0.to_v.weight",
"encoder.mid_block.attentions.0.to_out.0.weight",
"decoder.mid_block.attentions.0.to_q.weight",
"decoder.mid_block.attentions.0.to_k.weight",
"decoder.mid_block.attentions.0.to_v.weight",
"decoder.mid_block.attentions.0.to_out.0.weight",
]:
state_dict_[name] = state_dict_[name].squeeze()
return state_dict_